Child Form Dialog Problem


Author
Message
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
What is the error that it's throwing?  Is it throwing a FileNotFoundException or something else?  It could be that the .NET runtime cannot find the assembly that you are trying to load...
Tim Dol
Tim Dol
StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Ben,

I figured out what you meant. 

Me.ChildFormDialog1.ChildForm = GetType(Avanti.Scheduling.frmMilestonesDialog).AssemblyQualifiedName

It still produced the error. Any other ideas or suggestions on how to make this work so I can call from VB6?  I'd hate to have to get rid of the child dialog.

Thanks,

Tim

 


Tim Dol
Tim Dol
StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
Ben,

I tried using the fully qualified name in the child for assignment but it didn't seem to make a diffetence calling from the COM assembly.

Me.ChildFormDialog1.ChildForm = "Avanti.Scheduling.frmMilestonesDialog, Avanti Systems Scheduling, Version=1.0.0.0, Culture=neutral, PublicKeyToken=df3c50696c85735c"

I'm not clear on the second suggestion

GetType(SomeNamespace.SomeFormType).AssemblyQualifiedName.

Where do I add this code?

Thanks

Tim

StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Nope, since it's a COM assembly, it's having issues because there was no .NET entry assembly.  As a workaround, you'll have to manually edit the .designer.vb files where you use ChildFormDialogs and change the type name of the ChildForm property to use the fully qualified type name.

So, if you have this:

SomeNamespace.SomeFormType

Then you'll need to change it to this:

SomeNamespace.SomeFormType, ContainingAssemblyName, Version=1.0.0.0, Culture=neutral, PublickKeyToken=hexvalue

You can find the fully qualified name of a type by calling .GetType().AssemblyQualifiedName

You might even try replacing the quoted value with something like this:

GetType(SomeNamespace.SomeFormType).AssemblyQualifiedName

and it might work.

Tim Dol
Tim Dol
StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)StrataFrame User (408 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
I have created a COM Wrapper DLL that I can call from our VB6 application which opens up selected .NET forms.  In my COM Dll I set all the Microfour settings found in the appmain.  (Connection, localization) etc...

In general everything seems to work fine, however I get errors when I use child form dialogs in my .NET project and try calling from my COM Wrapper. I also think I have a similar problem when I fill combo boxes using item populating settings.

Is there a reference I am missing or something I may be doing incorrectly to cause the error? 

Thanks

Tim

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

System.Exception: Type 'Avanti.Scheduling.frmMilestonesDialog' 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.ChildFormDialog.CreateForm(Object[] Arguments)

at MicroFour.StrataFrame.UI.Windows.Forms.ChildFormDialog.ShowDialog(Object[] Arguments)

at MicroFour.StrataFrame.UI.Windows.Forms.ChildFormDialog.ShowDialog()

at Avanti.Scheduling.frmMilestones.ShowChildForm() in C:\Source Code\Scheduling\Avanti Scheduling\Avanti Scheduling\Forms\frmMilestones.vb:line 253

at Avanti.Scheduling.frmMilestones.grdMilestones_DoubleClickRow(Object sender, DoubleClickRowEventArgs e) in C:\Source Code\Scheduling\Avanti Scheduling\Avanti Scheduling\Forms\frmMilestones.vb:line 758

at Avanti.Scheduling.frmMilestones.grdMilestones_ClickCellButton(Object sender, CellEventArgs e) in C:\Source Code\Scheduling\Avanti Scheduling\Avanti Scheduling\Forms\frmMilestones.vb:line 747

at Infragistics.Win.UltraWinGrid.UltraGrid.OnClickCellButton(CellEventArgs e)

at Infragistics.Win.UltraWinGrid.UltraGrid.FireEvent(GridEventIds id, EventArgs e)

at Infragistics.Win.UltraWinGrid.UltraGridCell.OnButtonClick()

at Infragistics.Win.UltraWinGrid.ButtonWithStyleUIElement.OnClick()

at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)

at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)

at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)

at Infragistics.Win.UltraControlBase.OnMouseUp(MouseEventArgs e)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.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