Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. Thats not an issue with VB.NET. Thats how most installers work, one installation has to be finished before the other one begins.
  2. You can make a constructor for your class like this: 'constructor is always callled New Public Sub New(ByVal filepath As String) 'Accept a string that will contain the path 'do something with the file End Sub Also if you need an array that needs to change size dynamically you could consider using an ArrayList, in which you can put any object and expand it as you need to.
  3. Are you saying that the rtf breaks into couple lines but you want to write into a single line using WriteLine? If there are new lines in the rtf it will be carried over to the next line.
  4. Could you show the actual code you are using to write it to the file? :)
  5. You can use the ActiveControl property of the form to get the active control. Then you can check what type of control it is: If TypeOf Me.ActiveControl Is Button THen 'do something End If
  6. You dont usually decrypt the password, but encrypt the string you want to compare to the encrypted one to see if they are the same. Framework has a handful of classes for encryption like MD5 or SHA.
  7. PictureBox1.Image = Image.FromFile("path to the image") :)
  8. mutant

    Dll

    Any program written in .NET language should run on all platforms that can support .NET framework. Right now only Windows can fully support it, but implementations for other platforms are coming.
  9. Dim webc As New System.Net.WebClient 'new WebClient Dim b() As Byte = webc.DownloadData("webste address") 'download the data to a byte array dim html As String = System.Text.ASCIIEncoding.ASCII.GetString(b) 'decode the bytes into a string :)
  10. What is the problem you are having?
  11. You could use the Replace method of a string: dim str As String = "[string1];[string2]" str = str.Replace("[", "")
  12. Commercial games dont use GDI for games :). If you want to use the graphics card you have to look into a graphics API like DirectX, which uses graphics hardware. GDI is not hardware accelerated.
  13. For Win98 this should do it: Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Integer, ByVal dwReserved As Integer) As Integer 'constant names speak for themselves : ) Const EWX_LOGOFF = 0 Const EWX_SHUTDOWN = 1 Const EWX_REBOOT = 2 Const EWX_FORCE = 4 'then in some sub or function ExitWindowsEx(EWX_REBOOT, 0) 'or whichever you want to do Note that this will not work on Win2000 and NT type of OSs.
  14. http://www.allapi.net contains the most commonly used API declarations and a description for them. For memory you could try using the GlobalMemoryStatusEx API. Remeber: That site contains declarations for VB6 so you have to change all declarations As Long to As Integer because VB6's Long is equal to .NET's Integer.
  15. I said native .NET control. I was just saying that the Framework doesnt have a MeskedEditBox built into it, you would have to create one yourself or fnid one. I thought about it :) If I misunderstood your question then just ask again.
  16. The file holds debugging information about your application. It allows incremental linking of your app.
  17. If im understanding right what you mean by saying it puts it in the title, then I dont have that problem, it works all right for me. What code are you using the create the TextBox?
  18. Once you learn the concept of object orientation you will discover that it is one of the most useful things in programming :).
  19. 'in your second form from which you want to edit the first one... Dim firstform As Form1 Public Sub New(byval formone As Form1) firstform = formone InitializeComponent() MyBase.New() End Sub Now you can access the first from with the firstform variable. And now when declaring Form2, pass in the instance of form1 to it: Dim f2 As New Form2(Me)
  20. MS made a funny mistake with the Managed DirectX, they timebombed the Summer Update Managed DirectX assemblies. (It stopped working today). Microsoft representative said that they simply forgot to remove the limitation from the assemblies :). I just thought I would share this :).
  21. How is it not working? Is it giving errors or what? :)
  22. You can acces the menu items of the parent by using the MDIParent property of the form: 'lets say you want to change the text... Me.MdiParent.Menu.MenuItems(0).Text = "New menu text" 'or if you want to click it... Me.MdiParent.Menu.MenuItems(0).PerformClick() You just have to change the index to the one you want to use.
  23. You can achieve that result by using the ChangeDisplaySettings api. But not many people like their resolution being changed without asking unless its for a game.
  24. You can put them wherever you want. Good way would be to put them in the same folder as your application so you can easily get to them from wherever your application is by using Application.StartupPath which returns the folder in which the exe is.
  25. You can check if the Text of the Textboxes is empty or not and if it is then stop the execution of the calculation. If TextBoxObject.Text = '" Then 'tell the user to input something End If
×
×
  • Create New...