Post: Visual Basic Quote Mark Alternative?
02-24-2011, 04:03 PM #1
MeowDev
Power to the Premium
(adsbygoogle = window.adsbygoogle || []).push({}); I'm trying to code a Cod4 leaderboard editor and need some help with text box inserting.

I want the writing in textbox 2 to be inserted in textbox 1 as cod4 code.

so far
    
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
TextBox1.Text = TextBox2.Text.Insert(TextBox2.SelectionStart, "bind DPAD_UP statSet 2326 " & TextBox2.Text & "")
End Sub


and the outcome is
You must login or register to view this content.

any help please


EDIT
I have decided to use a combobox but I still need an alternative for quote marks!

Code now:
    
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
TextBox1.Text = "bind DPAD_UP statSet 2326 " & ComboBox1.SelectedItem & ""
End Sub


and the outcome is
You must login or register to view this content.
(adsbygoogle = window.adsbygoogle || []).push({});
02-24-2011, 05:20 PM #2
Spirant
Bounty hunter
Originally posted by Telepot View Post
I'm trying to code a Cod4 leaderboard editor and need some help with text box inserting.

I want the writing in textbox 2 to be inserted in textbox 1 as cod4 code.

so far
    
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
TextBox1.Text = TextBox2.Text.Insert(TextBox2.SelectionStart, "bind DPAD_UP statSet 2326 " & TextBox2.Text & "")
End Sub


and the outcome is
You must login or register to view this content.

any help please


EDIT
I have decided to use a combobox but I still need an alternative for quote marks!

Code now:
    
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
TextBox1.Text = "bind DPAD_UP statSet 2326 " & ComboBox1.SelectedItem & ""
End Sub


and the outcome is
You must login or register to view this content.


So you want the textbox to say this? (example)
    bind DPAD_UP statSet 2326 "8"


Like: statSet 2326 "8", with the quotes?
02-24-2011, 05:23 PM #3
MeowDev
Power to the Premium
Originally posted by xFreezy
So you want the textbox to say this? (example)
    bind DPAD_UP statSet 2326 "8"


Like: statSet 2326 "8", with the quotes?


I want
    
bind dpad_up "statset 2326 8"
with the quotes.
02-24-2011, 05:38 PM #4
Spirant
Bounty hunter
Originally posted by Telepot View Post
I want
    
bind dpad_up "statset 2326 8"
with the quotes.


Got it, this solution isn't the best but it will do.

1. Right-click on the application name in the Solution Explorer. In my case WindowsApplication1.

2. Click on properties, or press ALT + ENTER.
Like so:
You must login or register to view this content.

3. Click Settings and add a new setting, it doesn't matter what you call it, i called mine example.

4. Set its value to: " (Only one quote)

It should look something like this:
You must login or register to view this content.

5. Use this code, you might need to tweak it though.
     TextBox1.Text = "bind DPAD_UP " + My.Settings.exampe + "statSet 2326 " + ComboBox1.SelectedItem + My.Settings.exampe

Like so:
You must login or register to view this content.

I hope it works for you! Cool Man (aka Tustin)

This is the outcome:
    bind DPAD_UP "statSet 2326 1"

The following 2 users say thank you to Spirant for this useful post:

MeowDev, CodingNation
02-24-2011, 06:55 PM #5
MeowDev
Power to the Premium
Thanks I + repd

---------- Post added at 12:47 PM ---------- Previous post was at 12:47 PM ----------

Originally posted by xFreezy
Got it, this solution isn't the best but it will do.

1. Right-click on the application name in the Solution Explorer. In my case WindowsApplication1.

2. Click on properties, or press ALT + ENTER.
Like so:
You must login or register to view this content.

3. Click Settings and add a new setting, it doesn't matter what you call it, i called mine example.

4. Set its value to: " (Only one quote)

It should look something like this:
You must login or register to view this content.

5. Use this code, you might need to tweak it though.
     TextBox1.Text = "bind DPAD_UP " + My.Settings.exampe + "statSet 2326 " + ComboBox1.SelectedItem + My.Settings.exampe

Like so:
You must login or register to view this content.

I hope it works for you! Cool Man (aka Tustin)

This is the outcome:
    bind DPAD_UP "statSet 2326 1"


Thanks I + repd

---------- Post added at 01:06 PM ---------- Previous post was at 12:47 PM ----------

Originally posted by xFreezy
Got it, this solution isn't the best but it will do.

1. Right-click on the application name in the Solution Explorer. In my case WindowsApplication1.

2. Click on properties, or press ALT + ENTER.
Like so:
You must login or register to view this content.

3. Click Settings and add a new setting, it doesn't matter what you call it, i called mine example.

4. Set its value to: " (Only one quote)

It should look something like this:
You must login or register to view this content.

5. Use this code, you might need to tweak it though.
     TextBox1.Text = "bind DPAD_UP " + My.Settings.exampe + "statSet 2326 " + ComboBox1.SelectedItem + My.Settings.exampe

Like so:
You must login or register to view this content.

I hope it works for you! Cool Man (aka Tustin)

This is the outcome:
    bind DPAD_UP "statSet 2326 1"


It's a multiline thing I want the text to be insterted into, i have also added an enter command so it breaks line after each line of code (each textbox).

Problem #2

after choosing my prestige (works great thanks!) - not a problem
You must login or register to view this content.

after choosing how many kills the first line of code is deleted, any help or advice?
You must login or register to view this content.

---------- Post added at 01:55 PM ---------- Previous post was at 01:06 PM ----------

Originally posted by another user
SOLVED

message to short

The following user thanked MeowDev for this useful post:

Spirant
02-24-2011, 07:55 PM #6
Default Avatar
Oneup
Guest
Or just do this:



    
TextBox1.Text = "bind DPAD_UP " & """" & "statSet 2326 1"""


Same outcome , less work

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo