Jump to content
Xtreme .Net Talk

divil

*Gurus*
  • Posts

    3026
  • Joined

  • Last visited

Everything posted by divil

  1. No symbols loaded isn't an error, it just means your assemblies have no debugging symbols associated with them. This is why your breakpoint isn't being hit. The chances are that you have accidentally switch to the "Release" solution configuration instead of "Debug", which is why no debugging information is being generated.
  2. Delegates have nothing to do with that. You can declare a variable of the type of your base class and assign an instance of any derived class to it, but calling the methods on it will still result in the derived methods being called.
  3. VolteFace: Last time I checked, there were five times as many jobs for ASP.NET than PHP already. I'm sorry.
  4. It is possible. You just have to set the TopLevel property of the child form to false first, and presumably turn off the border but I expect you're already doing that. Once you've turned TopLevel off you can add one form to another just like you would any other control. By the way, there are libraries out there that can make the docking/floating thing a lot easier. If you're interested, and as a shameless plug, follow the link in my signature to check out my effort.
  5. You can't have a constructor like that, the designers won't know what to do with it. The key to getting this done is to take advantage of the designer architecture to get a reference to the form at design time, and making it set a property on your component. Make yourself a public (not necessarily browsable) property on the Component of type Form. You're going to need to override the Site property, and simply call back to the base site for implementation. In the Site setter after you've run the base implementation, call GetService on the site you got (assuming you got one) to get an instance of IDesignerHost. When you've got this you can use the RootComponent property on that interface to get the root component of the design surface. At this stage it's important to remember that this won't necessarily be a form - someone could put your component on the UserControl designer or even the Component designer too. Once you've got this RootComponent and established it is of type Form, just assign it to your property (use IComponentChangeService to notify the design environment you've done this, but it's not the end of the world if you don't). That should sort you out - the property will now be set on loading the form, and you can do what you like with it.
  6. If you want a collection to be treated as an array of strings by Visual Studio like the ListBox's Items property is, apply this attribute to it: Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))
  7. The framework uses reflection extensively internally for things like security. Reflection is used when you get custom attributes from types that you've written. It can be handy for manipulation of advanced things that aren't exposed, or a developer has forgotten to expose. Also it's all you can use if you want to do late-binding in C#. All these things are in-process though. You've had an interesting idea there, and I must say I had never thought of using reflection that way.
  8. You don't want to have a loop there, for a start. You'll have to keep a form-scoped variable around saying which number to print. Like you're doing now you'll write the text, then if i < 10 then tell it it has more pages. You'll have to manually increment it each time too.
  9. Reflection is not for controlling other programs. I can't see a reliable way of getting it working - frankly I'm surprised you managed at all. If you manage to create an instance of a .NET assembly's main form, that's all well and good but it won't be running as a separate process.
  10. If you want to apply the framework tabpage designer to your class, it doesn't matter that it's private - you can apply the attribute like this: Designer("System.Windows.Forms.Design.TabPageDesigner, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  11. divil

    Scripting

    If you use .net languages to add scripting support to your application, you have to compile them. This doesn't necessarily mean writing exe files to the hard drive, assemblies can exist in memory. I wrote an article on doing it, follow the link in my signature or look in the Tutor's Corner here on the forum if you want to read it.
  12. Not that I know of, but I could be wrong.
  13. Lots of people use my controls instead of those. You can see what they do by following the link in my signature.
  14. The following article may help you: http://www.codeproject.com/cs/media/csharpfilters.asp?target=sharpen
  15. This isn't possible with the managed listview wrapper - unfortunately they missed this functionality out in .NET 1.0 and 1.1. I have some code written in C# that uses interop to switch column indexes around, if you want it.
  16. Try using the AddOwnedForm method of the parent form on the secondary form.
  17. You have to make sure your new form is created on the same thread as the rest of your UI. You can do this by using the Invoke method of an existing control to run a delegate of your choosing, that creates your secondary form.
  18. Your system just isn't fast enough to keep up with the pointer. Moving the mouse pointer very fast always has the result that it jumps in intervals of more than one pixel, there's not much you can do about it. You could capture the MouseLeave event of your form, get the mouse coordinates _then_ interpolate between them and the last set of recorded coordinates I suppose.
  19. He was asking about a checkbox, not a combobox :) If you set the AutoCheck property to false, I think that will effectively disable it against user input.
  20. You can use the parent's MdiChildActivate event for both purposes. When it fires and there is only one child window open, you've just opened your first child. When it fires after that it means that one has just been deactivated in favour of the new one, obviously. You can keep a reference to the currently active window if you need to determine which one was deactivated. The event will fire once more when the last child window is closed, and then the parent ActiveMdiChild property will be null.
  21. You can call functions in a c dll using platform invoke, the same way you call Windows APIs. There are samples in the SDK of doing this in the samples/technologies/interop/platforminfoke directory.
  22. You have to cast it, just like you should be doing with the regular framework (put option strict on). DirectCast(sender, TextBox).Text = "blah"
  23. Something for your car?
  24. I don't know about the datagrid, and I have never ownerdrawn a treeview. That said, it isn't difficult to do if you've got msdn and time to spare learning the messages and structures you need to hook in to it. You're going to have to do that if you want some nodes to be checkable etc.
  25. I think you do it in the control panel.
×
×
  • Create New...