We help IT Professionals succeed at work.

eVB Start the GPRS connection

368 Views
Last Modified: 2013-12-05
I am trying to figure out how to initiate the GPRS Connection on my pocket pc using eVB.  
I have the application working fine.  And when that connection is already activated no problem.

But for instance when I open the brower and type in a webpage . it uses the connection manager to find
the best connection and then connects me to that then pulls the webpage.  

I just really need to know how to get my app to make that connection as well here is my code so far

Option Explicit
Public data1 As String


Private Sub Command1_Click()
Command1.Enabled = False
Command3.Enabled = False
WinSock1.Connect
WinSock1.SendData ("HELLO~")
End Sub

Private Sub Command2_Click()
   WinSock1.Close
   App.End
End Sub

Private Sub Command3_Click()
Command1.Enabled = False
Command3.Enabled = False
WinSock1.Connect
WinSock1.SendData ("POST~")
End Sub

Private Sub Form_Load()
Dim Sockt As AlignConstants

et Sockt = Connect

End Sub

Private Sub Form_OKClick()
    WinSock1.Close
    App.End
End Sub

Private Sub WinSock1_DataArrival(ByVal bytesTotal As Long)
Dim data As String
Dim tr As Variant

WinSock1.GetData data, vbString, bytesTotal
data1 = data1 + data
If Right(data, 1) = "~" Then
    tr = Split(data1, "^")
    Text1.Text = tr(0)
    Command1.Enabled = True
    Command3.Enabled = True
    Command3.Caption = "POST NUMBERS"
    If UBound(tr) > 0 Then Text2.Text = tr(1)
    If UBound(tr) > 1 Then Text3.Text = tr(2)
    If UBound(tr) > 2 Then Text4.Text = tr(3)
    If UBound(tr) > 3 Then Text5.Text = tr(4)
    If UBound(tr) > 4 Then Text6.Text = tr(5)
    If UBound(tr) > 5 Then Text7.Text = tr(6)
    If UBound(tr) > 6 Then Text8.Text = tr(7)
    If UBound(tr) > 7 Then Text9.Text = tr(8)
    Text10.Text = Abs(Text1.Text) + Abs(Text2.Text) + Abs(Text3.Text) + Abs(Text4.Text) + Abs(Text5.Text) + Abs(Text6.Text) + Abs(Text7.Text) + Abs(Text8.Text) + Abs(Text9.Text)
    WinSock1.Close
End If
If Right(data, 1) = "+" Then
    Command3.Caption = "POSTED!"
    Command1.Enabled = True
    Command3.Enabled = True
    Text10.Text = Abs(Text1.Text) + Abs(Text2.Text) + Abs(Text3.Text) + Abs(Text4.Text) + Abs(Text5.Text) + Abs(Text6.Text) + Abs(Text7.Text) + Abs(Text8.Text) + Abs(Text9.Text)
    WinSock1.Close
End If
End Sub

I thought that Winsock1.Connect should do that for me but it doesnt...

Thanks
scog
Comment
Watch Question

CERTIFIED EXPERT

Commented:
How about C#

Why evB?

Author

Commented:
why?  is it not possible with eVB.  I just have never done anything in C before.. so I don't feel comfortable working in it for a Gui Based Project.
CERTIFIED EXPERT

Commented:

Author

Commented:
It figures,  Experts exchange used to be not so long ago a good place to get answers.... so far the last 2/3 months no one with half a brain has looked at anything i've posted.

CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT

Commented:
Also C# is a Gui based project (Its the same as VB.net)

Author

Commented:
Worked perfectly,  Thanks.  sorry for being so rude,  It just seems like people want you to use other things instead of solving the issues your asking about.
CERTIFIED EXPERT

Commented:
To be honest I have not written eVb since 2003 (Or even have it installed anymore) So sometimes links are the only way. :)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.