Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. No, not correct. The event you use to tell when Mdi Children are switched between is the MdiChildActivate event on the parent form.
  2. You don't "change" things in a text file, as you want to. You have to read it all in, change what you need to then write it out again. Files are not like strings.
  3. That's because the Main method is static, so it knows nothing of the instance members of the class. I hear the intellisense in the C# code editor is much improved in Visual Studio .NET 2003.
  4. I think the parent form has an MdiChildActivate event.
  5. I'm pretty sure vs.net 2003 won't have control arrays. They would require a fundamental change to the way designers, sites and serializers work in the framework.
  6. See this thread, only a few down the list from yours.
  7. One of the String constructors accepts a character and an integer number of times to repeat it.
  8. You have an awful lot of work ahead of you. Getting the form designers to come alive is by no means a trivial task, and you'll need to implement at least a dozen interfaces before it works even close to reliably :)
  9. Intellisense is not available in the command window. I hear this is fixed in Visual Studio .NET 2003.
  10. The designer for a control should either be inherited from ControlDesigner or ParentControlDesigner - both should work. I'm unsure why ComponentDesigner would work - that's meant for components, i.e. classes with no user interface. But still, if it works...
  11. AndreRyan, .NET doesn't make ActiveX Dlls. If he's made a dll with a user control in, it'll be a .NET assembly.
  12. If you set your FormBorderStyle to None and your WindowState to Maximized your form should take up the whole screen.
  13. I spent most of last week working on my forms designer that VolteFace spoke of. It's coming along well, and I hope to be able to upload a demo version at some point soon. Most the designer stuff you see in VS.NET comes from the framework itself, along with the serializers that turn a designed form (or usercontrol, or whatever) in to code. You just have to write an awful lot of your own code to glue them all together and make them work properly. To make them work with raw C++ would be extremely difficult since they're geared for .NET. You would have to rewrite the serializers from scratch, and components that need custom serializers simply wouldn't work at all.
  14. Check out the System.Drawing.Drawing2d.LinearGradientBrush class.
  15. Looking at your code, you should not have been creating a graphics object yourself. The Paint event for any control gives you the correct graphics object to use as one of the properties of the eventargs object you're passed. You should always use that.
  16. GetType(ClassName) typeof(ClassName)
  17. That's a nasty way of doing it. You should create the graphics object before calling your function however many times you need to (passing your graphics object to it) and then properly dispose it afterwards.
  18. I don't understand why you've made a new collection of your own when you're not adding custom objects - why not just use the Controls collection that's already there?
  19. Use something like this: Public Enum MyEnum FirstThing SecondThing AnotherThing End Enum Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim s As String For Each s In [Enum].GetNames(GetType(MyEnum)) ComboBox1.Items.Add(s) Next End Sub You can then use [Enum].Parse to get the numeric data equivalent for any string once it has been picked.
  20. You might be able to use the WebClient class in combination with the NetworkCredential class to authenticate.
  21. PHP is a bit of a mess - I think there's about 1500 functions built in to the language, which aren't grouped together effectively. Also it can't use COM, which discounts it from a great deal of business applications.
  22. The designer isn't instantiated by the root designer, it's instantiated by the Visual Studio environment itself, where it's hosting the container bound to IDesignerHost. Is the problem that your root designer is allowing you to draw your controls on the form but they are appearing in runtime mode, without their designers?
  23. Right click on your toolbox, and select Customize Toolbox. Jump to the .NET tab on the customize toolbox dialog.
  24. I think CanBeParented returns whether or not the control being be that designer can be parented to the designer passed in as an argument. CanParent, on the other hand, returns whether the current designer can act as a parent to the control passed as an argument. Confusing stuff. Since DocumentDesigner inherits from ParentControlDesigner I can't see why it would behave differently and not initialize your designers. Have you tried debugging outputs to see if the Initialize() or even the constructor is ever being called on your designers?
  25. Hard when you don't know how, yeah :) Reading the articles I wrote on designers should help, if you want to learn. Go to Project -> Add UserControl and work from there!
×
×
  • Create New...