Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. System.IO.File.SetLastWriteTime(ByVal path As String, ByVal lastWriteTime As DateTime)
  2. Oh ok. To create an instance of any class in your app with a string, use this code: Dim X As Form X = CType(System.Reflection.Assembly.GetExecutingAssembly.CreateInstance("MyNameSpace.Form1"), Form) X.ShowDialog() I know this isn't exactly what you wanted but it's a start, and just off the top of my head.
  3. You can't reference an instance of a form by it's name at the best of times, let alone if all you have is a string. Consider a public hashtable, with which you could associate text with your form instances.
  4. Ok, I think the best way would be to remember that forms are just classes, nothing special about them. If you're running a method on a class, and you want that class to be able to interact with the calling class, it must have a reference to the instance you called it from. Personally I think the best way is to do it in the constructor of the secondary form: Public Sub New(frmCreatedBy As Form) m_ParentForm = frmCreatedBy ... End Sub Modify your constructor by putting in that parameter, and declare a class-wide private member variable called m_ParentForm (as Form, of course). Now, when you declare a new instance of your secondard form to show, from your primary, you'll have to do this: Dim X As frmSecondary X = New frmSecondary(Me) X.ShowDialog() And there you have it, since you passed the instance of the form you created it from (using the Me keyword) you now have a reference to the primary form in the secondary form. Note that the type is just Form. If you want to access methods and properties specific to your form and not just every class which inherits Form, you'll have to change it to the name of yours. Hope this helps.
  5. Create a module, and make a public collection variable in there to hold all form instances. That is, to all intents and purposes, a global variable. This is a working solution, I've tried it.
  6. You could have a global collection in your project, and inside the constructor of each form you could add the instance to it.
  7. Just pass an instance of the first form to the second when you create it! For crying out loud, this is really quite simple, if it weren't for VB6 allowing this nobody would have a problem. I should write a tutorial on it or something.
  8. a) That's not VB6 code. b) You don't. You write code to keep track of what forms are loaded yourself. VB6 implicitly created an instance of a form with the same name as the form class itself, which led to laziness with some programmers. You should keep track yourself of the instances of forms loaded.
  9. When you compile with debug symbols turned on it inserts them in your compiled assembly, so that a debugger can tell you information about your program when it crashes, what line the error occured on, a stack trace etc. Release mode compiles the assembly without including any of this information.
  10. I've never heard Visual Basic.NET called anything to do with 2002 before, except in warez circles. It is sometimes referred to as VB7 though. I wouldn't try importing VB6 projects, it will try and convert them but it's much better just to re-write them, because then you learn something. I've been learning GDI+ myself, I think it's great.
  11. The Winsock control is not supposed to be used from .NET, there are more functional replacements in the System.Net namespace. The Winsock control does not come with .NET.
  12. Why on earth do you need 7 threads?
  13. divil

    Grab th HTML Code

    Look up the HTTPRequest class.
  14. Of course you cannot remove a selected item if there aren't any. Try wrapping that statement in a Try...Catch block.
  15. You can embed Windows Forms Controls in a web page, just like you could embed ActiveX controls.
  16. Do you mean GDI+ ? I've heard a lot of people saying bad things about Crystal Reports, the same people recommend Active Reports instead.
  17. It should also run on XP home edition just fine. I'm not sure what more you hoped to get by posting on this board, there is a lot of content devoted to discussing the differences (pricing and functionality) between the available versions on the microsoft website.
  18. I dunno, I only had a problem because I was installing from a writable cd drive with Windows XP cd writing extensions enabled. My only suggestion would be to try copying all the cds on to your hard drive, then installing. Copy them all in to the same folder, that works.
  19. I had a similar problem. Is the cd drive a writable one?
  20. It probably won't help, since the methods of doing this are quite different in the two languages. I haven't tried any drag and drop stuff in .NET yet.
  21. You can use the Image constructor to change the size of an image.
  22. I think those are still around in the Microsoft.VisualBasic.Compatibility namespace somewhere.
  23. Any program you write in VB.NET will require a lot more than those two files to run, you should really have the whole .NET framework runtimes (21meg) installed.
  24. All you need is a reference to an instance of the other form, and provided the control(s) are declared public, you should be able to access them just fine.
  25. There could well be a .NET way of doing the same thing, check out the classes in System.Net.
×
×
  • Create New...