Results 1 to 6 of 6
  1. #1
    XiAtomikiX's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    141
    Reputation
    22
    Thanks
    31

    Changing 1 Character in a label

    God i cannot remember how to do this its been a while now
    Im trying to change Characters in a label

    for example
    Code:
    Public Sub myshitcode()
        If label1.Tex*****ntains("/") Then
        
         label1.Text.Replace("/","\")
        
        End If
    
    End Sub
    i dont understand why thats not replacing the Character lol
    i have even tried this

    Code:
    Public Sub myshitcode()
       Dim a As Char =  "/"
       Dim b As Char =  "\"
       label1.Text.Replace(a,b)  
    End Sub
    neither way works
    I have done this in the past I just cant Remember how nor find any of my Snippets.

    So can someone please help that would be great

  2. #2
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    .Replace() does not change the object (string), but returns one modified...

    label1.text = label1.text.replace....
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  3. The Following 2 Users Say Thank You to 'Bruno For This Useful Post:

    DawgiiStylz (10-25-2012),XiAtomikiX (10-25-2012)

  4. #3
    DawgiiStylz's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Dawg House
    Posts
    7,811
    Reputation
    219
    Thanks
    2,896
    My Mood
    Tired
    In other, words
    Code:
    TextBox1.Text = TextBox1.Text.Replace("A", "B")

  5. The Following User Says Thank You to DawgiiStylz For This Useful Post:

    XiAtomikiX (10-25-2012)

  6. #4
    XiAtomikiX's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    141
    Reputation
    22
    Thanks
    31
    Quote Originally Posted by Koompa View Post
    In other, words
    Code:
    TextBox1.Text = TextBox1.Text.Replace("A", "B")
    o that makes perfect sense now no wonder it wasnt doing anything
    lol
    so then i would be able to do it like this then right

    Code:
    Public Sub myshitcode()
        If label1.Tex*****ntains("/") Then
        
         label1.Text = label1.Text.Replace("/","\")
        
        End If
    
    End Sub
    ill try this tonight

  7. #5
    DawgiiStylz's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Dawg House
    Posts
    7,811
    Reputation
    219
    Thanks
    2,896
    My Mood
    Tired
    Quote Originally Posted by XiAtomikiX View Post
    o that makes perfect sense now no wonder it wasnt doing anything
    lol
    so then i would be able to do it like this then right

    Code:
    Public Sub myshitcode()
        If label1.Tex*****ntains("/") Then
        
         label1.Text = label1.Text.Replace("/","\")
        
        End If
    
    End Sub
    ill try this tonight
    That should work just fine.Don't forget how to execute the sub too

  8. #6
    XiAtomikiX's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    141
    Reputation
    22
    Thanks
    31
    hey thanks guys it works great now.

    Mark as Solved please thanks

Similar Threads

  1. [Help] Change character
    By gamernuub in forum WarRock Korea Hacks
    Replies: 5
    Last Post: 04-15-2012, 10:03 AM
  2. Changing Character Models
    By bladeofgrim in forum Vindictus Help
    Replies: 3
    Last Post: 09-27-2011, 08:17 AM
  3. Change Your Male Character's Voice To A Female Voice!
    By ßLøøð in forum CrossFire Mods & Rez Modding
    Replies: 84
    Last Post: 07-18-2011, 03:56 AM
  4. Change Regular Character to Viper?
    By startdriveturn in forum Combat Arms Mod Discussion
    Replies: 22
    Last Post: 05-09-2010, 12:32 AM
  5. [nub, possibly] idea about character color change
    By lowerboy90 in forum Combat Arms Hacks & Cheats
    Replies: 12
    Last Post: 03-12-2009, 02:33 PM