Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. divil

    Module scope

    Correct. [edit]Bah, I was beaten to it.[/edit]
  2. Anyone considering developing a Windows Forms application with anything but the most sparse interface should read this excellent FAQ. http://www.syncfusion.com/FAQ/WinForms/default.asp
  3. Is there not a Marshalling attribute which will pass a pointer to the variable rather than the variable itself?
  4. http://msdn.microsoft.com/vbasic/downloads/samples/default.asp Go there. Get the sample entitled "Create an Explorer Style Application". That includes an example of showing a Directory Selection Dialog.
  5. Ideally in .NET you'd use Regular Expressions to do this sort of thing. They seem to have focussed the attention more towards these in the framework and examples I have seen. There is a lot of support for them.
  6. When I said System.Net.Mail what I really meant was System.Web.Mail. Even so, typing "SMTP" in to the help search box takes you straight there, so nil points for research!
  7. That would be a Bad Idea. Use the .net way, with the classes under System.Net.Mail instead.
  8. Dim x As String = "I, like, cheese" Dim y As String() = x.Split(", ".ToCharArray) You'll get "I", "", "like", "", "cheese" Don't really know why is puts blanks in there like it does.
  9. System.IO.Directory.CreateDirectory()
  10. You're welcome :)
  11. Here it is:
  12. Here's a sample I knocked up for you, it owner draws a listbox to show installed fonts.
  13. You have to add it to the toolbox manually, right-click on it and select Customize Toolbox
  14. divil

    well..

    You shouldn't be using CreateGraphics. That defeats the point of all the double-buffering and painting management that is there for you. You should be using the Graphics object passed to the Paint event through e.Graphics. Then it knows what to do with it.
  15. You messed something up, somewhere. Adding a usercontrol and changing it's name (in the class declare) is all you need to do. You'll probably change its filename too. Build your project and the new control will appear on the toolbox for Windows Forms in the project.
  16. divil

    wait for process

    A nicer way would be to use the event-driven method: Dim WithEvents myProcess As Process Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click myProcess = Process.Start("c:\windows\notepad.exe") myProcess.EnableRaisingEvents = True End Sub Private Sub myProcess_Exited(ByVal sender As Object, ByVal e As System.EventArgs) Handles myProcess.Exited MessageBox.Show("Exited!") End Sub
  17. myMailMessage.Attactments.Add(attachment) Where attachment is an instance of a MailAttachment class.
  18. divil

    well..

    As long as you are actually doing all your drawing in the Paint event (or in your override of OnPaint) that should double buffer nicely.
  19. Then you're declaring it wrong. Declare it as frmMain, not Form. Or cast it when necessary.
  20. If you look up Double Buffering on drawing graphics, you could avoid the flickering problem.
  21. I don't know java, but there is nothing that is called when the class is loaded in to memory. You can use the constructor for when the class is instantiated.
  22. No, structures and classes are equally useful, they are value and reference types, respectively. Classes derive from MarshalByRefObject, structures do not.
  23. There is really no point in using modules when you could use shared methods of classes instead.
  24. System.Threading.Thread.Sleep()
  25. System.IO.Path.GetTempPath()
×
×
  • Create New...