Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. The .NET Windows Forms Designers do not support control arrays at this time, but that doesn't mean you can't implement them, and with more flexibility than VB6 too. You just have to declare your array in code, and load and display them in code too. Dim lblDescription(5) As Label Sub InitLabels() Dim intCounter As Integer For intCounter = 0 To 5 lblDescription(intCounter) = New Label() Controls.Add(lblDescription(intCounter)) lblDescription(intCounter).Location = New Point(100, intCounter * 20) lblDescription(intCounter).Text = "Label " & intCounter.ToString() Next End Sub
  2. You should create a new project, and choose Console Application as the project type. You can write to the console using System.Console.WriteLine("hello, world!").
  3. The .net version of that code is almost completely different, mouseslinger :)
  4. Try downloading service pack 2, there was an issue where serialized images would sometimes get corrupted on certain machines.
  5. The code you posted doesn't really help us. Try posting the whole class, in [ vb ] tags, or (better yet) break your problem down and tell us the exact error you get.
  6. I would seriously discourage anyone from upgrading even the most simple of projects, it's far better to just learn and do it yourself.
  7. Except there is no Set keyword in VB.NET.
  8. Are you specifying the owner form when calling the showdialog method? i.e. myForm.ShowDialog(Me)
  9. Somewhere on MSDN is an article explaining how to include the .net framework in your setup package.
  10. On Error is there for legacy purposes, Try Catch is for structured exception handling. Your help file can explain it far better than I have time to.
  11. You've already got a variable called e, which is being passed to the subroutine. Just Catch ex As Exception instead or something.
  12. Yes, you're missing loads of essential code. The commands you're sending the server aren't part of the IRC protocol. You are under the impression that you send the IRC server the same commands that you type in to your IRC client and they'll just work, which isn't the case. You need to read RFC 1459 and make sure you understand it, then learn asynchronous sockets. Aside from answering specific questions, it's out of the scope of this forum to teach you how to do that.
  13. My point is, there are articles on using the win32 api, and there are samples on how to get the win32 api working under VB.NET. .NET is a new language and there aren't necessarily a lot of samples combining those two yet, but that's where resourcefulness comes in. If you don't know what marshalling datatypes means, you may be out of your depth here.
  14. I and many many other people have found it sufficient. Even if it isn't, there are a plethora of tutorials and samples around on the internet, and a million good books on exactly that subject.
  15. They're all explained in great detail in MSDN.
  16. As I said, it will get back the memory when it feels it's appropriate. May I ask why this is an issue?
  17. Garbage Collection is indeterminate, you can't tell when it's going to happen. Whenever it thinks it needs to do a cleanup. You can force it by calling GC.Collect(), but this is really only beneficial if you know you've just finished using a whole lot of objects.
  18. There are some examples on how to marshal datatypes in the framework sdk samples, I found they were enough to get me going.
  19. fm.Icon = New Icon(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("MyNameSpace.explorer.ico")) Check your root namespace by going in to project properties, and that should work ok.
  20. Use square brackets on the VB tags. You can check if the .SelectedIndex property is -1 to see if there is nothing selected.
  21. I would have thought so. ArrayLists are better suited for simple collections where you need to know if it already contains a value.
  22. Control arrays are perfectly possible in .NET, they're just not supported by the designers. Look for this in newer versions.
  23. TextBox2.Text = CType(ListBox1.Items(ListBox1.SelectedIndex), String) Using the vb tags helps people read your code by the way :)
  24. Add them to your project, and mark their Build Action as "Embedded Resource". Then you can get them with Assembly.GetManifestResourceStream() at runtime.
  25. I think if you don't specify a base class to inherit from, it will implicitly inherit from Object, so there will always be a base class.
×
×
  • Create New...