- This topic has 9 replies, 4 voices, and was last updated 18 years ago by Admin.
-
AuthorPosts
-
November 4, 2006 at 4:06 am #188256AdminAdministrator
Well this a newbie question ehhe, but I havent had time to research on it so I gonna need some help if you guys got time 😆
how do we use string, like my admin bot I use text boxes and for what I hear strings are better.
this is basically what the program does right now it checks a textbox to see if its empty, if its not empty then it will do a function, now I kindna know how I will convert an item to a string I just dont know how I would check for the string to be empty lol 🙄
aigh you can critized me lol but please also give me some tips 😉
November 4, 2006 at 5:56 am #188265AdminAdministratornow, seeing as how im also a noob, this may not be right…but i think it could be…
instead of using
If Text1.Text = "0" Then
MsgBox "Loco is geh"
End Iftry using
If jew = "0" Then
MsgBox "Loco is geh"
End Ifand instead of of using the text boxes to put the information, use the strings
Dim jew As String
then, when you would normally put Text1.Text to store, lets say, the room title
jew = "Room Title"
'instead of
Text1.Text = "Room Title"now, i think thats right, if it made any lick of sense…
-waits for dep to come along and so ‘thats not even close Ghost’
November 4, 2006 at 5:57 am #188264BattleStar-GalacticaMemberI didn’t get what you want do to but you can compare your string variable with vbnullstring if is equal that mean there is nothing in that string.
do you know how is this>>> Dim mystring as string and Dim mystrings() as string
the different between mystring and mystrings is mystrings is an array of string can be resized progammatically(dynamically).
November 4, 2006 at 2:01 pm #188263AdminAdministratorWait dont get me confuse 😆
can I do this
If nameofstring = "o" then
do something
end ifNovember 4, 2006 at 3:03 pm #188262BattleStar-GalacticaMembersure
November 4, 2006 at 4:36 pm #188261AdminAdministrator@Ghost wrote:
now, i think thats right, if it made any lick of sense…
-waits for dep to come along and so ‘thats not even close Ghost’
lol…..how is licking equated with measuring sence.. 😆
November 4, 2006 at 7:31 pm #188260AdminAdministratorwiki it…
November 5, 2006 at 4:30 am #188259DepartureMemberghost is correct, and namo has showen an array of strings, just like an array of controls (like i used in trigger bot) but the anwser for Admin is what ghost gave, instead of using a resouce hungry control (textbox) on your form you would use a string instead, thus elliminating the need for a textbox,
You would use a string in a function, just like you already have in ALL of your source codes Admin, or you can declare a global string and then you can use that string in whole of your project including your modules ect…
asking such questions Admin makes thinks you dont even know how your own codes work, I think once you have an understanding how your codes work then you can tweak them for better proformance and become a better programmer
If nameofstring = “o” then
do something
end ifyou can do that Admin but like namomachine said, its better to use VbNullstring because its faster
If nameofstring = VbNullstring then
do something
end ifNovember 5, 2006 at 4:56 am #188258PoniesMemberZMG NOWAY!
November 5, 2006 at 5:30 am #188257AdminAdministratorway
-
AuthorPosts
Related
- You must be logged in to reply to this topic.