Jump to content
Xtreme .Net Talk

jmcilhinney

Avatar/Signature
  • Posts

    110
  • Joined

  • Last visited

Everything posted by jmcilhinney

  1. jmcilhinney

    Sleep

    I don't mean to be rude, but I would think that using a loop to create a delay would be frowned upon in polite circles.
  2. jmcilhinney

    Sleep

    You can also explicitly call Me.Refresh() (or Button1.Refresh() and Button2.Refresh()) just before the call to Sleep() because basically your code doesn't allow the time for an implicit refresh. I agree with IngisKhan, though, that putting your main thread to sleep is a bad idea. Your app will be completely frozen for that time.
  3. A quick explanation of Generics is that they are collections, equivalent to ArrayList, HashTable, SortedList, etc. that can be strongly typed simply by you designating what type they accept at design time. That way, instead of a Collections.ArrayList being able to contain an Integer, a String and any other Object you care to Add to it, a Generics.List that you declare as being Of Integer will throw an exception if you try to Add anything but an integer to it. In the case of a SortedList or HashTable, the Generics version requires you to declare the type of both the keys and the values. You can declare either as being Of Object if you only want one to be strongly typed.
  4. Don't know if anyone's still interested in this thread but you can use Process.Start to initiate a shutdown. Sounds a bit like using the Start menu to shutdown doesn't it. There is an executable file in the system32 folder named shutdown.exe. It takes various command line arguments that enable it to do various things. I have three shortcuts on my desktop that use it that allow me to log off, restart or shut down with one click. Use the command prompt to get all the details about the arguments and use Process.Start("shutdown", <arguments>) to initiate it.
  5. Go to Edit -> Outlining to see all the outlining options and their shortcuts. Also, I heard an unofficial shortcut elsewhere: press Ctrl+A and then press Tab to expand everything. This works in VB because all the code is reformatted when you press Tab. It would actually Tab every line along in C# so best not do it there.
  6. Is this the only issue of this type that you are having? Do you have McAfee Enterprise 8 on your machine? There is apparently some kind of conflict that causes visual data loss. If this is your problem, McAfee have a patch available.
  7. I think you can put MessageBox.Show into the constructor code of your control and they will be displayed when you create an instance in the designer. This will tell you where you are in your code and should help you narrow down where the error is coming from.
  8. See if this works as a temporary solution: right click on your project in the Solution Explorer and select Debug -> Start New Instance.
  9. Yes and yes. For VS.NET 2003, get Skybounds free VisualStyles component from http://www.skybound.ca
  10. I know this is an old thread but I'm new here today and I was answering a question today on a different forum regarding overloading and optional parameters. While there is nothing wrong with overloading the constructor in this case, use of an optional parameter would be appropriate. You want a default category for when one is not provided and that is exactly what an optional parameter provides. The only issue might be that you need to declare the default value in the method definition, which might be impossible if your category is a complex object.
×
×
  • Create New...