Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. I've never had that problem. I don't use anything except IE.
  2. Why are you using an ArrayList? I recommend you make your own strongly-typed collection by inheriting from CollectionBase. You'll also need to implement a typeconverter for tabpages. I've got sample code posted at http://www.divil.co.uk/net/articles/designers/collectioncontrols.asp
  3. The correct way to subclass in the .NET framework is to inherit from that control and override the WndProc method.
  4. I would only load each image once, then keep the instances around and draw with them when required. Any bitmap instance you create you should also Dispose when you're done with it. Also, instead of calling your Paint procedure directly as you are doing I would call Invalidate() instead, to make Windows call it. Just good practice.
  5. Not that I know of. It wouldn't be too difficult to write code to do it manually though.
  6. Sadly there isn't. Hopefully they'll include support for this at a later time. Your VB6 code should still work, though, if you port it.
  7. The pause command isn't a parameter, it's just a command. Put it on a blank line after your csc call.
  8. To enable double buffering for a control, use the SetStyle method in the constructor to turn on AllPaintingInWmPaint and DoubleBuffer. That will enable it. The next thing you must remember to do is do all your drawing in either the Paint event or the OnPaint method if you've overridden it (it doesn't matter which). Next, you must always use the instance of the Graphics class passed to that procedure in the e argument. You don't have to worry about doing anything with offscreen surfaces, Windows Forms takes care of that for you using the fastest possible way (DIB sections). The only caveat is that you must do all your drawing in that procedure. Use the control's Invalidate method or Refresh method to cause it to be invoked if you need to.
  9. Here's some old vb.net code I have to do that, I'm sure you can convert it. Dim myResEnum As IDictionaryEnumerator Dim objResourceWriter As ResourceWriter, objResXResourceReader As ResXResourceReader 'Open read and write resources objResXResourceReader = New ResXResourceReader("myfile.resx") objResourceWriter = New ResourceWriter("myfile.resources") 'Loop through myResEnum = objResXResourceReader.GetEnumerator() Do While myResEnum.MoveNext objResourceWriter.AddResource(myResEnum.Key.ToString(), myResEnum.Value) Loop 'Close up objResourceWriter.Generate() objResourceWriter.Close() objResXResourceReader.Close()
  10. If you're running it with a batch file stick a pause command at the end of it. If you're not running it from a batch file, I suggest you do :)
  11. Unfortunately this is not possible.
  12. This is not a Javascript forum.
  13. Your friend will only be able to hold out so long, then he'll have to move on. MS don't give people like us much of a choice in the matter :)
  14. That control is not free to use. You get a license to use it if you purchase Visual Studio 6, but I wouldn't be surprised if you get unexpected results trying to use it from a .NET environment. You should learn to use the Socket class instead.
  15. Your image is not displaying. You can attach a picture file when you make a post.
  16. vnarod, as I said, INI files have not been a recommended method of storage since Windows 3.1. Time to let them go.
  17. Even in VB6 the best way was to use the CancelError property and trap the error :)
  18. Thanks for the kind words. It makes it worthwhile when I see people learning and using the answers given to them well.
  19. If ofd.ShowDialog() = DialogResult.Cancel Then Exit Sub You should be using that instead of checking the length of the filename.
  20. No offence, but if you're a complete noob in that area why try to write an irc client?
  21. You screwed something up somewhere. Simply applying the below attribute to your usercontrol class will make it behave like a control container (like a Panel). <System.ComponentModel.Designer(GetType(System.Windows.Forms.Design.ParentControlDesigner))> [system.ComponentModel.Designer(typeof(System.Windows.Forms.Design.ParentControlDesigner))]
  22. divil

    C# forum

    There is a forum for questions relating directly to the syntax of C# under the Language Specific forum.
  23. There are plenty of samples out there (even some in the framework sdk) of using the sockets namespace to connect to a host and send data.
  24. It looks like you are trying to call csc twice? There should only be one call when you compile it, with the /resources parameter on the end.
×
×
  • Create New...