473,508 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Vb6 Dailup connection problem

4 New Member
This code works with all types of internet connections,nor dail up i wonder why ?!!!

Expand|Select|Wrap|Line Numbers
  1. On Error Resume Next
  2.  
  3. If Winsock1.State <> sckConnected Then
  4. 'Gets length of chat URL
  5.  
  6. meh = Len(txtsite.Text)
  7. bleh = Hex(Val(meh))
  8.  
  9. If Len(bleh) = "3" Then
  10. bleh = "0" & bleh
  11. End If
  12.  
  13. If Len(bleh) = "4" Then
  14. lft = Left(bleh, 2)
  15. rgt = Right(bleh, Len(bleh) - 2)
  16.  
  17. bleh = lft & " " & rgt
  18. End If
  19.  
  20.  
  21. wlen2 = bleh
  22.  
  23. Pos = 1
  24.  
  25.  
  26.  
  27.  
  28.       While Pos <= Len(wlen2)
  29.           CurChar = Mid(wlen2, Pos, 2)
  30.  
  31.           If wlen2 = "" Then
  32.               wlen = Chr(CLng("&H" & CurChar))
  33.           Else
  34.               wlen = wlen & Chr(CLng("&H" & CurChar))
  35.           End If
  36.  
  37.           Pos = Pos + 3
  38.       Wend
  39.  
  40.  
  41.  
  42.  
  43. 'Does SITEID
  44.  
  45. meh = txtid.Text
  46. bleh = Hex(Val(meh))
  47.  
  48. If Len(bleh) = "3" Then
  49. bleh = "0" & bleh
  50. End If
  51.  
  52. lft = Left(bleh, 2)
  53. rgt = Right(bleh, Len(bleh) - 2)
  54.  
  55. bleh = lft & " " & rgt
  56.  
  57.  
  58. siteid = bleh
  59. resetid.Text = bleh
  60.  
  61.  
  62. Pos = 1
  63.  
  64.  
  65.  
  66.  
  67.       While Pos <= Len(siteid)
  68.           CurChar = Mid(siteid, Pos, 2)
  69.  
  70.           If siteid = "" Then
  71.               siteid2 = Chr(CLng("&H" & CurChar))
  72.           Else
  73.               siteid2 = siteid2 & Chr(CLng("&H" & CurChar))
  74.           End If
  75.  
  76.           Pos = Pos + 3
  77.       Wend
  78.  
  79.  
  80.  
  81.  
  82. 'Does nickname
  83. bleh = ""
  84.  
  85. meh = Len(txtnick.Text)
  86. bleh = Hex(Val(meh))
  87.  
  88. If Len(bleh) = "3" Then
  89. bleh = "0" & bleh
  90. End If
  91.  
  92. If Len(bleh) >= "4" Then
  93. lft = Left(bleh, 2)
  94. rgt = Right(bleh, Len(bleh) - 2)
  95.  
  96. bleh = lft & " " & rgt
  97. End If
  98.  
  99.  
  100. nick = bleh
  101.  
  102. Pos = 1
  103.  
  104.  
  105.  
  106.  
  107.       While Pos <= Len(nick)
  108.           CurChar = Mid(nick, Pos, 2)
  109.  
  110.           If nick = "" Then
  111.               nlen = Chr(CLng("&H" & CurChar))
  112.           Else
  113.               nlen = nlen & Chr(CLng("&H" & CurChar))
  114.           End If
  115.  
  116.           Pos = Pos + 3
  117.       Wend
  118.  
  119.  
  120.  
  121.  
  122.  
  123. SckClient.RemoteHost = txtport.Text
  124. SckClient.RemotePort = "8396"
  125. Command1.Enabled = False
  126.  
  127. SckClient.Connect
  128. Else
  129. MsgBox "Already connected!", vbCritical, "Connection Tester"
  130. End If


Could anyone help please !!!!!!!! :confused:
Apr 25 '06 #1
0 1406

Sign in to post your reply or Sign up for a free account.

Similar topics

3
14494
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there...
4
6751
by: James | last post by:
We've had a recurring problem where all of a sudden we get a DBMSSOCN General Network Error on any page that connects to SQL Server. Then we have to reboot the server and everything works fine...
1
4488
by: Mark | last post by:
I know that DB2 LUW version 8 has "connection pooling" that provides a connection concentrator (limits the number of simultaneous connections that can occur). But does it really provide connection...
35
11338
by: Eric Sabine | last post by:
In my Finally block, I was using cn.close (where cn is an ADO.NET connection object, SQLConnection to be exact) and then I came across the following in some microsoft code. If Not cn Is Nothing...
16
2843
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with...
20
3243
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
1
5100
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from...
1
20548
by: Ryan Liu | last post by:
Hi, I have a 100 clients/ one server application, use ugly one thread pre client approach. And both side user sync I/O. I frequently see the error on server side(client side code is same, but...
0
7118
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5625
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.