|
-
February 11th, 2007, 12:44 PM
#1
msgbox question
I would like to use a MSGBOX in a a piece of code I am writting in a VB 6 application.
I know how to use the standard msgbox but is there any way to change the wording on the buttons?
For example: I am giving the user an option to print a report in Landscape or Portrait. The report contents are a little different. What I would like to do is issue a msgbox:
Code:
Dim Ans as Single
Ans = msgbox("Portrait or Landscape?",vbyesno,"Print Orientation")
If Ans = vbyes then.......
Instead of the BUTTONS saying "Yes" "No" , is there any way to have them read "Portrait" "Landscape"?
Thanks,
Sam
Sam
-
February 11th, 2007, 01:21 PM
#2
Re: msgbox question
Hello,
No, you can't use other buttons but the ones predefined by VB.
You may of course make your own msgbox (using a form or a frame for this purpose) and design it your whole personal way.
-
February 11th, 2007, 04:56 PM
#3
Re: msgbox question
 Originally Posted by moa
Hello,
No, you can't use other buttons but the ones predefined by VB.
You may of course make your own msgbox (using a form or a frame for this purpose) and design it your whole personal way.
Moa:
Thanks for the reply. I thought there might be an "API". It's not what I was hoping for but you can't have everything in life.
Sam
Sam
-
February 12th, 2007, 03:32 AM
#4
Re: msgbox question
Well Sam, there is a MessageBox API, but in this case it won't help you much.
This is much more complicated 
You'd need to Hook the MessageBox and with several API's change the Button values of that MessageBox. An important thing to note here is that the MessageBox Buttons return values will still remain the same.
So, meaning, we can change the Text of the Yes and No Buttons, but their return values will still be 6 for yes, and 7 for No - but I think you can live with that 
Anyways, enough rambling..
Have a look at this attachment (NOT done by me ), it will help you a lot with your issue
Last edited by HanneSThEGreaT; December 19th, 2008 at 03:15 AM.
-
February 12th, 2007, 04:52 AM
#5
Re: msgbox question
and here's another hacked version, using API Timers (which does return 1, 2 or 3)
edit: but I would whole heartedly recommend making your own custom form.
-
February 12th, 2007, 05:09 AM
#6
Re: msgbox question
 Originally Posted by bushmobile
edit: but I would whole heartedly recommend making your own custom form.
Ditto! It will end up being the less complicated and less time consuming effort.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|