First off let me say if this is in the wrong forum i sincerely apologize. I put this is the delphi/pascal forum but haven't gotten much back from that. so I thought I may try it here to see if some help would be available.

The code I did in delphi works without any problems whatsoever. Because I want to have this do the exact same thing in VB6, I am running into some problems of course... Like, It isnt working. At all.

This is what I have done thus far... I dont get any errors, but I also don't get the result I need either. The VB6 code for each 'sub' is above the delphi code for that procedure.

Private Sub Command1_Click()
Form1.Visible = True
Form3.Visible = False
' work on actually unloading form3 instead of hiding it
End Sub

'********** Delphi Equivalent *****************
'procedure TAuth.Button1Click(Sender: TObject);
'begin
'MainForm.Visible := True;
'Auth.Destroy;
'end;
'*********************************************************
'*********************************************************


Private Sub Form_Load()
Form3.Height = 1410
Form3.Width = 1695
Command1.Visible = False
Label1.Caption = "Checking..."
Text1.Text = "abc123"
Winsock5.Close
'Winsock5.Connect "A-WEBSITE.COM", "80"
Winsock5.RemoteHost = "A-WEBSITE.COM"
Winsock5.RemotePort = "80"
Winsock5.Connect
End Sub

'********** Delphi Equivalent *****************
'procedure TAuth.FormCreate(Sender: TObject);
'begin
'Button1.Visible := False;
'VerifySerial.Caption := 'Authorizing...';
'Edit1.Text := 'abc123';
'clientsocket1.Active := False;
'clientsocket1.Port := 80;
'clientsocket1.Host := 'A-WEBSITE.COM';
'clientsocket1.Active := True;
'end;
'*********************************************************
'*********************************************************

Private Sub Winsock1_Connect()
Dim s As String
s = "GET [url]http://A-WEBSITE.COM/index.html[/url] HTTP/1.0" + "#$0D#$0A" + "Accept: */*" + "#$0D#$0A" + "Accept: text/html" + "#$0D#$0A" + "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" + "#$0D#$0A" + "#$0D#$0A"
Winsock5.SendData (s)
End Sub

'********** Delphi Equivalent *****************
'procedure TAuth.ClientSocket1Connect(Sender: TObject; Socket: TCustomWinSocket);
'Var
's : string;
'begin
's := 'GET [url]http://A-WEBSITE.COM/index.html[/url] HTTP/1.0' + #$0D#$0A + 'Accept: */*' + #$0D#$0A + 'Accept: text/html' + #$0D#$0A + 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7' + #$0D#$0A + #$0D#$0A;
'clientsocket1.Socket.SendText(s);
'end;
'*********************************************************
'*********************************************************



Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim buffer As String
Pause (1500)
buffer = Winsock1.GetData
    If pos("abc123", buffer) > 0 Then
    Label1.Caption = "Authorized!"
        Else
        Label1.Caption = "NOT Authorized!"
            End If
    If Label1.Caption = "Authorized!" Then
    Form3.Height = 2130
    Command1.Visible = True
        Else
        Label1.Caption = "Denied!"
        Command1.Visible = False
        Pause (1500)
        Unload Me
    End If
    End Sub
            
'********** Delphi Equivalent *****************
'procedure TAuth.ClientSocket1Read(Sender: TObject; Socket: TCustomWinSocket);
'Var
'buffer : string;
'begin
'Sleep(1500);
'buffer := clientsocket1.Socket.ReceiveText;
'if pos('abc123', buffer) > 0 then
'VerifySerial.Caption := 'Authorized!'
'Else
'VerifySerial.Caption := 'NOT Authorized!';
'if VerifySerial.Caption = 'Authorized!' then
'begin
'Auth.Height := 135;
'Button1.Visible := True;
'End
'Else
'begin
'if VerifySerial.Caption =  'Not Authorized!' then
'VerifySerial.Caption := 'NOT Authorized!';
'Auth.Caption := 'Denied!';
'Button1.Visible := False;
'Sleep(1500);
'Application.terminate;
'end;
'end;
'*********************************************************
'*********************************************************

Any help would certainly be appreciated... Again, If this needs to be somewhere else, I do apologize in advance.

Thank you. :)

anyone? PLeeeeease? :)

anyone? PLeeeeease? :)

To Be Frank, What You Want,Exactly, As The End RESULT?????????

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.