hi
I have two forms, form 1 has list1 and form 2 has list 2.
I need to use one context menu (cmenu)which is work in form 1 and it must be in work form 2 too the same context menu.. but there is a problem with Print Preview which is an item in the context menu when I right click in list 2 I see the items of list 1 in the print preview page.
how can I fix it??? first let me tell you what I did.
to make the context menu work in form 2 I wrote this:
Code:
form2.show()
form2.list2.ContextMenuStrip= form1.cmenu
in the print preview context menu item code:
Code:
PrintPreviewDialog1.document = PrintDialog1 'PrintDialog1 has a loop to print items of list1 in form1
PrintPreviewDialog1.ShowDialog()
it prints list1 when I click form1 or form2.
how can I make PrintPreviewDialog1.document = PrintDialog2 'to print list2 ??
I can't access the code to change the document according the source of right click if it was list1 to do this or if it was list2 to print the other document.
I tried to use class but I had problems too
thanks