Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 2nd, 2007, 10:49 AM   #1
surf3rb0y
Newbie
 
Join Date: Dec 2006
Posts: 10
Rep Power: 0 surf3rb0y is on a distinguished road
Checking to see if a message box has displayed

How would one go about checking to see if a message box is currently being displayed?


THanks
surf3rb0y is offline   Reply With Quote
Old Jul 2nd, 2007, 11:23 AM   #2
melbolt
Hobbyist Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 244
Rep Power: 4 melbolt is on a distinguished road
Send a message via AIM to melbolt Send a message via Yahoo to melbolt
What are you trying to do, need a bit more detail.

Not sure if this is what you're looking for, but you could use this to determine if the messagebox you opened earlier had its "ok" clicked or whether it was closed or what.


vbnet Syntax (Toggle Plain Text)
  1. Dim bla As New MsgBoxResult
  2. bla = MsgBox("poop")
  3.  
  4.  
  5. If bla = MsgBoxResult.Ok Then
  6. 'ok was clicked on messagebox
  7. End If
__________________
I have never let my schooling interfere with my education. -Mark Twain-

Xbox live gamertag: melbolt
melbolt is offline   Reply With Quote
Old Jul 2nd, 2007, 12:11 PM   #3
surf3rb0y
Newbie
 
Join Date: Dec 2006
Posts: 10
Rep Power: 0 surf3rb0y is on a distinguished road
what if i want to see if its currently being displayed?
surf3rb0y is offline   Reply With Quote
Old Jul 2nd, 2007, 4:03 PM   #4
john Wesley
Hobbyist Programmer
 
john Wesley's Avatar
 
Join Date: May 2006
Location: United Kingdom
Posts: 119
Rep Power: 3 john Wesley is on a distinguished road
Send a message via MSN to john Wesley Send a message via Yahoo to john Wesley
Have you tried passing the Form object, which can be referenced using the 'Me' keyword, as the IWin32Window owner and checking if it would then be exposed via the 'OpenForms' property?

Another alternative after setting the owner would be to try and access handles via the calling Form properties that are associated with this instance, thereby you could define if any of the windows are your messagebox by conditional means (ie. matching elements such as title bar text).
__________________
Mona Lisa must of had the highway blues you can tell by the way she smiles..
john Wesley is offline   Reply With Quote
Old Jul 5th, 2007, 4:51 PM   #5
mattireland
Hobbyist Programmer
 
mattireland's Avatar
 
Join Date: Jul 2007
Location: Wales, United Kingdom
Posts: 203
Rep Power: 2 mattireland is on a distinguished road
Send a message via MSN to mattireland Send a message via Skype™ to mattireland
Alternatively, you could just try compiling and running and looking to see if it is being displayed?
mattireland is offline   Reply With Quote
Old Jul 5th, 2007, 5:19 PM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
LOL! :beard:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
message queue game programmingnoob C 19 Sep 29th, 2006 5:14 AM
Compiling Maverik 6.2 (from C) megamind5005 C 16 May 3rd, 2006 5:41 PM
How to to do this using Win32 API? csharp C++ 4 Nov 1st, 2005 5:22 AM
Can anyone help me PLEASE???? jasmm_73 C 4 Jun 7th, 2005 8:27 PM
AIM Random Away Message System mdhislaer Java 2 Feb 20th, 2005 3:28 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:54 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC