Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class Libraries in .NET (like the ones in VFP)?
Message
De
11/09/2007 21:32:38
 
 
À
11/09/2007 20:13:12
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01253751
Message ID:
01253822
Vues:
20
Yikes! You mean all the coding on my own class library is done it a text edit fashion? You can't open your custom class library in the IDE, and then use the properties window to change visual properties or the events and methods of the individual control?

In VFP, editing a sub-classed control is just like editing a control on the form. i.e. you have access to the properties window right in the IDE (while editing a sub-classed control in your class library). It was very much IDE and WYSIWYG. It sure makes looking for the properties easy. Looks like VS is heavy on just raw code.


I've got a looong way to go.


>As Mike and Perry mentioned, you'd create a separate project. Let me take it one step further and show you a quick example.
>
>Basically, you'll want a class library that contains your sub-classed UI controls, like textbox, button, etc. Something like this:
>
>using System;
>using System.Drawing;
>using System.Collections;
>using System.ComponentModel;
>using System.Windows.Forms;
>using System.Data;
>
>namespace MyCompany.WinUI.MyClasses
>{
>	public class MyComboBox : System.Windows.Forms.ComboBox
>	{
>		// code here
>	}
>
>	public class MyTextBox : System.Windows.Forms.TextBox
>	{
>		// code here
>	}
>
>	public class MyButton : System.Windows.Forms.Button
>	{
>		// code here
>	}
>}
>
>That's it. These controls can't be sub-classed visually, but as you can see, it's easy enough to do it in code. I have all the basic controls sub-classed in one class library file. Once they're added to the ToolBox, then can be dragged onto any design surface in the IDE.
>
>~~Bonnie
>
>
>
>
>
>
>
>>Coming from a VFP background, I do not immediately see the "Claass Library" mechanism in VS? Can someone point me in that direction.
>>
>>In other words, where do you sublass the base components, and beging to build you own library of components to use on your Windows Form?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform