View Single Post
  #4 (permalink)  
Old March 31st, 2005, 01:23 PM
BrianWren BrianWren is offline
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

In VB you can “override” VB functions by writing your own in a module within the project. VB automatically checks project resources before checking VB's libraries.
That would allow you to write your own MsgBox function that displays your own form as a “message box.” If you wanted to, you could put a text field (label, button, textbox, ...) on the form's face that effectively operates as a hyperlink.

I don’t think you’ll be able to do this in VBScript.

I believe your only approach for this is going to be either to let the button the user selects control the behavior of the script to enable sending mail through code (as mmcdonal suggested), or write a “message box” html document with the email link in it, and display that HTML document in an internet browser instead of showing a message box. (Of course, that would not be modal, as a message box is...)

There is one other thing that you could do, the process of which I’m not sure of: Write a true VB ActiveX DLL that presents a VB form with the e-mail link on it as the action of a function in the DLL. When you call the function (which I’m not sure how you do in VBScript) the call would be synchronous, giving you the ability to mimic a modal dialog. You could write the function to take all the e-mail details as arguments. Just a thought.
Reply With Quote