if not aufzählung

08/05/2015 09:26 ElswordHackerAgain!#1
und zwar versuche ich die ganze zeit einen weg zu finden um eine aufzählung für die if sache zu machen das problem dabei ist ja der boolean , hier mal der beispiel code:


PS mit select case komm ich leider nicht klar ...
08/05/2015 09:37 Serraniel#2
Wenn du unbedingt 2 If haben willst:
PHP Code:
If Not TextBox1.Text "game" Or "Game" Then 
Meine VB.Net Zeiten sind schon was vorbei aber das sieht mir falsch aus.

Versuch mal
PHP Code:
If Not (TextBox1.Text "game" Or TextBox1.Text "Game"Then 
Ansonsten kannst auch oBdA. über die UpperCase Funktion einfach GAME checken.


Ansonsten eleganter wäre natürlich if else.

PHP Code:
If TextBox1.Text "game" Then
 
// Aufgabe
Else
//Fehler ausgeben
End If 
08/18/2015 15:08 GinChilla#3
Wie von Serraniel schon erwähnt, If Else ist das einfachste.


PHP Code:
If TextBox1.Text "game" Then
Try
Process.Start(gamepath(logisch)
Catch
MsgBox("Cant find game"), MsgBoxStyle.critical"Error")
End Try
Else
TextBox1.Text "game" Or "Game" Then
MsgBox
("False game name"), MsgBoxStyle.critival"Error2")
End If 
Versuchs mal so(: Hab allerdings auch sehr sehr lange nichts mehr mit VB gemacht.

lg Sunny
08/22/2015 20:21 .Nexitis#4
Kurze Version:
PHP Code:
If TextBox1.Text "game" Then
Process
.Start(gamepath(logisch)
Else
MsgBox("Cant find game"), MsgBoxStyle.critical"Error")
End If 
€ Grade gesehen das der Thread halben Monat alt ist. Sry.