Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. I developed a Wizard control that removes all the pain from actually creating the wizard, you can step through the pages at design time and put controls on them. Full control is maintained through various events the control raises. You can get it from http://www.divil.co.uk/net/controls/wizardcontrol/
  2. Weird, it should do this automatically. I have a control out there that does this fine, if there are child controls of your control it should search them. The only thing I can think of is if UserControl were doing something funny with the Controls property, in which case deriving from ContainerControl instead would fix it. I don't think that can be the problem though.
  3. I can only guess that Windows doesn't support ownerdrawing of context menus displayed in this way.
  4. If you want to position the cursor on the top-left corner of a button on your form, use this: Cursor.Position = Button3.Parent.PointToScreen(Button3.Location);
  5. It means there's an error in your code. If you put exception handling in, you could show a messagebox including a stack trace which will show the line number it's occuring on.
  6. Not really. Although you _can_ create COM DLLs with .NET, it's really designed to compile to .NET assemblies which are entirely different. There is a huge difference going from COM to .NET.
  7. Eventually it will be disposed by the garbage collector, but Font objects use win32 GDI handles so it's best to call their Dispose methods manually when you're done with them, same with brushes and any other class which uses win32 resources.
  8. I assume as he's adding checkboxes that he's going to be executing the code within a form. Also he'll need a graphics handle before executing that function (I noticed you didn't instantiate g) using the form's CreateGraphics method. :)
  9. Use MyCodeNameSpace.Types.Add(MyType)
  10. I would use Me.Font instead, otherwise you might end up creating a new font every time that function is run (and not disposing it either).
  11. TypeConverters are classes applied to other classes that enable conversion to and from that class type. A Size structure, for example, has a typeconverter that allows you to enter "100, 200" as a string in the propertygrid and it'll convert it to a size with X being 100 and Y being 200. The ExpandableObjectConverter class is extremely simple and does little more than tell the propertygrid that this object has properties that should be delved in to.
  12. I'm afraid I don't. I'm sure there are suites of similar-looking widgets out there if you search though.
  13. And how would you suggest they instantiate your abstract class? :)
  14. ActiveSkin doesn't work properly with .NET. I'm sorry if it's urgent, but you should have thought about that before committing to a product that can't support the platform you're using.
  15. Unfortunately the designers cannot support an abstract form as a base, because they have to actually create an instance of it to show on the design surface.
  16. Use a shared field on Form1 to store the one instance that is created, you can set it in the constructor or anywhere.
  17. I don't think so.
  18. You have to wire up the events at runtime. In VB, you use AddHandler to do this. In C#, you add a new EventHandler (or derivative) to the event.
  19. That code makes no sense. To get the text of the first selected item, do this: Dim StringVariable As String = lvwTeams.SelectedItems(0).Text
  20. You can specify a bounding rectangle when you call DrawString, the text should wrap inside that.
  21. All .NET controls support drag and drop.
  22. How about story.GetType() ?
  23. The class you would inherit form is probably System.ComponentModel.Design.Serialization.CodeDomSerializer. However, I think this is probably a red herring. I seriously doubt there is a way of you doing what you need to do without writing some serious extensibility add-in to vs.net to make a whole new type of document. My only suggestion would be to contact Microsoft about how to go about this.
  24. Then I'm sorry, I don't know.
  25. You've put a () on your private declaration in the class I expect.
×
×
  • Create New...