Forum Discussion

ehaartmans's avatar
ehaartmans
Occasional Contributor
13 years ago

How to start a form in a dotnet assembly

Hi,



I'm trying to start a form which is developed in visual basic 2010 express.

A form is created in a DLL which is in the GAC and then added to the clr



This is the code:



dim frm



set frm = dotnet.assemblyname.frmToShowUp.zctor

frm.show



I expect that the form would show, but nothing happens.



any ideas?



I use this form to select something needed before the test starts.

2 Replies

  • ehaartmans's avatar
    ehaartmans
    Occasional Contributor
    Hi Helen,

    This helped, but I also had to set the preferred architecture and apartment model in the clr bridge to 64 bit (i have a w7 64 bit client) and multi threading.
  • Hi Erik,



    Works fine for me in TestComplete 8.70 for a simple System.Windows.Forms.Form form:

    Dim frm

    Set frm = dotNET.System_Windows_Forms.Form.zctor

    frm.ShowDialog


    Maybe the trick is to use ShowDialog instead of Show?

    If not, could you please share your DLL so we can check it directly?