Changing the parent class of controls already on a form


Author
Message
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
And, it should be mentioned for anyone new to the VS IDE, right clicking and picking Find all References or Go to Definition is pretty cool as well.



Tokens, bookmarks, snippets ... I'm liking VS a lot. BigGrin

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Charles,



Yes, I also was very happy, as my friend Doron Farber says "like a pig in a s..t" when I discovered the same thing.



I also found that the Find/Replace functionality in VS is by far more powerful and flexible than the one in the VFP IDE so it began to be one of my best friend Smile I usually find everything I need to in the SF source code pretty easy.

Edhy Rijo

Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)Advanced StrataFrame User (922 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
Another of my "aha" moments as I crawl up the learning curve of .NET.



I'm sure this is glaringly obvious to most of you, and I know it isn't rocket science, but I want to make this observation for benefit of form VFP developers like myself who cut our teeth on inheritance and subclassing issues there :



Not only can you change the parent class of an object after it is created with no difficulty ( e.g. creating a business object baseclass subclassed from the SF one, then going into your own previously created BOs and just changing the Inherits line.) but you can change the parent class of controls that are already on a form by just hacking the designer page.



Recently had a form with 12 datagridviews, decided to create my own subclass of datagridview in my UI library. First instinct was to blow away the 12 dgvs I had and drop on my new dgvs - then stopped thinking Fox, started thinking .NET and poked around on designer page, found the lines that defined the dgvs as New System.Windows.Forms.DataGridView and changed it to New CRH.UI.dgv



OK, maybe everybody else knows that but I thought it was cool and maybe there is one other person who hadn't tried that before. Can really come in handy if you need to change the parent of 100 textboxes. Smile



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search