Solved

vb.net keep focus on panel

Posted on 2009-06-27
3
965 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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