how to use the b4p weblogin

winjiadh

Active Member
Licensed User
Longtime User
I want use the B4P creat a login
how to do it
who can help me
the old forums I can use the search to find the old helps,but the in the new Forums ,how to use the serch?
 

winjiadh

Active Member
Licensed User
Longtime User
'****** Server side *******
'stream is a BinaryFile object, server is a Server object and client is a Client object.

Sub Globals
'Declare the global variables here.

End Sub

Sub App_Start
sform.Show
Server.New1(50000) 'Listens on port 50000 (all ip's available).
Server.Start
Timer1.Enabled = True
End Sub


Sub Timer1_Tick
If Server.Pending = True Then
Timer1.Enabled = False
'Server.New1(50000) 'Listens on port 50000 (all ip's available).
Client.Value = Server.Accept
Msgbox("Server connected.")
stream.New1(Client.GetStream,False) 'Creates a BinaryFile object using the GetStream method.
stream.WriteString("This message will be sent to the client.")
'Do the communication here
End If
End Sub
 

Attachments

  • QQ截图20130827182419.jpg
    QQ截图20130827182419.jpg
    21.3 KB · Views: 740

winjiadh

Active Member
Licensed User
Longtime User
'******Client side*******
'stream is a BinaryFile object and client is a Client object.
'If you are using Activesync to make the connection then the device should be the client and the server code should be running on the desktop before running the client code.
Sub Globals


End Sub


Sub App_Start
Client.New1
Client.Connect(Client.GetIP2("xp"),50000) 'Use Activesync IP.
If Client.DataAvailable = True Then Msgbox("Client connected.")

stream.New1(Client.GetStream,False)
Msgbox(stream.ReadString)
Client.Close
End Sub
 

winjiadh

Active Member
Licensed User
Longtime User
I run the code step by step
run in the "Client.Value = Server.Accept"
the error like the attachment
 

Attachments

  • QQ截图20130827182419.jpg
    QQ截图20130827182419.jpg
    21.3 KB · Views: 748
Top