Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparisons and Issues
Message
From
17/02/2004 23:31:32
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
00876760
Message ID:
00878186
Views:
23
Hi, Stephen-

> In VFP we have the Save Control As or a quick dialog where we can create a new class and specify a class but I'm finding it difficult (no doubt due to lack of familiarity with what I'm looking at) to perform this.

For save as, you can simply copy the code behind the control you design to your own (let's say) textbox. (It's not the same as save as, I know.)

>I would then want to be able drag and drop these new subclassed form controls onto my forms.

Okey. Thanks to Cindy, David, and Bonnie for giving me the nudge in the right direction. Assuming C# (I imagine it's similar in VB, but I don't know.)

You might take these basic steps...

1. Create a Classlibrary.
2. Create your TextBox class (or paste in code from a class you designed on a windows form.
3. Build the classlibrary project. That, of course leaves you with a DLL.
4. Assuming you have a windows application project started, display the toolbox toolbar. (View | Toolbox if it's not showing).
5. Right click on the toolbar and pick Add/Remove items.
6. Browse to your DLL made in 3.
7. You'll have a check box for each class in the classlibrary.
8. You can drag and drop the class visually.

This is good to know, of course. I just hope I remember when I need it. ;-)
Previous
Reply
Map
View

Click here to load this message in the networking platform