I'm using the below to generate the list of installed printers and add them to a Tool Menu Strip
I have the following code to determine the default printer and would like to assign an image to the respective name in the list but i'm not sure on how to do thisCode:Private Sub PrinterToolStripMenuItem_DropDownOpening(sender As Object, e As EventArgs) Handles PrinterToolStripMenuItem.DropDownOpening PrinterToolStripMenuItem.DropDownItems.Clear() Dim printers As New Printing.PrintDocument() Dim printername = printers.PrinterSettings.PrinterName For Each printername In PrinterSettings.InstalledPrinters PrinterToolStripMenuItem.DropDownItems.Add(printername) Next End Sub
'' This is where i would assign the image to settings.PrinterNameCode:Dim settings As New PrinterSettings()
I would then like to be able to change the default printer via a Double Click of which i have the code below but again i am not sure on how to accomplish this
I've managed to work this using a button and listbox but I'm struggling with the tool menu item.Code:Dim PrinterName As String = ''Selected item form Menu Tool Item Shell(String.Format("rundll32 printui.dll,PrintUIEntry /y /n ""{0}""", PrinterName))
Can anyone point me in the right direction of where to look please?
Cross posted here http://stackoverflow.com/questions/2...u-item-control
Thanks


Reply With Quote
