-1

So I am making a program where I have a trackbar, and moving that up or down changes the amount of RAM a specific program starts with. Except this doesn't work.

When the project loads:

Dim VRAM As String
    Select VRAMT.Value
        Case 1
            VRAM = 256
            TextBox4.Text = VRAM
        Case 2
            VRAM = 512
            TextBox4.Text = VRAM
        Case 3
            VRAM = 768
            TextBox4.Text = VRAM
        Case 4
            VRAM = 1024
            TextBox4.Text = VRAM
        Case 5
            VRAM = 1280
            TextBox4.Text = VRAM
        Case 6
            VRAM = 1636
            TextBox4.Text = VRAM
        Case 7
            VRAM = 1792
            TextBox4.Text = VRAM
        Case 8
            VRAM = 2048

When the button to start the program is clicked

Process.Start("C:\ServerMaker\Vanilla\VanillaServer.exe", "/C java -Xmx""VRAM""M -Xms""VRAM""M -exe VanillaServer.exe")

To start it with 2gb of ram, it would be

Process.Start("C:\ServerMaker\Vanilla\VanillaServer.exe", "/C java -Xmx"2048"M -Xms"2048"M -exe VanillaServer.exe")

Thanks

  • Please be more specific with "it doesn't work". Do you get errors? It doesn't do what you expect? How are you measuring? – Styxxy Sep 25 '13 at 18:11

1 Answers1

0

Plutonix already has the answer but please change your Select ...

Dim VRAM As String = (VRAMT.Value * 256).toString()
TextBox4.Text = VRAM
David Sdot
  • 2,343
  • 1
  • 20
  • 26