VB6 accessing VB.NET SF User Control and/or SF Form


Author
Message
Tim Dol
Tim Dol
StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
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.

Here is what I have done so far...

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.

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. (Haven't figured out why yet).  I can't seem to set the public property on my user control. I get a out of memory error.

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.

Thanks,
Tim

Reply
Tim Dol
Tim Dol
StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)StrataFrame User (414 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
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.  I am populating the combo boxes on the form using the SF Item population settings. 

I created a quick .NET calling program that refereces my COM dll and it seems to work fine from here.

Any idea's what is causing this and what I need to correct this.

Thanks

TIm

************** Exception Text **************

System.Exception: Type 'Avanti.BusinessObjects.sch_WorkFamilyBO' could not be found in the referenced assemblies. ---> System.Exception: The call to 'MicroFour.StrataFrame.Tools.GetTypeFromReferencedAssemblies' failed because the entry assembly could not be evaluated.

   at MicroFour.StrataFrame.Tools.Common.GetTypeFromReferencedAssemblies(String TypeName)

   --- End of inner exception stack trace ---

   at MicroFour.StrataFrame.Tools.Common.GetTypeFromReferencedAssemblies(String TypeName)

   at MicroFour.StrataFrame.UI.Windows.Forms.ListControl.PopulateComboFromBusinessObject(IListControl lstControl, Object[] Parameters)

   at MicroFour.StrataFrame.UI.Windows.Forms.ListControl.PopulateCombo(Control lstControl, Object[] Parameters)

   at MicroFour.StrataFrame.UI.Windows.Forms.Infragistics.UltraComboEditor.PopulateCombo(Object[] Parameters)

   at MicroFour.StrataFrame.UI.Windows.Forms.Infragistics.UltraComboEditor.Requery()

   at MicroFour.StrataFrame.UI.Windows.Forms.Infragistics.UltraComboEditor.InitializeObject()

   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects()

   at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e)

   at System.Windows.Forms.Form.OnCreateControl()

   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

   at System.Windows.Forms.Control.CreateControl()

   at System.Windows.Forms.Control.WmShowWindow(Message& m)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

   at System.Windows.Forms.ContainerControl.WndProc(Message& m)

   at System.Windows.Forms.Form.WmShowWindow(Message& m)

   at System.Windows.Forms.Form.WndProc(Message& m)

   at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)

   at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)

   at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

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