Results 1 to 6 of 6

Thread: How to add a link to a MessageBox?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2000
    Location
    I'm right here!
    Posts
    849

    Question How to add a link to a MessageBox?

    hello!

    I have a MessageBox and I want to add a link in the text that is
    in it...

    can anyone help me understand how to do that?

    thanks!!

    Dekel C.

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

    Re: How to add a link to a MessageBox?

    Easiest way is to create a small form that looks exactly like a message box. Then you can do anything to it very easily.
    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

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How to add a link to a MessageBox?

    A MessageBox provides very specific functionality. It will display the title you specify, the message you specify, one a list of predefined icons and certain predefined combinations of predefined buttons. Anything beyond that it is not capable of. If you want anything else then you must implement your own form class, as Rob suggests. It would not be especially difficult to make it behave almost exactly like the MessageBox class.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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

    Re: How to add a link to a MessageBox?

    In my Panel usercontrol I wrote I use a small form that looks and behaves like a message box for the About... link. On the about form I have a hyperlink on it to my site. More and more I am seeing this feature in an about or message box of a program.
    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

  5. #5
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: How to add a link to a MessageBox?

    It can be done with the API but its a real swine to implement.
    I don't live here any more.

  6. #6
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: How to add a link to a MessageBox?

    not sure how to create link, but here's a crazy idea(that requires API) that may or may not work. Since I don't know the api to create link(hyperlink type), I create a label on the messagebox. So have a function that waits for the messagebox to pop up, then(when it does pop up) create label on the messagebox. Then subclass that label you just created(assuming the whole program that creates the messagebox was created by you); intercept mouse click messages and do whatever you want it to do when it does.

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