Jump to content

Recommended Posts

Posted

i will show you how to make a program to chating

we need visual basic 6

and mswinsck.ocx

First make a new project

Then add component mswinsck.ocx

and add it on form

now make 2 textbox,2 labels,3buttons(for now) look at image:

yl8lmo69dq2k84gt72n7.jpg

now lets write some codes

open command1 = connect button and write:

Winsock1.Close

Winsock1.RemoteHost = Text1.Text

Winsock1.RemotePort = Text2.Text

Winsock1.Connect

If Winsock1.RemoteHost = Empty Then Winsock1.Close: MsgBox "Add Host Or Ip", vbCritical, "Error"

If Winsock1.RemotePort = Empty Then Winsock1.Close: MsgBox "Add Por", vbCritical, "Error"

ok now lets write on command2 = dis button

winsock1.close

and on command3=Exit buttond jus type

end

After this lets add One more button

command5=LocalHost/Ip

in this button type

msgbox winsock1.LocalHostName & "@ " & winsock1.LocalIP

this is show what is the host and ip names

After this lets Make one command more

command6=Chat

now maybe its more complicated

dont write nothing in this command

add a second form in the same project i think u know how to do it

rename it as Chat or write in the main form form2.caption="Chat"

now lets go back to form1 and open the last button6

in this button type

Form2.show

ok now lets work on Form2

width=640 height=480http://www.imageshack.gr/files/61i2k6ybq7cpdccjbq6a.jpg[/img]

now lets make one biGGG textBox

after thiss add 3 new Buttons like this:

width=640 height=480http://www.imageshack.gr/files/dbtsmdmz508h3mjs5cpe.jpg[/img]

now open button1=send on form2!

write

Form1.Winsock1.SendData Text1

now open Button2=Clear text

and write

text1=clear

and at Button3=Exit

type

form2.hide

(OFC u can add multiline on text1 and scrollbars to make it looks better

like this :

width=640 height=480http://www.imageshack.gr/files/sx1ziek6kg41kkvn995q.jpg[/img]

now we need to type in form2

Private Sub form1_winsock1_dataarrival()

Dim Othchat As String

form1.winsock1.getdata(Othchat)

text1=winsock1.remotehostname & " " & Othchat

End Sub

now i think we are ok with client...

lets make A server now :)

now make a new project with Server caption

add 3 buttons again for now

dont forget to add winsock osx again

anyway

type this in form

Private Sub winsock1_ConnectionRequest(ByVal requestID As Long)

If winsock1.State <> winsock1Closed Then winsock1.Close

winsock1.Accept (requestID)

End Sub

 

button1=listen,button2=close,button3=exit

lets write on button1

setRemoteport=inputbox("Set Port:","")

winsock1.close

winsock1.localport =setRemoteport

winsock1.listen

 

for command2

winsock1.close

 

and command3

end

now lets make one more button

command4=ShowPort

msgbox winsock1.LocalPort,vbInformation,""

and add one more button like button5=Chat

command5

form2.show 'we need again one second Form'

Now Lets work on form 2 again

now add text box like the client and 3 buttons like the client

and dont forget to type again

private sub form1_winsock1_dataarrival()

dim inComeChat as string

form1.winsock1.getdata(inComeChat)

text1=winsock1.remotehostname & " " & inComeChat

Good Luck

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Same glitch or "technique" was working on Interlude L2Pride aswell.. only few knew about it!
    • 🌟 Need fast setup and guaranteed warranty? All products are fully tested and delivered instantly 24/7.
    • 7 DAYS TO CLOSED BETA!   WARFRONT Closed Beta begins in just 7 days!    If you're planning to participate and haven't registered yet, please make sure you [b]register now[/b]. If you're coming with friends or your clan, please make sure they register too — registration only takes a few seconds.   https://l2warfront.com/   Over the next couple of days I will begin sending emails to registered players containing: Account registration/access link WARFRONT Game Client WARFRONT Launcher Final Closed Beta instructions Important: Special Closed Beta participant rewards will also be distributed using the email address you registered with, so please make sure you've registered with a valid email you can access.   Closed Beta: 3 October 2026 — 19:00 GMT+0 We're almost there. 7 days. Angels vs Demons. See you on the battlefield.
    • No problem — it will decrypt AA (any chronicles). Text telegram
    • As the title says, we are an International group of players that currently play on Exiliumworld for arround 5 years now and we plan to keep on playing here long term now on. Exiliumworld its a server created on Fafurion client, with new skills added for each class and a completely different gameplay. All classes are good and do great damage, there are new exciting features and party compositions that are incredibly great to be played.   While most of us are Romanians, we also have people from different countrys so English is the main language we use on PvP/TW/Sieges or whenever objective pops on. Our  community runs on Discord, we try to keep it very simple in terms of rules : We dont flame each other, we try to respect each member of this group and overall we mentain a good atmosphere inside the group by always laughing, being positive in any situation and helping each other out with whatever it's needed.   If you also wish to be a part  of our community and play on a server that is opened for over a decade and continues running smooth, always gets updates and fixes, contact me in private on Discord because i won't be active in here. About what classes you can play, we will discuss more details like that when we get in contact. Have a great day, guys and remember : Having a good, stable server and a group of players that respect you and help you whenever you are in need might be the perfect environment for you to grow as a player and also as human being!    CONTACT  DISCORD : pqtestpq_97112 (Me) ash3s8354 (Leader) xmariusx (Subleader)   Whoever you choose to talk to, you will meet a friendly person ready to answer your all questions about our group, server features or explain you all the insights of the server.  P.S. : Don't hesitate to contact us. We also recruit CPs or group of players, not only single players. Have a nice day!   #SABOTAGEclan  
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..