pangolin_10
Member
hi everybody,
i am trying to build an application that will automate the desktop wallpaper changing phenomenon in specific time intervals. i am using a binary file in which i keep the filenames of the images that are to be displayed. the 1st form will fetch the filenames from the file and fill it into an array and then a timer on form1 will automatically set the picture in the picturebox to those in the array. on right clicking the picturebox, a context menu will come up which will have a submenu "select images.." which when clicked will bring up another form, form2, without hiding the 1st one. now i want to make it happen that until and unless the ok button or cancel button on the 2nd form is clicked, there will be no effect of right click on the 1st form,i.e. i want to describe form2 as a modal form. i tried to do this by- i declared an integer variable "X" in form1 that had an initial value of 0.In the "picturebox1_MouseDown()" event, i specified that until "X" had a value of 0,the right click will not bring the context menu up. a public subroutine in form1 "setX(byval value)" will set the value of x to value. but as i am defining an instance of form1 in form2 as "dim f1 as new form1" and then "f1.setX(2)", such that the right click on form1 will have no effect, i find out that this method is not working as a new instance of form1 is created. Plz help me out of this problem....
i am trying to build an application that will automate the desktop wallpaper changing phenomenon in specific time intervals. i am using a binary file in which i keep the filenames of the images that are to be displayed. the 1st form will fetch the filenames from the file and fill it into an array and then a timer on form1 will automatically set the picture in the picturebox to those in the array. on right clicking the picturebox, a context menu will come up which will have a submenu "select images.." which when clicked will bring up another form, form2, without hiding the 1st one. now i want to make it happen that until and unless the ok button or cancel button on the 2nd form is clicked, there will be no effect of right click on the 1st form,i.e. i want to describe form2 as a modal form. i tried to do this by- i declared an integer variable "X" in form1 that had an initial value of 0.In the "picturebox1_MouseDown()" event, i specified that until "X" had a value of 0,the right click will not bring the context menu up. a public subroutine in form1 "setX(byval value)" will set the value of x to value. but as i am defining an instance of form1 in form2 as "dim f1 as new form1" and then "f1.setX(2)", such that the right click on form1 will have no effect, i find out that this method is not working as a new instance of form1 is created. Plz help me out of this problem....