السلام عليكم
انا صنعت login عن طريق txt المهم انا اريد استعمال Checkbox1 لحفظ textbox1 +textbox2 والكود اللي استعملتة لسجيل الدخول هو هذا
Imports System.Net, Microsoft.Win32
Imports System.Management
Imports System.IO
Imports System.Security.Cryptography
Imports System.Text
Imports System.Threading
Public Class Form1
Dim username As String
Dim loginAttempts As Integer = 0
Dim logins As String = 0
Private Sub SugarButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SugarButton2.Click
If SugarTextBox1.Text = "" Or SugarTextBox2.Text = "" Then
MsgBox("Username/Password Error ") '' textBox1.Focus() or textBox2.Focus() ?
Exit Sub
End If
loginAttempts += 1
If logins = 4 Then
MsgBox("You have failed 3 times!")
Application.Exit()
End If
Dim web As New WebClient()
Dim userAccount As String = SugarTextBox1.Text & ":" & SugarTextBox2.Text
Dim response As String = web.DownloadString("wibsite")
If response.Contains(userAccount) Then
''User/pass was found. Success.
loginAttempts = 0
username = SugarTextBox1.Text
MsgBox("Welcome Member : " + username)
Me.Hide()
Else
''User/pass not found.
MsgBox("Invalid Login", MsgBoxStyle.Information)
Exit Sub
End If
End Subانا اريد صنع Checkbox1
