Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. Have you considered using WMI to do all this? The framework contains classes under System.Management to aid in using WMI for exactly this type of thing (printer management).
  2. I feel like I'm on a dial-up. Oh wait. I am.
  3. When you start a process using System.Diagnostics.Process.Start, you have the option of redirecting the standard output. Alternatively, there is a method ExecWaitWithCapture of the System.CodeDom.Compiler.Executor class which pretty much wraps this behaviour for you.
  4. It's not worth digging up threads this old. Chances are the guy that posted it is long gone. You can always send a PM if you feel the need to contact him.
  5. You'll have to be a little less vague first. It depends on what database you're using, table and field names etc.
  6. You can't. What a funny idea.
  7. Your code is run when something in the textbox changes, and the code changes the contents of the textbox. If you think about it, your code is going to recurse on itself until it runs out of stack space. The usual way to fix this is with a variable that you can temporarily set to mark the code not to execute, when you change the contents programmatically.
  8. Rows.Find clearly isn't finding anything at all.
  9. Make a VB assembly that calls the method you want, and call the method you write in the vb assembly from C#. C# does not support optional parameters.
  10. I don't understand what you mean by simulator. How is Windows Media Player a simulator?
  11. You don't need to create a type library for this kind of export. Try searching Google for documents on writing C DLLs to be used from VB6 (there are many) and then use the same style declare in VB.NET, doing the necessary conversions (Long becomes Integer, etc).
  12. fantasma62, that's just because the conversion wizard has converted them automatically. They must have been pretty simple projects for it to have worked seamlessly.
  13. This forum software has never worked right for me. It is always thinking threads are unread when they have been (even when mine is the last post) OR thinking that I've read threads that I haven't. I've kind of gotten used to it by now though :)
  14. I suggest you buy a book. In this thread I have given you ample information and walked you through the process of doing what you're trying to do.
  15. I said you could put the Sub Main wherever you like, it doesn't matter. In the code for your main form, select Base Class Events from the left-hand dropdown at the top of the editor, and then Closed from the right...
  16. You don't have to leave us alone, it's kinda what we're here for :) For something like this, you'll want to modify your project startup object. By default your program message loop is set up for one form, but if you want to hide and show another before your main one is displayed, you'll need to change it a little. Go in to your project properties (right click on the project, select properties) and where it says Startup object, select Sub Main. Then create yourself a new class (or you can use an existing one) and make the following method: Public Shared Sub Main() Dim x As Form2 = New Form2() x.Show() Application.Run() End Sub Replacing Form2 with the name of your splash screen, obviously. I'm assuming there is a timer on your splash screen form which, when it fires, will close and dispose of itself and open a new main form. The only other change you'll need to make is to explicitly shut down your program's message loop. To do this, catch the Closed event of your main form, and in it put this line: Application.Exit()
  17. It sounds like the threading capabilities of the .NET framework will be ideal for your needs. As long as you can actually use .NET to develop Outlook addins, you should be fine :)
  18. Windows isn't guaranteed to be realtime in theory, but in practice it'll probably be fine for your needs with threading. I would suggest you read up on the ThreadPool class, since it is geared to create and allocate threads as if sees fit, indented to help with applications such as yours. It would probably save you some code. Maybe if you told me a little more about what your application does I could help further.
  19. You need a reference to the main form to be able to change stuff on it. Since you're trying to change it from an mdi child, this is made slightly simpler. Here's the code: DirectCast(Me.MDIParent, frmParent).sbrMenu.Panels(1).Text = "blah"
  20. To be honest, it really isn't the best idea to try and convert code. The conversion wizard will not give you proper .NET code, rather code geared to work with a special namespace that lets you keep VB6 syntax to a certain extend. This is especially true of applications that use the common controls and the winsock activex control. These are completely redone in .NET and it's much better to rewrite than to try and upgrade, believe me.
  21. Look up the System.Web.Mail namespace in the help. It requires Windows 2000 or XP, but does what you need.
  22. divil

    Documentation.

    With C# you can use the built-in XML documentation feature. With VB.NET I don't know.
  23. There is no need for constants to be shared, since the value of them is compiled in to your executable in any case. I don't understand what you mean about shared enums. Enums are never instantiated, so I really don't know what you mean when you say you want them shared. Shared is a keyword you apply to methods to indicate you don't need an instance of the class to invoke them. As far as naming conventions are concerned, I use what you said.
  24. divil

    Com

    You can't remove it, but you can Exclude it. Highlight the dependancy in the solution explorer and change the property in the property grid.
  25. Awww :)
×
×
  • Create New...