﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Subclass SF's control</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 19:42:24 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Subclass SF's control</title><link>http://forum.strataframe.net/FindPost9739.aspx</link><description>OK, for everyone having a problem with subclassing a control &amp;amp; killing VS when you drop it on a form, we've fixed the problem.&amp;nbsp; It only happened on controls that were ILocalizable because the LocalizationDesigner got itself into a loop while trying to get the designer actions for the control.&amp;nbsp; Took us a while to figure out where it was failing, but it's working now, so you'll need the latest version of the Extensiblity DLL in your GAC.&amp;nbsp; I've also included the 4 Core DLLs because they are versioned with this extensibility DLL.</description><pubDate>Fri, 22 Jun 2007 10:30:37 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>Subclass SF's control</title><link>http://forum.strataframe.net/FindPost5782.aspx</link><description>Hi,&lt;br&gt;
May I know anything wrong for code below?&lt;br&gt;
I am facing problem VS.NET will exit automatically if I drop the control (derived from SF control) on form. However, if I changed to derived from standard control (System.WIndows.Forms) then is ok.&lt;br&gt;
&lt;br&gt;
Any ideas?&lt;br&gt;
&lt;br&gt;
[codesnippet]using System;&lt;br&gt;
using System.Collections.Generic;&lt;br&gt;
using System.Text;&lt;br&gt;
&lt;br&gt;
using MicroFour.StrataFrame.UI.Windows.Forms;&lt;br&gt;
using System.Windows.Forms;&lt;br&gt;
&lt;br&gt;
namespace JK.Framework.UI.Windows.Forms&lt;br&gt;
{&lt;br&gt;
    public class LinkLabel : MicroFour.StrataFrame.UI.Windows.Forms.LinkLabel //System.Windows.Forms.LinkLabel //MicroFour.StrataFrame.UI.Windows.Forms.LinkLabel&lt;br&gt;
    {&lt;br&gt;
        protected override void OnLinkClicked(System.Windows.Forms.LinkLabelLinkClickedEventArgs e)&lt;br&gt;
        {&lt;br&gt;
            base.OnLinkClicked(e);&lt;br&gt;
            this.HandleClicked();&lt;br&gt;
&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
        protected void HandleClicked()&lt;br&gt;
        {&lt;br&gt;
            MessageBox.Show("Clickedaa");&lt;br&gt;
        }&lt;br&gt;
    }&lt;br&gt;
}[/codesnippet]</description><pubDate>Fri, 22 Jun 2007 10:30:37 GMT</pubDate><dc:creator>kkchan</dc:creator></item><item><title>RE: Subclass SF's control</title><link>http://forum.strataframe.net/FindPost5966.aspx</link><description>You need to add a few "using" statements to the top of your subclassed control:&lt;/P&gt;&lt;P&gt;using MicroFour.StrataFrame.UI;&lt;BR&gt;using MicroFour.StrataFrame.UI.Windows.Forms;&lt;BR&gt;using System.Drawing;&lt;BR&gt;using System.Windows.Forms;</description><pubDate>Fri, 19 Jan 2007 14:42:31 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Subclass SF's control</title><link>http://forum.strataframe.net/FindPost5958.aspx</link><description>BTW, I am using C#, therefore I cant copy the source code from SF and do modification.</description><pubDate>Fri, 19 Jan 2007 10:21:50 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Subclass SF's control</title><link>http://forum.strataframe.net/FindPost5957.aspx</link><description>Hi,&lt;br&gt;
I tried to create an derived label (mylabel) based on system.windows.ui.forms. Then, I created another derived control based on the mylabel (mymylabel). It works fine when I drop mymylabel to form.&lt;br&gt;
&lt;br&gt;
Therefore, I am sure I do it the right way. Just that, I may miss out something which is necessary in order to subclass SF Control. Anyone can help here?&lt;br&gt;
&lt;br&gt;
Your helps are really appreciated.&lt;br&gt;
&lt;br&gt;
Thank you</description><pubDate>Fri, 19 Jan 2007 10:19:57 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Subclass SF's control</title><link>http://forum.strataframe.net/FindPost5902.aspx</link><description>Sorry, I really can't make it after trying and trying.&lt;br&gt;
&lt;br&gt;
I got error if I copy code from linklabel. I already added the all necessary references by refer to MicrosFour Strataframe UI.&lt;br&gt;
&lt;br&gt;
Do you mind to create a label subclass sample and direction to do this? Sorry for any inconvinience.&lt;br&gt;
&lt;br&gt;
Error	1	Type 'ToolboxBitmap' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	34	5	ClassLibrary1&lt;br&gt;
Error	2	Type 'IBusinessBindable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	37	20	ClassLibrary1&lt;br&gt;
Error	3	Type 'ILocalizable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	37	39	ClassLibrary1&lt;br&gt;
Error	4	Type 'IInitOnFormLoad' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	37	53	ClassLibrary1&lt;br&gt;
Error	5	Type 'DataSourceUpdateMode' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	48	39	ClassLibrary1&lt;br&gt;
Error	6	Type 'IBusinessBindable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	59	83	ClassLibrary1&lt;br&gt;
Error	7	Name 'DataSourceUpdateMode' is not declared.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	60	42	ClassLibrary1&lt;br&gt;
Error	8	Type 'IBusinessBindable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	67	57	ClassLibrary1&lt;br&gt;
Error	9	Name 'DataSourceUpdateMode' is not declared.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	68	34	ClassLibrary1&lt;br&gt;
Error	10	Type 'DataSourceUpdateMode' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	79	48	ClassLibrary1&lt;br&gt;
Error	11	Type 'IBusinessBindable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	79	80	ClassLibrary1&lt;br&gt;
Error	12	Type 'IBusinessBindable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	97	61	ClassLibrary1&lt;br&gt;
Error	13	Type 'IBusinessBindable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	114	74	ClassLibrary1&lt;br&gt;
Error	14	Type 'IBusinessBindable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	141	64	ClassLibrary1&lt;br&gt;
Error	15	Type 'IBusinessBindable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	159	75	ClassLibrary1&lt;br&gt;
Error	16	Type 'IBusinessBindable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	174	62	ClassLibrary1&lt;br&gt;
Error	17	Type 'IBusinessBindable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	193	65	ClassLibrary1&lt;br&gt;
Error	18	Type 'ILocalizable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	216	64	ClassLibrary1&lt;br&gt;
Error	19	Type 'ILocalizable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	241	67	ClassLibrary1&lt;br&gt;
Error	20	Type 'ILocalizable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	257	85	ClassLibrary1&lt;br&gt;
Error	21	Type 'ILocalizable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	270	124	ClassLibrary1&lt;br&gt;
Error	22	Type 'ControlUpdateMode' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	290	45	ClassLibrary1&lt;br&gt;
Error	23	Type 'IBusinessBindable' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	301	104	ClassLibrary1&lt;br&gt;
Error	24	Name 'ControlUpdateMode' is not declared.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	311	43	ClassLibrary1&lt;br&gt;
Error	25	Name 'ControlUpdateMode' is not declared.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	315	51	ClassLibrary1&lt;br&gt;
Error	26	Type 'IInitOnFormLoad' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	338	114	ClassLibrary1&lt;br&gt;
Error	27	Type 'IInitOnFormLoad' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	383	72	ClassLibrary1&lt;br&gt;
Error	28	Type 'IInitOnFormLoad' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	400	53	ClassLibrary1&lt;br&gt;
Error	29	Type 'IInitOnFormLoad' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	406	62	ClassLibrary1&lt;br&gt;
Error	30	Type 'IInitOnFormLoad' is not defined.	F:\Projects\JKFramework\ClassLibrary1\Class1.vb	418	53	ClassLibrary1&lt;br&gt;</description><pubDate>Wed, 17 Jan 2007 11:10:05 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Subclass SF's control</title><link>http://forum.strataframe.net/FindPost5820.aspx</link><description>It might be a type editor problem.&amp;nbsp; It might be easiest if you take the source code for one of the SF controls... say LinkLabel and copy that into your own control and modify it.&amp;nbsp; VS isn't always great about informing you of problems at design-time... sometimes it just dies.</description><pubDate>Mon, 15 Jan 2007 10:36:50 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Subclass SF's control</title><link>http://forum.strataframe.net/FindPost5797.aspx</link><description>Hi,&lt;br&gt;
I can drop Strataframe control to form without any problem, but not my derived control</description><pubDate>Fri, 12 Jan 2007 22:06:42 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Subclass SF's control</title><link>http://forum.strataframe.net/FindPost5787.aspx</link><description>Can you drop a LinkLabel from the StrataFrame Controls &amp;amp; Components tab onto a form, or does it kill VS as well?</description><pubDate>Fri, 12 Jan 2007 13:55:01 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>