Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. Well it can't be better than VB.NET because its an IDE, not a language. But it would be a lot better than a standard version of VB.NET IDE. It will give you access to more languages from the IDE, more tools, DB tools, XML tools, and yes you can make websites in it.
  2. mutant

    Mesh imports

    DirectX uses .X files as its format. All the major 3D graphics designer programs should have the ability to export to an .X file, or at least have plugins for it.
  3. If you are looking for some kind of books if you don't like tutorials, then the best thing to do would be maybe go to amazon.com and search their books for the term OOP. It will come up with quite a few books, one is from MS Press and it talks about OOP in VB.NET and C#, could be good.
  4. You should think about making a spalsh screen for that kind of thing. Here is one example: http://www.xtremedotnettalk.com/showthread.php?s=&threadid=77706
  5. None of .NET DLLs have to registered. Are you looking for some particular DLL with some methods you need or what?
  6. mutant

    Buttons

    Binary files refers to an executable file or a DLL.
  7. If you simply wish to start a normal HTML file then look into the Prcoess class and its Start method. System.Diagnostics.Process.Start("filename") If it is a compiled HTML Help file, look into Help Provider control, it will help you with manipulating HTML help files.
  8. Cast the sender object into a Label object: DirectCast(sender, Label).Text = "something" Now you will be able to access the properties of the sender so you can figure out which control it was.
  9. Go to View menu, then Other Windows, and click Ouput. The window should be visible now. If it gets hidden when debug starts, simply do the same thing to make it visible again,
  10. Output window is in VS.NET now. The next release will be 2004.
  11. This is not supported in VS.NET now, but it probably will in the next release.
  12. It is possible. You don't need to register a .NET DLL so all the person has to do is replace the DLL.
  13. Well the New keyword is used for creating new instances of an object by calling its constructor. There isn't much more you can do with it :).
  14. In your example a variable is declared, named MyForm. What is done after that is a NEW instance of the class named frmExample is assigned to the variable called MyForm. So yes, the form contained in MyForm is a new instance of frmExample. Now your variable contains an instance of the frmExample class. Declaring like this: Dim frmExample As New frmExample Would work, but you would probably get into name conflicts, which makes programming much harder.
  15. That will cause a compiler error if you have Option Strict On, which you should have.
  16. Upgrade wizard is never the best thing to use. For writing to a file, look into the System.IO.StreamWriter class. Then use its WriteLine or Write methods to write to the file. Also, don't forget to use the Flush and Close method to make sure everything is written to the file.
  17. Im assuming that you wish to close all instances of your program. Here is one other way you could do it. It eliminates the use of GoTo and the FindWindow API. 'decalre the API like you already did Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal hwnd As IntPtr, _ ByVal wMsg As Integer, _ ByVal wParam As Integer, _ ByVal lParam As Long) As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'declare a process array and fill it with each process that matches the name Dim processes() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName) 'loop through each returned process For Each p As Process In processes 'send the close message to each window with the same process name SendMessage(p.MainWindowHandle, &H10S, 0, 0) Next End Sub :)
  18. How are you making the cards different? Do you have some kind of an enumeration with all possible kinds or what? If you have an enumaration, it would the easiest way to do, using the Random object.
  19. Did you initialize your array? How do you declare it?
  20. What line do you get the error on?
  21. When compiling you can use the DEBUG compiler value. First you have to use the special If statement which is only read by the compiler. It looks like this: #If DEBUG Then 'do something if the program is compiled in DEBUG mode. #End If This kind of If statement will not be included in your program but rather the compiler will decide which code to compile based on the build configuration. To apply it to your program you would have to use DEBUG build for testing and RELEASE for distribution (which is the setup you should be using :D). It would look like this: Catch ex As Exception #If DEBUG Then Stop #Else 'Process the error #End If End Try
  22. You can use the MeasureString method the graphics object. You can create a Graphics object for your form, then call the MeasureString method while passing in the the text you wish to measure and the font of which to return the measurement. You also have to add a little to the Width of the returned size because with the width of the font you might not be able to fit all digits in the textbox because of the TextBox's border. Here is a quick example: 'g will be the graphics object 's will be the size which will be applied to the textbox 'txt will be the name of the textbox 'start by creating the graphics object Dim g As Graphics = Me.CreateGraphics() 'declare a Size object and fill it with the measurement Dim s As Size = g.MeasureString(txt.Text, txt.Font).ToSize 'add some to the width to compensate for the border s.Width += 3 'set the size to the textbox txt.Size = s 'don't forget to dispose of the graphics object g.Dispose()
  23. What code? You need to give more details than what what you did give :).
  24. It could be slower but by very little. .NET compiles each method only once, the first time its executed. Also the .NET compiler makes heavy optimization to your code. The JIT for .NET does its job very very well. Overall, you don't have to worry about speed much, even with 3D games the perfomance loss with managed code is very small.
  25. I never had this problem so I don't think I can help you withmaking VS recreate the file. But what you could do is, copy all your code and then simply delete the form, create a new one and paste back the code you had.
×
×
  • Create New...