Skip to content

Using Strings

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #188256
    Admin
    Administrator

    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 😉

    #188265
    Admin
    Administrator

    now, 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 If

    try using

    If jew = "0" Then
    MsgBox "Loco is geh"
    End If

    and 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’

    #188264

    I 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).

    #188263
    Admin
    Administrator

    Wait dont get me confuse 😆

    can I do this

    If nameofstring = "o" then
    do something
    end if
    #188262

    sure

    #188261
    Admin
    Administrator

    @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.. 😆

    #188260
    Admin
    Administrator

    wiki it…

    #188259
    Departure
    Member

    ghost 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 if

    you can do that Admin but like namomachine said, its better to use VbNullstring because its faster

    If nameofstring = VbNullstring then
    do something
    end if

    #188258
    Ponies
    Member

    ZMG NOWAY!

    #188257
    Admin
    Administrator

    way

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.