1. Create a new project in vb.
2. Go to project Add Module and put the module that you leave at the end of the topic
3. Place 2 TextBox 1 Button, Arrange the design the way you want it
Now let's program
Code to put in the Button Login
Now let's go to the module
Error that was not getting in other forums
~Asianism
(Death Code Team / AG Team)
2. Go to project Add Module and put the module that you leave at the end of the topic
3. Place 2 TextBox 1 Button, Arrange the design the way you want it
Now let's program
Code to put in the Button Login
Code:
If Login (TextBox1.Text, TextBox2.Text) = True Then
Form1.Show () 'Form that will open after login
Me.Hide ()
else
MsgBox ("Login or Incorrect Password") 'Messaging error of casso the users or password is wrong
End If
Now let's go to the module
Code:
Imports System.Net
Imports System.IO
Imports System.Text
Imports System.Security.Cryptography
Module LoginVB
Dim data As String
Public Function Login (ByVal Username As String, ByVal Password As String)
Vb_login_username = "& Username &" & vb_login_password = & s = & do = login & vb_login_md5password = "& Password &" & vb_login_md5password_utf = "& MD5 (Password)
Try
Dim request As HttpWebRequest = WebRequest.Create ("yourforum")
request.Method = WebRequestMethods.Http.Post
request.ContentType = "application / x-www-form-urlencoded"
request.ContentLength = data.Length
Dim rStream As New StreamWriter (request.GetRequestStream)
rStream.Write (date)
rStream.Flush ()
rStream.Close ()
Dim response As HttpWebResponse = request.GetResponse
Dim resReader As New StreamReader (response.GetResponseStream)
Dim str As String = resReader.ReadToEnd
If str.Contains ("Welcome (a),") Then
Return True
Else
Return False
End If
response.Close ()
Catch ex As Exception
Return False
End Try
End Function
Friend Function MD5 (ByVal number As String) As String
Dim ASCIIenc As New ASCIIEncoding
Dim strReturn As String = String.Empty
Dim ByteSourceText () As Byte = ASCIIenc.GetBytes (number)
Dim Md5Hash As New MD5CryptoServiceProvider
Dim ByteHash () As Byte = Md5Hash.ComputeHash (ByteSourceText)
For Each b As Byte In ByteHash
strReturn & = b.ToString ("x2")
Next
Return strReturn
End Function
End Module
Error that was not getting in other forums
Code:
Dim request As HttpWebRequest = WebRequest.Create ("-")
Depends on this link may be so
Depends on Forum
Dim request As HttpWebRequest = WebRequest.Create ("-")
without the / PH /
without the / forum /
can be / local / forum /
Depends on your forum
~Asianism
(Death Code Team / AG Team)
)