-
December 8th, 2006, 04:28 PM
#1
Help me using winsock in Windows forms...
Hi everybody. I'm new in this forum and also in VC++. In a windows form project, i'll transmit a text data by winsock. I did this in console, but i don't know how to do this in form application. For example, where should i define my objects and functions. As i know In Form.h , i can't define a new class, so how this will be possible? And which libs i have to use? Please help me about this, cause all examples i've read tells me about winsock in console applications...
-
December 8th, 2006, 04:54 PM
#2
Re: Help me using winsock in Windows forms...
Originally Posted by Noreturn
As i know In Form.h , i can't define a new class, so how this will be possible?
Are you sure about that? AFAIK there is no limitation on how many classes you can declare in a header-file. Anyway, if you don't want to do that you can simply add you own header file.
Originally Posted by Noreturn
And which libs i have to use?
Depends on the function you use. You can find lots of documentation on msdn.microsoft.com.
Originally Posted by Noreturn
I did this in console, but i don't know how to do this in form application.
Only difference is that you don't want to use blocking socket calls in the main/GUI thread, that would make you application appear to have 'freezed'. You should take a look at WSAAsyncSelect or WSAEventSelect.
- petter
-
December 8th, 2006, 05:25 PM
#3
Re: Help me using winsock in Windows forms...
Thanks for ur help wildfrog, i'll try ur comments. But i think i'll deal with using this functions under my GUI. Anyway. I must learn too many things...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|