Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. VS.NET should work on Home Edition just fine, except that as it doesn't have a webserver you won't be able to use any of the ASP.NET stuff. Perhaps the dialog explaining this during setup is misleading. Having said that, I've never tried it :)
  2. If you have used Application.Run() with no arguments to start a message loop for your program, you will need to manually call Application.Exit() when all your forms are closed and you are ready to terminate.
  3. Look in to Binary Serialization. You can only serialize types that are marked serializable with the Serializable() attribute though. You should be in luck with this particular class.
  4. Unfortunately the framework doesn't provide a way to automagically do this - you'll have to write the code yourself.
  5. You'd probably have more luck posting this question on the Microsoft newsgroups, in the microsoft.public.dotnet.framework.windowsforms.designtime group.
  6. divil

    Device lost error

    Check out the DirectX 9 samples - they implement a RecreateSurfaces method (or similar, I'm working purely from memory here). You need to check if your surfaces have been lost on every loop and if so, recreate them. Looking at the samples should help.
  7. If you're using .NET you should use DirectX 9, it includes managed classes for most dx technologies. Check out the samples, I'm sure there's one that does roughly what you need, it should be enough to get you started.
  8. It sounds like you're trying to added a reference to a native DLL. You can only add references to .NET assemblies, or COM DLLs.
  9. That's weird... I haven't time to look in to it now but if anyone else finds out why this is happening I'd be interested!
  10. DOS is dead. Time to let it rest in peace :)
  11. Sure - google for "inheriting from collectionbase"
  12. You'd have to loop through checking their .Name property I suppose. Controls don't really have names as such, so if you're creating them at runtime it's best to keep a reference to them around somewhere, either in a hashtable or you can just rely on the .Name property and loop through the Controls collection.
  13. Events are probably the biggest difference between C# and VB. With VB, you use its helper functions to add and remove delegates, and even to call the list of delegates. In C# you have direct access to the event and you add and remove delegates yourself, and just call the delegate list like any other function.
  14. You can't. With a lot of work, you can just about expose a windows forms control as an ActiveX that can be hosted in the ActiveX test container, but you won't get one that will run in VB6.
  15. There is no graphics for console programs. They are win32 executables that have a text interface instead of a graphical one, they are not DOS progams.
  16. You could inherit from TextBox and override the ProcessDialogKey method like this: Protected Overrides Function ProcessDialogKey(ByVal keyData As System.Windows.Forms.Keys) As Boolean If (keyData And Keys.Return) = Keys.Return Then If (keyData And Keys.Shift) = 0 Then If TypeOf TopLevelControl Is Form Then If Not DirectCast(TopLevelControl, Form).AcceptButton Is Nothing Then DirectCast(TopLevelControl, Form).AcceptButton.PerformClick() End If End If Return True Else Return False End If Else Return MyBase.ProcessDialogKey(keyData) End If End Function
  17. ArrayList is pretty much the most general-purpose collection class in the framework, I'd say. The HashTable is useful if you need a collection of name-value pairs. You are encouraged to inherit from CollectionBase to make your own strongly-typed collections :)
  18. Why would you make a property dependant on the index of something in a collection? Why not just make it dependant on the something itself? You can use the collection's IndexOf function to get the index of the something in the collection whenever you like.
  19. You can use the ToArgb() method of the Color class.
  20. I reckon they could well be related. It's the same code handling the scrolling, since Form derives from ScrollableControl too.
  21. I'm not sure what you're referring to, the .net combobox control is just the win32 combobox, nothing special.
  22. There is no such component in the framework. If you want such a control, try clicking on the link in my signature. I developed one which is available free.
  23. This link here: http://www.netcomuk.co.uk/%7Ehanbury/htmleditor.zip Is on the main page and contains full source.
  24. I usually pass a reference to the "creating" form in the new form's constructor. That was the created form can store this reference and therefore call back to the main form if it needs to. As for your other question, you can just keep a reference around in the first form and see if it's set or not.
  25. You did :)
×
×
  • Create New...