I'm needing to have a textbox to be on top of all other controls on the form. What would be the proper technique.
This particular textbox is for emergency messages, so has to be attention getting.
I can get it to resize, enable, and disappear. But can't get it to be seen over the form controls
I've been having problems messagebox in a loop.
I'm using VS2005, C#.
Thanks
NPosted Jun 30, 2009, 5:43 PM
It worked, just what I needed.
Now the messagebox, I got it to work. But the message box, its logic is inside a loop. I've tested the logic of the loop with a textbox, with commentary and the loop/boolean works.
The problem is the messagebox keeps regenerating, eventually over following the stack. It's no big deal now, but I could use something like in other places.
The funny thing is I have messageboxes all through my current program. Of course none are in a loop.
The loop itself is used to test for particular conditions every cycle, so the message doesn't come up all the time. When conditions are met the messagebox executes as planned and I have a flag to say it's happened once don't send another messagebox. But it does. Humph?
I might isolate the message in it's own subroutine, one step removed, so to speak.
By the way good article.
L.
David AzzopardiPosted Jun 29, 2009, 4:47 PM
You could try and set the z-index property for the textbox like this:
If you have problems with the messagebox, I wrote an article on my blog explaining it. You can find it here: http://www.daveoncsharp.com/2009/06/the-messagebox-explained
Cheers
David