Jump to content
DvLrepLay

Visual basic

Recommended Posts

Posted

Salut , vreau sa fac o aplicatie in visual basic dar am o problema , daca userul apasa pe butonul x , executa ce am trecut eu in el

de ex am

   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Len(dns.Text) = 0 Then
MsgBox("Dns-ul nu a fost ales")
End If

......
aici ce sa execute
.....

cum pot face daca if Len(dns.Text) = 0 sa arate msgbox , dar sa nu mearga mai departe

Posted
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

If Len(dns.Text) = 0 Then

Return False

MsgBox ("Dns-ul nu a fost ales")

Else

Return True

End If

End Sub

Incearca asa.

Posted (edited)
If Len(dns.Text) = 0 Then

MsgBox (" Dns-ul nu a fost ales ")

else

MsgBox (dns.text) /sau ce altceva doresti sa faca

End If

sau poti incerca :

If Len(dns.Text) > 0 Then

MsgBox (dns.text) /ce doresti sa faca daca numarul caracterelor este mai mare decat 0

End If

Sunt la fel amandoua ,sa imi zici daca iti merge

Edited by DrGrim

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...