﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » Changing controls to Base Classes</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 07 Apr 2026 13:52:38 GMT</lastBuildDate><ttl>20</ttl><item><title>Changing controls to Base Classes</title><link>http://forum.strataframe.net/FindPost25359.aspx</link><description>Is it possible to change classes easily on exisitng forms. I have a no. of forms set up with SF classes and now want to change these forms to use my own base classes. &lt;/P&gt;&lt;P&gt;Now that I feel comfortable with my Base Classes, I want to go back over any forms that have been done and change the class the controls are based on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;(e.g. for TextBoxes, ChkBoxes,Tabs etc). IN VFP, I used to do this by going behind the scenes and editing the .scx file...just wondering if there is something similar in VS.</description><pubDate>Wed, 09 Dec 2009 11:22:16 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Changing controls to Base Classes</title><link>http://forum.strataframe.net/FindPost25363.aspx</link><description>Hi Greg.. thanks for your very informative reply.&lt;/P&gt;&lt;P&gt;I'll check that out and note your comments about proceeding with caution !!</description><pubDate>Wed, 09 Dec 2009 11:22:16 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Changing controls to Base Classes</title><link>http://forum.strataframe.net/FindPost25362.aspx</link><description>The same sort of thing is found in each form's .Designer file. This file has the declarations for all the controls uses on the form.  At the very bottom, it declares a bunch of fields, one for each control. Then at the top of the InitializeComponent() method, it instantiates each of these fields. You need to replace the existing SF types with your own types. There are a couple of ways to get this done:&lt;br&gt;
&lt;br&gt;
1. Open the designer file, go to the end of the file. Look for control fields that need to be updated and update them. Then look to see what errors now exist, click on errors to go to the line that instantiates the field and fix those.  &lt;br&gt;
2. Use Find and Replace. You could do this across the entire solution or just open each designer file individually. I'd definitely verify each replace. &lt;br&gt;
&lt;br&gt;
I'd suggest you use method one on one or two designer files until you understand what you're doing, then let 'er rip with find and replace! :D</description><pubDate>Wed, 09 Dec 2009 11:07:51 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>