While working with Textbox in a windows application I wanted to show the text of the textbox to be both Bold and Underlined. I had to do this based on certain condition.
To solve the issue instead of looking into the Lotus notes API I thought it should be much easy to set the default printer for the machine. Once the Default printer is set Lotus notes will use this printer to print any document. Below is the code needed to set the default printer of any machine.
[DllImport("winspool.drv", SetLastError = true)]
private static extern void SetDefaultPrinter(string name);