I have a simple Message Box which comes up if the user presses the escape button when looking at a form. In vb6 this worked no problem but in vb.net (I am in the conversion process) it refused to do anything when pressed but would disappear if you press the "X" in the top right hand corner
After the usual going round in circles I found that this occurred because I have a timer which fires every 100 ms. So, I put "Application.DoEvents()" in the timer and still no joy
Finally I had to do this:
MsgBoxStyle.SystemModal ensures that the Message Box always stays on top (I only discoverd that a few weeks ago after reading many posts saying it cannot be done so that may help somebody)Code:TimerLayout.Enabled = False MsgBox("Blah blah ...", MsgBoxStyle.SystemModal, "MyApp") TimerLayout.Enabled = True
So, any comments?




Reply With Quote
