|
||
| อ่านรายชื่อ เครื่องพิมพ์ที่ต่ออยู่ในระบบ |
|
|
|
|
วันจันทร์ที่ 08 มีนาคม 2010 เวลา 17:21 น.
|
|
เราสามารถอ่านรายชื่อ เครื่องพิมพ์ที่ต่ออยู่ในระบบได้ โดยจะไปอ่านมาจากไฟล์ win.ini ตามตัวอย่างด้านล่างนี้ String ls_Temp,ls_PrinterName ls_Temp = ProfileString("win.ini","Windows","device","Printer Not Set") ls_PrinterName = Left(ls_Temp,Pos(ls_Temp,",")-1) ls_Temp = Mid(ls_Temp,gflastpos(ls_Temp,",")+1) ls_Temp = ProfileString("win.ini","network",ls_Temp,"") If ls_Temp "" then ls_PrinterName = ls_PrinterName+"on"+ls_temp end If Messagebox('เครื่องพิมพ์ชื่อ ',ls_PrinterName) |