Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. You won't have much luck with questions about MFC here, since this board is .NET oriented.
  2. I drive the good old Chevy Cavalier.
  3. I personally don't like MDI and never use it :).
  4. How about using the SetCursor method? You can pass in a Cursor object to it.
  5. Works for me. Are you by any chance using a router? If yes try unplugging the cable from the router, instead of unplugging the router from the modem, this worked for me.
  6. Are you using the .NET's mail classes?
  7. Yes, the View transformation specifies where are you viewing the world from.
  8. You can move the view while leaving other objects in the same place. You just have to build a new View matrix everytime you wish to move the "camera" (which refers to the View transformation). You don't have to be viewing the world from 0, 0, 0.
  9. Are you compiling in Release mode? Do you have access to the source code of the method you are calling?
  10. It is called XML Documentation. VB.NET IDE currently doesn't support it, but C# does. Just place the caret over a method, property etc. and type in three slashes and the IDE will generate required tags. Also, in your project properties you have to set a name for the documentation file and property which specifies whether to create the doc file.
  11. The process prevents your application from receiving messages that would allow it to update itself and its controls, probably because writing to the word file is resource intensive. If you are writing the file in a loop (I never worked with Office automation so I have no idea how it works) then stick Application.DoEvents() somewhere to allow your application to receive messages and update itself. If you are not doing it in a loop but simply calling some method that will write it all at once, create a new thread and save the file in it, instead of the thread your appliaction is running in. (If you need an example just post)
  12. Creating your own form similar to an InputBox gives you a lot more freedom thatn using the ugly looking InputBox. Getting the entered info back to your original form is very easy! Simply create your dialog form, choose buttons that will represent cancel and OK and set their DialogResult property to the wanted one, create a variable that will store the value and a property that will expose the variable, then after the form is closed you can access the property with the wanted value (since dialogs are not diposed automatically). When showing your form show it using the ShowDialog method. That method will return a dialog result, if the user clicked your OK button OK will be returned etc. Don't forget to set the value of the variable, probably during the closing of the form. Now here is some sample code :): Public Class YourOwnInputBox Inherits Form 'store the value Private yourvalue As Object 'Provide access to the value Public ReadOnly Property TheValue Get Return yourvalue End Get End Property End Class 'now to show the form as see what it returns Dim dlg As New YourOwnInputBox() If dlg.ShowDialog() = DialogResult.OK Then 'process the data by using the defined property DoSOmething(dlg.TheValue) End If dlg.Dispose()
  13. The absolute easiest way I see for saving settings is to use XML serializarion (may not sound that simple when you use serialization for the first time :)). When you serialize something using XML the whole state of an object is written to a .xml file. Create a class, mark it as serializable, make all the variables you need that represent settings and simple serialize the settings when you need to, or deserialize (read back the object into memory) them when you need to. If you need to know how to do that, just post :).
  14. My answer is... don't use an InputBox, it is obsolete. Instead create your own form, which will act as a dialog and assign dialog return values to your buttons.
  15. Look into the MessageBox class, and its Show() method. This method will return the button that the user as clicked as the member of DialogResult enumeration. if(MessageBox.Show("Text", "Caption", MessageBoxButtons.YesNo) == DialogResult.Yes) //the user clicked Yes.
  16. Setting only the LightType property will not do much. Depending on the type of light you must set other properties too.
  17. There is support for VB.NET but code samples are all in C#.
  18. Some pretty impressive stuff :). The long awaited 3.0 support is here!
  19. You could use the assembly information that you can set to store the program title, company name. Then retrieve those strings using the System.Windows.Forms.Application class (It will automatically display that info too if someone views the file properties in Explorer). You don't need a new class for that :). Look for a file called AssemblyInfo.cs in your project and fill in that information there. Just a little observation :).
  20. Don't forget a firewall and an antivirus :).
  21. Are you getting a NullReferenceException? If yes then you probably pressed the button that closed the program before you pressed the button that initialized the process and since there was no error handling to see if the process has started it simply gave you an unhandled exception. BTW. Joe Mamma, if you want the code to be so clean don't use the VB NewLine constant but use System.Environment.NewLine instead; and use TextBox1.AppendText(text) method instead of TextBox1.Text = TextBox1.Text + text. :D
  22. You will have to refernece the System.Windows.Forms assembly (as that is where the Application class resides). Keep in mind, that with that kind of a project type, VS.NET will give you a warning if you reference that assembly.
  23. Is he using VS.NET 2002? I'm not sure but I think in 2002 you had to use the #using compiler statement to reference assemblies. (I might be very wrong about this as I don't remeber excatly :))
  24. ListBox1.get_Items().Clear();
  25. Volte, I think Romero went down together with Daikatana. :)
×
×
  • Create New...