dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: TCP/IP Smart Device Application...

  1. #1
    Join Date
    Mar 2006
    Posts
    228

    TCP/IP Smart Device Application...

    Hello,

    I am a beginner with vb.net.

    I have used VB6.0 but now I’m trying to learn vb.net.

    VB6.0 has a control called 'winsock' that allows to connect to things.

    However I could not find winsock in vb.net into I did some research and found an example on how to use winsock in vb.net (and it works).

    Few Questions I’m having trouble with is:

    1. How to create a smart device application that will allow to run on Windows Mobile and WinCE?
    - I have done the following to make a smart device application:
    Clicked 'file' > 'New' > 'Project'
    then selected 'Smart Device Application' then choose 'Windows CE' and 'Windows Application'
    but when I test it (run the code), it comes up with 'deploy' and it comes up saying emulator is missing or something like that, and it also comes up with build errors.. Am I missing anything?

    Is there a way of running the code on a PC while creating the app and then copy the app to mobile or winCE as well.. or do I need to create the file in a different way to test on WinCE and mobiles?


    2. How to connect to a IP address and send a receive data (text strings) when creating a smart device application?

    Hope someone can help me out..

    Thanks.
    Last edited by aaronking; November 27th, 2008 at 10:33 PM.

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,330

    Re: TCP/IP Smart Device Application...

    VB6.0 has a control called 'winsock' that allows to connect to things.

    However I could not find winsock in vb.net into I did some research and found an example on how to use winsock in vb.net (and it works).
    In VB.Net you use the system.net.sockets class There is some sample code included with VS and it is covered in the help files. Most likely for the handheld device you will be wanting to look at the TCP client version.

    Few Questions Iím having trouble with is:

    1. How to create a smart device application that will allow to run on Windows Mobile and WinCE?
    - I have done the following to make a smart device application:
    Clicked 'file' > 'New' > 'Project'
    then selected 'Smart Device Application' then choose 'Windows CE' and 'Windows Application'
    but when I test it (run the code), it comes up with 'deploy' and it comes up saying emulator is missing or something like that, and it also comes up with build errors.. Am I missing anything?
    The windows mobile sdk most likely, I think that is what includes the emulators but can't remember for sure as I have a lot of stuff installed here for these.

    Is there a way of running the code on a PC while creating the app and then copy the app to mobile or winCE as well.. or do I need to create the file in a different way to test on WinCE and mobiles?
    If you have active sync installed on the pc and the handheld device in a cradle with usb connection then yes you can click run and have the code load and run on the device. You can get debug info and set breakpoints on the pc but you can not modify the code while it is running. If a change must be made you must stop the program, make the change the run it again.

    2. How to connect to a IP address and send a receive data (text strings) when creating a smart device application?
    That is a bit more difficult. Look for the TCP samples that should be installed on your pc and/or the online help under TCP client. There are two flavors async and sync depending on what you want to do. e.g. Wait for a response or continue processing the next line of code. It is a bit more difficult to use than the winsock control in VB6 but gives you more options.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)