Solved

vb.net keep focus on panel

Posted on 2009-06-27
3
953 Views
Last Modified: 2013-11-17
Hi All,

I have written a control which is a message box, the message box IS NOT a form it is a panel with controls contained inside.

What is the best way to prevent focus change when i show the message box?, i know there are other ways to achieve this on the desktop but i am using windows mobile for this project.

In effect i want to show the panel that has 3 buttons and make the sub routine wait until the user has made a selection, also i need to stop the user from pressing buttons in the background behind the panel (message box)

I am using VB2005 with CF2.

Thanks
Zeus
0
Comment
Question by:Zeus2009
  • 2
3 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24761487
Quite difficult functionality to be honest. You can place the rest of the controls (the background controls) in panels as well and then disable those panels when this messagebox is shown. This way, the focus would also remain on this panel i believe because nothing else would be clickable.
0
 

Accepted Solution

by:
Zeus2009 earned 0 total points
ID: 24762486
I have found an excellent solution i conjured up over the weekend, i am using a do loop with a do application events until i return an integer defining the button pressed within the control.

Thanks for the reply though.

How do i close this post?

Zeus
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24763032
It would have been a good idea to close this question over the weekend when you had found the solution. This saves many volunteer experts from wasting time and effort.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now