Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. Tools > Options > Text Editor > All Languages Uncheck "Hide advanced members" and all members will be displayed in the IntelliSense.
  2. I would assume if it's complaining about not finding an entry point, you're trying to use a C-style DLL from .NET, in which case you've got the name of the function wrong. Can you paste your declare here if it still doesn't work?
  3. The following page in the documentation may help. [mshelp]ms-help://MS.VSCC/MS.MSDNVS/vbcn7/html/vawlkWalkthroughCreatingCOMObjectsWithVisualBasicNET.htm[/mshelp]
  4. Menuitems don't have names. The (Name) property is added by an invisible Extender Provider which is only present at design time.
  5. Ah, I see the problem. You have one of two options, really. If you really want the same instance of the form to be kept around, and made either visible or hidden (this is what I assumed you meant in your first question) you will have to avoid the Close method, and use Hide instead. If you want there to be a new instance created when the user opens it again after properly closing it (with the Close method) you will have to modify the code I gave you originally to detect if it has been disposed of, and if so, create a new instance: If objForm Is Nothing Then objForm = New Form2() ElseIf objForm.IsDisposed Then objForm = New Form2() End If objForm.Show() objForm.BringToFront()
  6. That's not "embedding" classes or methods. In this case, you would define your Pages class, and you would define a strongly-typed collection called ButtonCollection or something. Then you'd make a readonly property in the Pages class called Buttons, of type ButtonCollection. Assuming the ButtonCollection had an Add method, you could then do, Pages.Buttons.Add(blah) For more help on creating a strongly-typed collection, see the CollectionBase class in the help. You'll have to inherit this. If you wanted Pages itself to be a collection, you'd have to have to go two levels higher and write a PageCollection class, and have another class to host a property called Pages, of that type.
  7. My advice is the same as Robby's, read a good book. If this is your first programming language, read _lots_ of good books, and make good use of your help files.
  8. No, you can only use a .NET language, such as VB or C#.
  9. I deleted your original attachment because it contained some binaries. However, I did fix your problem, and I have attached a zip file with the working solution in. I tested it with my own MSN Messenger account and I was able to talk to and from it just fine. Your problem was a threading issue. The event was being raised by the dotMSN dll on a different thread than your UI components. It's very important to have all UI components on the same thread, so you have to use the Control.Invoke method to invoke a delegate on the correct thread. You will see I've done this in your main form, by defining a delegate and calling it with parameters. All that was required then was to uncomment the code you'd already written in your Conversatie form and it all worked. dotmsnzelf.zip
  10. You'd need to keep a variable stored in Form1, of type Form2. Declare it at form-level scope: Private objForm As Form2 Then when the time comes to open/show it: If objForm Is Nothing Then objForm = New Form2() objForm.Show() objForm.BringToFront() Something like that ought to do the trick.
  11. No, you don't have to do anything like that. To call a function in your main form from an mdi child, it's really easy. Define the function in your main form to accept an argument of type Form2, so it can call back to the one that called it, then from inside an mdi child, DirectCast(Me.MDIParent, Form1).MyMethod(Me)
  12. selectedItem.Index
  13. Stick an Application.DoEvents() in just before the Sleep call.
  14. I'd use the DHTML Edit control. It may have been dropped in favour of using MSHTML directly, but you're not going to be able to do that in .NET unless you have a handy IOleObject definition around. The DHTML Edit control is still used a great deal. That said, you could probably gain access to the same functions by dropping a webbrowser control on your form and using the HTML DOM to enable editing. It wouldn't contain any of the handy functions the other does for displaying formatting tools, etc, though. Both of those controls can be added to your toolbox, under DHTML Edit Control and Microsoft Web Browser respectively.
  15. I remember that rite of passage well :)
  16. I don't know what to suggest. When you send someone code, the designers find all the design-time stuff fine, because if comes from the code. If your project is not sensitive you could post it here for one of us to take a look at. Otherwise, find the cause of all those build errors. They're all probably caused by something relatively simple at the top of the code, maybe someone inserted an illegal character in the class declaration by mistake.
  17. When this happens to me, a simple restart of the development environment solves my problem. The form is generated from the code anyway, so unless you've changed something in there it should really work.
  18. Yes, there are. I use: System.IO.Path.GetDirectoryName(Application.ExecutablePath)
  19. Today I was pointed to the following document on MSDN. It is a good read, and a must for anyone wanting to exploit the .NET framework to get the best code possible. It also provides a lot of background information on how the framework works. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/dotnetperftechs.asp?frame=true
  20. There is no Masked Edit control in .NET. You shouldn't use the COM one either. I suggest you validate data using a normal textbox instead. I wrote this tutorial on doing custom validation, and it could be expanded easily using regular expressions.
  21. foreach(Form f in this.MdiChildren) { if (f is Form2) ((Form2)f).UpdateControls_BackColor(); }
  22. Ah, that had not occured to me. Structures are value types, and therefore when you make a reference to them as members of another object (as you are doing here) their value is put on the stack and any change to them would not affect the original one stored in your object. This is why you're not allowed to do this. Take the Size structure used extensively in Windows Forms, for example. You cannot do Me.Size.Width = 500 because of this exact reason. The only way to do this (as far as I know) is to use a class instead of a structure. This won't add much overhead compared to a structure so there isn't much to lose.
  23. If what you are using is really that processor intensive, I suggest you read up on the ThreadPool class. It can be passed a delegate to add to a queue of threads, managed by the system. I haven't used this class yet myself so I can offer little more than the advice to look it up and see if it's appropriate for your needs. [mshelp]ms-help://MS.NETFrameworkSDK/cpref/html/frlrfsystemthreadingthreadpoolclasstopic.htm[/mshelp]
  24. kante, you can't expect people to write a complete application for you. Somebody might, if you are very lucky, but I would be surprised. You should find some samples online (there are bound to be dozens) and then try and make your own. If and when you run in to a specific problem, post a question here and it's likely somebody will be able to help you.
  25. divil

    the framework

    No, .NET applications need the framework to run. It's 21megs, not 30, and an unavoidable dependancy. For more info, see the Deployment forum.
×
×
  • Create New...