|
-
May 11th, 2002, 05:05 PM
#1
Winsock isnt working, help
I cant find the winsock control in my VS anymore. I made an application with winsock while ago and I could see the winsock control on the toolbar. But for some reason it is not there anymore. I reinstalled VS, but that didn't help.
When I open my old program which used winsock, I see the old vb6 winsock instead, and the task list shows this error too: Error reading resources from the resource file for the default culture: Invalid ResX input.
plz help, I am lost!!
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
May 11th, 2002, 09:13 PM
#2
use the System.Net.Sockets namespace and the TcpClient and TcpListener classes.
-
May 12th, 2002, 04:43 PM
#3
tnx but why cant I see the winsock control?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
May 12th, 2002, 04:49 PM
#4
From what I understand it uses a lot more resources to use a COM control like the winsock compaired to classes that are in the framework. This is because it must create a wrapper class to hold the COM component from what I understand. It creates more overhead. The framework classes will be much faster.
-
May 12th, 2002, 05:28 PM
#5
but anyways, how do I get the poor old winsock control to work? I want to try working with the ActiveX version first, then maybe I'll try it with the framework thing that Cander said
any ideas why it's not showing up in the components list?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
May 13th, 2002, 03:56 AM
#6
Frenzied Member
-
May 13th, 2002, 08:47 AM
#7
MrPolite your killing me.
I hate brining up this arguement, but you really should do it the .NET way. Using COM give huge over-head(ok that sounded a bit dirty) and the app becomes unmanaged, meaning its not fully working under the framework anymore. It is just not smart to do something that is going to use up more memory when a much better way is included with the framework. Dont let bad habits form early.
Let me show you why using COM causes the over head. When you add the reference to an COM component in Visual Studio, it creates a wrapper class. So what happens, when you call winsock methods it has to go through the wrapper dll it makes, then the winsock, then the winsock calls the apis, then api's do whatever with the OS. See all those steps? If you use the framework way, you have like 2 steps.
I hope I am helping you understand why you really need to be learning the .NET classes and not trying to use all your old COM components unless absolutly necessary.
Finally as far as why winsock is not working anyway, as it it still should work, I really dont know. Like I said Visual Studio is supposed to create that wrapper dll, but I dont know what is causing that problem as it seems lots of people are having the same problem. Maybe its Microsoft's way of telling you 'What the hell do you think you are doing? use the System.Net.Sockets classes fool?'
LOL
Sorry to be so long winded, but it has been my quest to help people understand why they need to get off the COM ideology when switching to .NET. It is like buying a car with a high end CD player only to replace it with a crappy one!
-
May 13th, 2002, 01:07 PM
#8
-
May 13th, 2002, 01:24 PM
#9
yeah most everything you ever did before has a way to do it just using the framework classes. All the controls are(listbox,textbox,etc) are a part of the System.Windows.Forms namespace.
That is what you need to understand and learn are these namespaces and how to use them..like for isntance, to create a new textbox on a form
Public myBox As New System.Windows.Forms.TextBox
' set all properties you may want like text, size,etc.
myBox.Text = "Click Me"
yourform.Controls.Add(myBox)
non visual controls are basically the same, except you dont add it to a form collection
Public mySocket As New System.Net.Sockets.TcpClient
mySocket.whatever = "blah"
and so on...
look at the post called silly api question for a link to a class browser and my tips on using wincv.exe to learn more about a specific class/object
Finally here is a link to get you started on using the .NET socket stuff with code.
http://msdn.microsoft.com/library/de...et08282001.asp
-
May 13th, 2002, 01:31 PM
#10
-
May 13th, 2002, 01:42 PM
#11
To feel superior! 
Actually just think of the IDE as a luxury. Dont depend on it. You should know what is going on behind the scenes when you add a textbox, button, or whatever. Try learning how to create a windows form/size it/ location and put controls on it using just plain notepad and learn to use the comman line compiler vbc.exe. If you can do that, you have taken a big step in undestanding .NET programming better.
Dont get me wrong and think I am telling you not to use the nice graphical IDE, im just saying you really need to know the code it creates also to really understand .NET. Sure it is great to just be able to drag and draw that button, but a monkey could do that!
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
|