Last night I coded a project in C#. Its function is to list all printers that connect to a PC and make the default printer print. Print documents are images. I 've never worked in that kind of work so I did googling and got some tuts. The tuts said: "Honey, just create a PrintDocument object, the fresh-created one contains a list and first element is the default printer." I believe them, I did as they told without testing and delivered to my customer. Bullsh!t, it is ENTIRELY not true. I had to be back to traditional way, access the system and read some info blah blah. You should know that I wrote a small e-book about WMI, surely I used this tool. The WMI code to get the name of default printer in Windows OS is here : public string GetDefaultPrinterName() { var query = new ObjectQuery("SELECT * FROM Win32_Printer"); ...
Truyện này xuất bản từ lâu lắm rồi, trước cả khi Kim Đồng mua bản quyền Doraemon. Kiếm 1 hồi trên mạng thì gặp nó :) P/s: xem tập: - Chú nhóc Doremini gây rối - Kết Doremon - fanmade Pps: App đọc truyện dài Doremon trên điện thoại/tablet Android: Store / File APK
Hi guy, long time no see. I miss u so muchhhhh :x Sorry readers, thing in front of me is the mirror. This post begins here. U know, it's 3 am, today is my birthday, I have an AI tutorial class this afternoon and I've not slept yet. I'm so excited now. I've just archived the great idiots things that almost idiots couldn't archive. I feel like the most idiot ever. From now on, I'm able to call an idiot C# method in the idiot language Java. I'm gonna tell you how. Before continuing, check if you've installed Windows OS, .NET framework and MS VS already. Firstly, prepare an idiot C# library by yourself. Open your Notepad++ and type this code (do not copy here because this text is not colored): using System; using System.Windows.Forms; public class CSharpHelloWorld { public CSharpHelloWorld() { } public void displayHelloWorld() { MessageBox.Show("Hello Java, I'm ...
Comments
Post a Comment