How can I put an If inside another If?
Here’s my code:
If IsProcessRunning("javaw") = True Then
Dim result = MessageBox.Show("message", "caption", MessageBoxButtons.OKCancel)
If (result = DialogResult.Cancel) Then
MessageBox.Show("Cancel pressed")
ElseIf (result = DialogResult.OK) Then
MessageBox.Show("Ok pressed")
End If
This gives me error: I should put End If after if IsProcessRunning() line.
But this will cancel the first If statement and will show the message box if IsProcessRunning is True or False.
How can I fix this? Thanks in Advance.
You’ve just missed off the second
End If, you don’t have to put it where Visual Studio tells you, you just have to make sure it’s there: