Solved

Urgent Help Needed

Posted on 2004-09-29
4
609 Views
Last Modified: 2007-12-19
Is there anyway to solve this error?

Error msg: 'State' is a type in 'AxMSWinsockLib.AxWinsock' and cannot be used as an expression.

 Private Sub wsSend_ConnectionRequest(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent) Handles wsSend.ConnectionRequest
        If wsSend.State <> MSWinsockLib.StateConstants.sckClosed Then
            wsSend.Close()
        End If

        wsSend.Accept(e.requestID)

        If wsSend.State = MSWinsockLib.StateConstants.sckConnected Then
            Call WsSendConnected()
        End If
    End Sub


thank you!
0
Comment
Question by:loverbear84
  • 3
4 Comments
 
LVL 4

Accepted Solution

by:
eozz_2000 earned 125 total points
ID: 12187101
Change your code to this:

Private Sub wsSend_ConnectionRequest(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent) Handles wsSend.ConnectionRequest
        If wsSend.CtlState <> MSWinsockLib.StateConstants.sckClosed Then
            wsSend.Close()
        End If

        wsSend.Accept(e.requestID)

        If wsSend.CtlState = MSWinsockLib.StateConstants.sckConnected Then
            Call WsSendConnected()
        End If
    End Sub

I hope this could help you :)
0
 

Author Comment

by:loverbear84
ID: 12187194
thank for ur immediate response
the code work.
Do you have the code on how to send and recieve file from pda to pc and vice versa though gsm/gprs but not web based type. Do you have any example cos really need it urgently, i will increase the point if gd solution is given
thank alot

0
 
LVL 4

Expert Comment

by:eozz_2000
ID: 12187320
Well, is important to know that is an only question per discussion if not be at that way... all of us would do a lot of questions and don't giving any points...
0
 
LVL 4

Expert Comment

by:eozz_2000
ID: 12187326
sorry if this upset you but... the people like to receive points for their good answers :)
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question