Disable form not fast enough
-
Hello, I have the following question. I have written a VB 2008 program for registering Rooms in a Hotel. Using a Touch Screen for entering everythin so there is no keyboard and mouse installed on the PC. So i have a buttom for every room on a main screen. When pressing for example room 2 , there is a new form that opens on top of the main form. in the main programm is have frmxxx.show(). In the frmxxx() i have set in the load : FrmMain.enabled = false So it is not possible anymore to click on the main form , so i have blocked that the users can change the form back to the main. Now the problem : sometimes , the user is clicking to fast i think (before the frmMain.enabled = false) and the main window is coming on top of the frmxxx. so the mainform is hiding the smaller frmxxx so the user has a big main form wich is at that time disabled. so the screens are on top. The only way to solve this is with a keyboard CTRL-TAB but because of the missing keyboard (due to the touch screen) it is not possible. I have already tried to set the main form enabled = false before opening the frmxxx. but this is not working when the mainform is still active. I dont want to hide the main form , so i wnat it set to disabled. Does anyone can give me advise on this maybe stupid question. Thanks Best regards DCA
-
Hello, I have the following question. I have written a VB 2008 program for registering Rooms in a Hotel. Using a Touch Screen for entering everythin so there is no keyboard and mouse installed on the PC. So i have a buttom for every room on a main screen. When pressing for example room 2 , there is a new form that opens on top of the main form. in the main programm is have frmxxx.show(). In the frmxxx() i have set in the load : FrmMain.enabled = false So it is not possible anymore to click on the main form , so i have blocked that the users can change the form back to the main. Now the problem : sometimes , the user is clicking to fast i think (before the frmMain.enabled = false) and the main window is coming on top of the frmxxx. so the mainform is hiding the smaller frmxxx so the user has a big main form wich is at that time disabled. so the screens are on top. The only way to solve this is with a keyboard CTRL-TAB but because of the missing keyboard (due to the touch screen) it is not possible. I have already tried to set the main form enabled = false before opening the frmxxx. but this is not working when the mainform is still active. I dont want to hide the main form , so i wnat it set to disabled. Does anyone can give me advise on this maybe stupid question. Thanks Best regards DCA
sounds like you should be using ShowDialog instead of Show. ShowDialog will automatically 'block' the main form, so you don't need to worry about disabling it
"An eye for an eye only ends up making the whole world blind"
-
sounds like you should be using ShowDialog instead of Show. ShowDialog will automatically 'block' the main form, so you don't need to worry about disabling it
"An eye for an eye only ends up making the whole world blind"
Hello, Can i use the showdialog() with more that 2 forms. So i have the mainform , i opens a second form with frmxxx.showdialog and on that second form there are again a few buttons wich i use to open a 3th form , can i use the same showdialog there ? thanks DCA
-
Hello, Can i use the showdialog() with more that 2 forms. So i have the mainform , i opens a second form with frmxxx.showdialog and on that second form there are again a few buttons wich i use to open a 3th form , can i use the same showdialog there ? thanks DCA
No, you can only use it with one form from the mainform, but YES you can keep calling ShowDialog from the Parent to Childs. what you can also do is set the AlwaysOnTop property to true on the 'popup' form which will change the ZOrder of the forms, keeping it in front.
Dave Don't forget to rate messages!
Find Me On: Web|Facebook|Twitter|LinkedIn
Waving? dave.m.auld[at]googlewave.com -
No, you can only use it with one form from the mainform, but YES you can keep calling ShowDialog from the Parent to Childs. what you can also do is set the AlwaysOnTop property to true on the 'popup' form which will change the ZOrder of the forms, keeping it in front.
Dave Don't forget to rate messages!
Find Me On: Web|Facebook|Twitter|LinkedIn
Waving? dave.m.auld[at]googlewave.comWhen i have 3 forms mainform , form1 and form2 From the mainform i need to open form1 wich need to be set active (on this time the main form may not be accessable). From the form1 that is on top of the (blocked)mainform i need to open from2 wich comes on top of form1 , so form1 must also be disabled like frmmain. and form2 must be active only. When clicking on the OK button on Form2 the form2 needs to be disapear and frm1 needs to come active again , frmmain is still deactivated until ok isclicked on frm1. My problem was when using form.enabled that is was to slow and the user was clicking to fast so the wrong forms came on top of eachother and where locked . can you help me with this please. thanks. DCA
-
When i have 3 forms mainform , form1 and form2 From the mainform i need to open form1 wich need to be set active (on this time the main form may not be accessable). From the form1 that is on top of the (blocked)mainform i need to open from2 wich comes on top of form1 , so form1 must also be disabled like frmmain. and form2 must be active only. When clicking on the OK button on Form2 the form2 needs to be disapear and frm1 needs to come active again , frmmain is still deactivated until ok isclicked on frm1. My problem was when using form.enabled that is was to slow and the user was clicking to fast so the wrong forms came on top of eachother and where locked . can you help me with this please. thanks. DCA
-
Thanks That is the correct solution. best regards DCA