Solved

vb.net keep focus on panel

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

932 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

13 Experts available now in Live!

Get 1:1 Help Now