Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. In the closing event type: e.Cancel = True This will stop the execution of the event because you canceled the event.
  2. Look into the System.Diagnostics.Process class. You will be able to retrieve the process by its ID using GetProcessByID method of that class. Process class will also show you various info like the one you want.
  3. You need the instance of the form that you want to access the control from. That would be very simple to achieve. Simply in your class' contructor add one argument to the list and when declaring that class simply pass in the from instance from that argument.
  4. Did you try SelectedIndices or SelectedItems?
  5. That code opens application like you want good for me. Maybe other windows are set as top most.
  6. What do you need help with, errors the formula? Right now I can tell you that you are trying to muliply a string value from the textbox with a double which is not possible. Also the variable total is not needed bcause you are not using it.
  7. You dont need to create any C++ DLL to use GDI32 in your .NET app. You can simply declare the function and use it. As far as comparison goes. A lot of people will say that GDI32 is faster than GDI+. But using GDI+ from .NET is MUCH easier.
  8. That code wouldnt work. You need to create a new instance of the TextBox object, not just a variable of that type: Dim test As New TextBox
  9. This thread for example :): http://www.xtremedotnettalk.com/showthread.php?s=&threadid=78756&highlight=constructor
  10. Yes :).
  11. You dont need to jump to the event handlers. They will be executed automatically when the event is raised. Simply use the Start() method of the Timer and when the interval is reached the code will be executed.
  12. If you want to jump to another sub simply using its name and if required arguments will work. I don't know if Im understanding your question right.
  13. You need the instance of that form. Not just the class name. If you need an example on how to pass form instances between forms search the forums for something like "passing instances" or something similar.
  14. You could use the System.Net.WebClient class which can download a file for you. Dim wc As New System.Net.WebClient wc.DownloadFile("address of the file", "path at which to save it") And then read it. Or if you prefer use the DownloadData method instead of DownloadFile.
  15. You can use the FileSystemWatcher component to monitor any changes to a file. Then in the Changed event of the component read the file again and display its contants or do whatever you want to do with it.
  16. You would have to pass the instance of the first form to the second one to access it from the second form. Here is how you could do it: In the second form find the constructor and edit it so it looks like this: 'a variable that you will use in your second from to reference the nistance of the first one Dim firstform As Form1 Public Sub New(byval form1var As Form1) 'accept an instance of the form firstform = form1var 'assign the passed in instance to the local variable MyBase.New() InitializeComponent() End Sub Then you can access the passed in instance using the firstform variable. Now, when declaring a new instance Form2 declare it like this: Dim secondform As New Form2(Me)
  17. You wont get access to the ComboBox on another form that is already open that way. You need to have the instance of the form that is already open, not create a new one everytime.
  18. You can use the Convert class. For example: Dim s as string = "234" Dim i as integer = Convert.ToInt32(s)
  19. Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing End Sub You can get the code for the event in VS.NET by going to the code view, from the object dropdown on the top left of the code editor select FormName Events and then from the combo to the right select the event, it will automatically add the code for you.
  20. You can use the Closing event or Closed event to execute code you want to execute before or after the form is closed.
  21. Add a reference to the System.Web assembly and you will get access to the Mail classes. :)
  22. Both languages use the Framework to run, but J# gets an additional set of namespaces which provide the functionality from the real Java. Having this, it requires an additional redistributable file.
  23. There is a new version of Java development for .NET. Its called J#. http://msdn.microsoft.com/vjsharp/
  24. mutant

    Maths

    You would have to parse the string and multiply/divide/add/subtract - or whatever you want to do - individual parts of it. And then of course comes the order of operatins :) So lets say you would first search for a parenthesis and then parse whats inside of it. Either regular expressions or String methods like SubString, IndexOf, etc. would be a good way to do it.
  25. File paths could be one problem. (Are you hardcoding any?) Are you distributing all the DLLs you reference? (not the ones from the Framework) There could be many, many problems. Its better to go through all of them one by one than trying to figure them out like this :).
×
×
  • Create New...