PDA

View Full Version : How do i make a msgbox so that if you click...


Evan W
08-23-2008, 10:01 PM
...yes or no it will go to different boxes? I made a message box so far, I am new at this and I want to learn more.

x=msgbox("Text Goes Here",4+16+262144,"Title Goes here")
x=msgbox("Test",4+16+262144,"Test")

I want to make it so that if someone clicks yes it will go to a different msgbox and if they click no it goes to another one. Please help.
Please also show me in the msgbox i have already made.

Victor T
08-24-2008, 02:01 AM
you can put the return value in an if() statement

It's VB, right? So:

for an ok press it returns 1
for a no, it returns 7
so it would look like:
if( msgbox() == 1 )
msgbox("Ok pressed", ,"OKtitle")
if( msgbox() == 7 )
msgbox(" No pressed", ,"NOtitle")

msdn.microsoft.com (http://msdn.microsoft.com/en-us/library/139z2azd(VS.80).aspx)

Mr. and Mrs. Brown
08-24-2008, 06:59 AM
in c++, you can do it like this:
if((MessageBox(NULL,"text goes here","title goes here,MB_YESNO))==IDYES)
{
do something here;
}
else
{
do something here
}

search for documentation on your language of programming

www.functionx.com (http://www.functionx.com/bcb/functions/msgbox.htm)