-1

所以我正在制作一个有轨迹栏的程序,向上或向下移动它会改变特定程序开始的 RAM 量。除了这不起作用。

项目加载时:

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

单击启动程序的按钮时

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

用 2gb 的内存启动它,它会是

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

谢谢

4

1 回答 1

0

Plutonix 已经有了答案,但请更改您的 Select ...

Dim VRAM As String = (VRAMT.Value * 256).toString()
TextBox4.Text = VRAM
于 2013-09-26T07:20:54.403 回答