Solved

vb.net keep focus on panel

Posted on 2009-06-27
3
962 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 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