when i press the button, it dont connect, nothing happen
any idea?
VB Code:
Private Sub button_click() Dim hosty As Variant Dim sitey As Variant hosty = host.Text sitey = site.Text Winsock1.RemoteHost = hosty Winsock1.RemotePort = 80 Winsock1.Connect End Sub Private Sub Winsock1_Connect() Dim strCommand As String Dim strWebPage As String strWebPage = sitey strCommand = "GET " + strWebPage + " HTTP/1.0" + vbCrLf strCommand = strCommand + "Accept: */*" + vbCrLf strCommand = strCommand + "Accept: text/html" + vbCrLf strCommand = strCommand + vbCrLf Winsock1.SendData strCommand End Sub Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim webData As String Winsock1.GetData webData, vbString TxtWebPage.Text = TxtWebPage.Text + webData End Sub
