Jump to content
Xtreme .Net Talk

Volte

*Experts*
  • Posts

    2372
  • Joined

  • Last visited

Everything posted by Volte

  1. You would need to code in the resizing yourself... Also, you don't NEED to use a label; you could use the GDI+ (System.Drawing) to draw the text and image.
  2. Not unless you make your own "fake" messagebox using a form and it's ShowDialog function.
  3. Use the SelectedItems collection:Dim si As String For Each si In ListBox1.SelectedItems Label1.Text &= si & ControlChars.CrLf Next
  4. If you put a Textbox and a label inside a panel control, and make all the back colors all white (and take away the textbox border), you can make it LOOK like the title is in the textbox. You can stick it in a UserControl, and add any of the default TextBox features you want into it. Just be creative. :)
  5. I would suggest you look into the System.Text.RegularExpressions namespace (the RegEx class) to use RegularExpressions for matching links. I don't have any examples right now, but there are plenty of examples of matching URLs in HTML using regex on the net. Google :)
  6. You will need to have a seperate button on one of your forms (an Exit button), and the code would look something like this: frm1.Close() frm2.Close() Application.Exit()Or, if you have indeed set a startup form and are not just using Sub Main, closing your main form should do it.
  7. Oh sorry, I didn't realize that the 'button1.click' bit was part of the sub declaration. It wraps around and looks like it's on its own line. You should always use [ vb ][ /vb ] tags to do code: Sub Test() End SubI think the best way to close an application that has no main form is to use Application.Exit() after you have made sure that all your forms and objects have been destroyed. If your project does have a startup form, the program will close itself once you close that form (as in really close it, not just Hide it).
  8. Try changing the 'Me.Close()' line in Form2 to 'Me.Hide()'. Also, you can remove that 'Button1.Click' line from the two handlers, as it's pretty useless.
  9. Paste what code you have.
  10. Well in a class (we'll call it YourClass), you might do this:Public Shared myForm As Form2 = New Form2()Then, to show the form, YourClass.myForm.Show()and to hide it, YourClass.myForm.Hide()
  11. You need to store the instance of the form you wish to hide/unhide (shared in a class, most likely), and then hide and unhide that. Creating a new instance of the form will not work.
  12. Try right-clicking on the project, and clicking Properties. Then, click 'Common Properties -> Build' and then click the 'Change' button at the bottom. At that point you can change the supported platform.
  13. Volte

    DateDiff...

    You can use the Ticks property of the Date returned by Now() to generate a TimeSpan, and use the Subtract function of the date you wish to subtract from. For example, this finds the amount of time until 11/15/2005. Dim future As New DateTime(2005, 11, 15) Dim difference As DateTime difference = future.Subtract(New TimeSpan(Now.Ticks))
  14. Might I ask, why do you need to show the form with no borders or titlebar? This is not the way MDI children are meant to be used, so don't be surprised if it doesn't behave the way you think it should. If you can, I recommend staying with normal MDI windows.
  15. Unfortunately, ListView rows must all be the same color; SubItems will take on the color of their parent.
  16. Volte

    DateDiff...

    You should not use the DateDiff function, as it is a VB6 compatability function. You should use the TimeSpan class quwiltw said. For example, Dim time1 As DateTime = DateTime.Parse("November 27 1987") Dim ts As New TimeSpan(365, 55, 3, 4) Dim newTime As DateTime = time1.Add(ts)This will take the date 11/27/87 and add 365 days, 55 hours, 3 minutes and 4 seconds to it.
  17. A lot of the memory taken up by the application is probably the framework loaded into memory. There isn't really a way around it.
  18. If you want to use this forum, you need a PHP host with mySql, and about $80 for a 1-year license. http://www.vbulletin.com. Remember, You get what you pay for. AspNetForum is free. vBulletin costs lots of money. Think about it.
  19. In the IDE code window use the top-left combo to select the ListBox control, and the right combo to select the event. You can choose the SelectIndexChanged event, for example, to find which item was clicked: Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged MessageBox.Show("You chose item #" & ListBox1.SelectedIndex + 1) End Sub
  20. Just set the Text property of the Combo Box to 'United States' or whatever it is. Make sure that it is exactly the way that it is in the list.
  21. Perhaps you would be able to adapt your Hotspot control or whatever it was that you made for VB6 to .NET and use it for that?
  22. Unfortunately, I'm using a newer beta version of .NET so you won't be able to open my projects; that also might be why my code works for me and not for you. :-\
  23. I'm pretty sure it will be destroyed by the GarbageCollector once you remove it or destroy the ArrayList.
  24. Look into the FileSystemWatcher component.
  25. Well perhaps something else is causing it... this works for me: Private Sub ComboBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBox1.KeyPress If Asc(e.KeyChar) = Keys.Enter Then e.Handled = True End If End Sub
×
×
  • Create New...