Resolved Help Using String with Classes

a3deluxe

New member
Joined
Apr 28, 2022
Messages
1
Programming Experience
Beginner
Hello good day.
Needed a help in the following:

In this string game, search in drive c: \ files with exes numbers (1.exe, 2.exe, 3.exe… until 8.exe)

Now I wanted to replace and convert the string.format ("c: \ {0} .exe", selectedgame) by classes (private sub h20 (), private sub h30 ()) to look for the classes instead of looking for the file Drive C: \
VB.NET:
Dim game as string = string.format ("c: \ {0} .exe", selectedgame)

 Private sub setselectedgame (Byval Game As Integer)
       If 1 <= game and game <= 8 then
          SeleCtedGame = Game
          Selectedgamelabel.text = selectedgame.Tostring ()
          SETIMAGES ()
      END IF
  End sub

 Private Sub -Setimages ()
        If selectedgame = "1"
            Selectop.image = my.resources.h20t
            Selectcenter.image = my.resources.h20c
            Backgroundimage = my.resources.h20b
        Elseif SelectedGame = "2"
            Selectop.image = my.resources.h30t
            Selectcenter.image = my.resources.h30c
            Backgroundimage = my.resources.h30b
        END IF
……
 End sub

Private under H20 () ‘Subtites the file 1.exe
        Process.start ("cmd", " /c start /d d: \ h30 \ /wait d: \ h20 \ start.exe -Noconsole")
    End sub

Private sub h30 () ‘Subtites the file 2.exe
        Process.start ("cmd", " /c start /d d: \ h30 \ /wait d: \ h30 \ start.exe -Noconsole")
    End sub
Thanks
 
Last edited by a moderator:

Latest posts

Back
Top