Close the message box just by touching screen  
Author Message
FugersonHall





PostPosted: Smart Devices VB and C# Projects, Close the message box just by touching screen Top

Hi,

I am using VB.net and Visual Studio 2005 to compile a program. Some messages have to appear on screen in order to tell users what the program completed, such as, "Update Succeed", "Item Was Not Found", etc. However, in order to close these message box, users have to use pen to click the "ok" on the right upper corner of the message box. What I want is: instead of clicking the "ok", users can close these message box just by touching screen. How can I do that Thanks a lot.




Smart Device Development19  
 
 
nhl66pens





PostPosted: Smart Devices VB and C# Projects, Close the message box just by touching screen Top

I don't see anyway to make the messagebox close without hitting ok (or whichever buttons you make available). Could you possibly use a label instead Just make space on the form to display a label with "Update Successful" and then you can take action on anything the user does next or use the timer to make the label invisible again after so many seconds.
 
 
JR Lyon





PostPosted: Smart Devices VB and C# Projects, Close the message box just by touching screen Top

Or you can maxk a panel as well that becomes visible. I have done this on several occasions when MessageBox didn't meet my needs. If your creative you can actually do a fairly good mockup of MessageBox on your panel The good thin about the panel is when you hied the panel all it's components get hidden as well

 
 
chj915





PostPosted: Smart Devices VB and C# Projects, Close the message box just by touching screen Top

Can you dim a boolean as "Dim touchToQuit = False"

When the application pops up that message, set the touchToQuit = True.

In the Form_Click event, type something as below:

If touchToQuit = True Then

Me.close

End If

I am guessing this possiblity, try it by yourself.