PDA

View Full Version : If then help


Siriuskr
04-16-2003, 05:46 PM
if then txtAmount = string then
bla bla bla


why does this not work i want it to check the text box and if there is string then do something if theres not then don't do any thing lol im new to this kinda stuff so don't laugh lol

ionsurge
04-16-2003, 06:16 PM
Which language are you using?

Siriuskr
04-16-2003, 06:17 PM
Miet help if i tell you lol VB

ionsurge
04-16-2003, 06:29 PM
Sorry, I can't help much with that, I specialize in C++...

This may help you... it is in C++ by the way.

This is an example, fiddle it how you will, mind you it is C++, not VBC++, but it could help you somehow...

// The standard C++ if and else tags used in C++ not VBC++.

if (ObjectName->Text == "") // Checking if the objects text is equal to whatever, in this case empty.

{
// Disable a button if text is blank
Button->Enabled = false;
} // End if

else // If that is not the case, then enable it.

{
Button->Enabled = true;
} // End else


No idea if that will help you, but if it does, then hey, wohoo.


:)

Siriuskr
04-16-2003, 06:34 PM
Im starting to learn c++ ill make sure if i have any questions to ask you lol ... Doesn't seam to work the same way as C++ tho :/

ionsurge
04-16-2003, 06:35 PM
Have you got any VB Scripts that I can look at, post it up here, and I will see if I can translate what is up there to VBC++ for you.

Siriuskr
04-16-2003, 06:38 PM
well how you would write a simple math if then statment would be

if 5 + 4 = 9 then
DO SOMETHING HERE
Elseif 5 + 4 < 9 then
DO SOMETHING ELSE
else
DO THIS
end if

lol real simple lol

ionsurge
04-16-2003, 06:42 PM
Okay, so what exactly are you trying to do?

Siriuskr
04-16-2003, 06:47 PM
If some one enters text into txtAmoun then i want it to message box and tell them NO lol else if it doesnt have any thing i want it to move on

ionsurge
04-16-2003, 06:52 PM
lol little knowledge of Vb, I can't really say much.


Head over here: www.allexperts.com - They will certainly be able to help you.

Siriuskr
04-16-2003, 06:54 PM
Thanks a bunch

ionsurge
04-16-2003, 06:58 PM
No worries. By the way. they will reply to you within 24 hours with an answer.

Siriuskr
04-16-2003, 07:01 PM
thats good lol they said 3 days lol was hoping to get one right now but oh well i gusse i will have to have Pacients < defantly Spelled wrong with all the other words i can't spell lmao :/