﻿<?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  » VB6 accessing VB.NET SF User Control and/or SF Form</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 08 Jun 2026 22:31:38 GMT</lastBuildDate><ttl>20</ttl><item><title>VB6 accessing VB.NET SF User Control and/or SF Form</title><link>http://forum.strataframe.net/FindPost11771.aspx</link><description>I need to develop a new SF WinForm or User Control that can be accessed from our VB6 application. What is the best way to do this and how would you call it or access it from vb6.&lt;/P&gt;&lt;P&gt;Here is what I have done so far...&lt;/P&gt;&lt;P&gt;I created a SF Business Object Library Project and made it COM Visible. I then added a SF User Control and placed a few controls on it for testing. I created one public property on the user control.&lt;/P&gt;&lt;P&gt;I then created a VB6 app and using the VBControlExtender, I was able to Add the user control to my form and make it visible, although only a few controls appeared.&amp;nbsp;(Haven't figured out why yet).&amp;nbsp; I can't seem to set the public property on my user control.&amp;nbsp;I get a out of memory error.&lt;/P&gt;&lt;P&gt;Anyway, just wanted to know if there is a better way to launch a form and pass some values to the user control or form. I will be doing this quite a bit as we migtrate all our apps to vb.net.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Tim</description><pubDate>Fri, 05 Oct 2007 14:12:13 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: VB6 accessing VB.NET SF User Control and/or SF Form</title><link>http://forum.strataframe.net/FindPost11886.aspx</link><description>I wrote COM wrapper for one of my UI forms that I need to call from VB6. Evertything works perfectly, after dealing with the connections and localization files etc..., except I'm getting an error on my combox requery's.&amp;nbsp; I am populating the&amp;nbsp;combo boxes on the form using the SF Item population settings.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a quick .NET calling program that refereces my COM dll and it seems to work fine from here.&lt;/P&gt;&lt;P&gt;Any idea's what is causing this and what I need to correct this.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;TIm&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;************** Exception Text **************&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;System.Exception: Type 'Avanti.BusinessObjects.sch_WorkFamilyBO' could not be found in the referenced assemblies. ---&amp;gt; System.Exception: The call to 'MicroFour.StrataFrame.Tools.GetTypeFromReferencedAssemblies' failed because the entry assembly could not be evaluated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at MicroFour.StrataFrame.Tools.Common.GetTypeFromReferencedAssemblies(String TypeName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;--- End of inner exception stack trace ---&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at MicroFour.StrataFrame.Tools.Common.GetTypeFromReferencedAssemblies(String TypeName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at MicroFour.StrataFrame.UI.Windows.Forms.ListControl.PopulateComboFromBusinessObject(IListControl lstControl, Object[] Parameters)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at MicroFour.StrataFrame.UI.Windows.Forms.ListControl.PopulateCombo(Control lstControl, Object[] Parameters)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at MicroFour.StrataFrame.UI.Windows.Forms.Infragistics.UltraComboEditor.PopulateCombo(Object[] Parameters)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at MicroFour.StrataFrame.UI.Windows.Forms.Infragistics.UltraComboEditor.Requery()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at MicroFour.StrataFrame.UI.Windows.Forms.Infragistics.UltraComboEditor.InitializeObject()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.Form.OnCreateControl()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.Control.CreateControl()&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.Control.WmShowWindow(Message&amp;amp; m)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.ContainerControl.WndProc(Message&amp;amp; m)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.Form.WmShowWindow(Message&amp;amp; m)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.Form.WndProc(Message&amp;amp; m)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp;amp; m)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp;amp; m)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;FONT size=3&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Times New Roman"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;at System.Windows.Forms.Native&amp;#119;indow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN lang=EN-CA&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;</description><pubDate>Fri, 05 Oct 2007 14:12:13 GMT</pubDate><dc:creator>Tim Dol</dc:creator></item><item><title>RE: VB6 accessing VB.NET SF User Control and/or SF Form</title><link>http://forum.strataframe.net/FindPost11780.aspx</link><description>No, making it COM visible is probably the best way to go.&amp;nbsp; It would probably be easier to call your VB6 methods from within .NET than to call your .NET COM from within VB6; however, that would be a&amp;nbsp;huge re-design of your current system, so you can probably throw that one out.&amp;nbsp; &lt;/P&gt;&lt;P&gt;As for a user control, I've never tried to show a user control within another application.&amp;nbsp; I know that platform interop when IntPtr handles are shared within a form can be tricky.&amp;nbsp; So, if you can show a whole .NET form rather than just a .NET user control, you'd probably be better off.&amp;nbsp; Why only a few of the buttons became visible I do not know.&amp;nbsp; The only pointers I can provide would be to create a .NET method that you can call from VB6 that will initialize the .NET app domain.&amp;nbsp; We call ours SetEnvironment(), and it does thinks like EnableVisibualStyles = True, DataBasics.DataSources.Add(), etc.&amp;nbsp; Anything that you would normally do from within your AppMain.vb, you will need to do in this method to initialize all of the .NET stuff.</description><pubDate>Tue, 02 Oct 2007 09:01:16 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>