Skip to content

I'm needing to have a textbox to be on top of all other controls on the form.

N

Asked Jun 29, 2009, 10:27 AM EDT2 answers
Share
LinkedInX
 


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

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    I did the thing with: textbox.bringtofront();

    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.
    0