Results 1 to 13 of 13

Thread: Just Curious...

  1. #1

    Thread Starter
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Just Curious...

    Is there a method to view the text that was displayed in a message box?

    For example:
    VB Code:
    1. Private Sub Form_Load ()
    2. Msgbox "This is a test",vbinformation,"Test"
    3. 'now how can i view "This is a test" ...or if the msgbox were different 'everytime... can i extract the value into a string?
    4. End Sub
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Just Curious...

    You'd have to create system wide hook to monitor system's activities and this is not easy thing tio accomplish.

  3. #3
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    Re: Just Curious...

    In your own application or another?
    To the world you may just be one person, but to this one person, you just might be the world.

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Just Curious...

    M$ suggests Dim Message, Style, Title, Help, Ctxt, Response, Mystring

    then

    Response = Msgbox (Msg, Style, Title, Help, Ctxt)

    that's about the only way to keep the info.

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Just Curious...

    What's the point to monitor your own application ??? - You may simply write last message to some global var so it will always be available.

  6. #6
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    Re: Just Curious...

    What can i say, I'm just curious
    To the world you may just be one person, but to this one person, you just might be the world.

  7. #7

    Thread Starter
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Re: Just Curious...

    oh lol i was just wondering.

    Was just thinking about how i could take certain actions based on what a msgbox said (without knowing before hand what the msgbox will say)

    Like using Instr to find a keyword in the msgbox.. etc

    Well, thx for the replies
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

  8. #8

    Thread Starter
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Re: Just Curious...

    oh and, in my own app of course
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

  9. #9
    Hyperactive Member johnweidauer's Avatar
    Join Date
    Sep 2002
    Location
    SLC, UT
    Posts
    314

    Re: Just Curious...

    Use

    On Error Goto ErrHandle:

    ErrHandle:
    Dim ErrMsg as String

    ErrMsg = err.Number & " " & Err.Description
    Last edited by johnweidauer; Jan 11th, 2005 at 09:06 PM. Reason: forgot the or in Error
    To the world you may just be one person, but to this one person, you just might be the world.

  10. #10

    Thread Starter
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Re: Just Curious...

    Quote Originally Posted by johnweidauer
    Use

    On Error Goto ErrHandle:

    ErrHandle:
    Dim ErrMsg as String

    ErrMsg = err.Number & " " & Err.Description

    What does that have to do with anything in this thread?
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Just Curious...

    It is possible to get the text from a message box outside of your application. I
    also write code in WinBatch which has a function to read any message box
    text so it must be possible in VB.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  12. #12
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Just Curious...

    Rhetorically speaking (or philosophically if you will) - nothing is impossible - it's just a matter of "is it worth doing ?"

  13. #13

    Thread Starter
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Re: Just Curious...

    Well, somethings are impossible with the materials & tools your given at least. I just thought there might be an EASY way that i didn't know about

    No need to involve a windows hook to achieve a theory of which i can accomplish the goal using something alot simpler.


    Shall i set this thread to resolved or anyone else want to add their input?
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width