Change the default printer of Windows

xiaoxiao2021-03-06  72

If you want to change the default printer of Windows, you must change the device key in Windows Win.ini. Send a WM_WININICHANGE message:

Var strini: array [0..max_path] of char; arrwindows: array [0..64] of char; begin getWindowsDirectory; strcat (strcat (strcat (strcat (strcat); with tinifi .Create (STRINI) Do Try WriteString ('Windows', 'Device', 'HP LaserJet 4 Plus, HPPCL5MS, LPT1:'); FINALLY FREE;

Strcopy (arrwindows, 'windows'); sendMessage (hwnd_broadcast, wm_wininichange, 0, longint (@arrwindows));

转载请注明原文地址:https://www.9cbs.com/read-120927.html

New Post(0)