Error when Application change type to set splash screen

Error when Application change type to set splash screen

SandmanINV
Advocate Advocate
392 Views
2 Replies
Message 1 of 3

Error when Application change type to set splash screen

SandmanINV
Advocate
Advocate

Hi everybody, 

I start my api with an template inventor Addin by VB.net. 

After all done, I want to set splash for my api. 

But, when I change Applycation type from Sub main to Window Form Application.

I get an error when i start debug : 'Form 1' is a class type and cannot be used as an expression in vb.net

At the start of programe, i had an sub new like that 

Public Sub New(ByVal oApp As Inventor.Application)

        ' This call is required by the designer.
        InitializeComponent()
        Form1_loading()

        oinv = oApp

    End Sub

After get an error above, i start try create on above of that old subnew, error disappear. 

Public Sub New()
        InitializeComponent()

    End Sub

But when i try start a function i write with inventor, debugger show that "oinv is nothing".

How can I fix this. Please help becase I have just work in vb.net.

Thank you for reading.

0 Likes
Accepted solutions (1)
393 Views
2 Replies
Replies (2)
Message 2 of 3

SandmanINV
Advocate
Advocate

Somebody help me please

0 Likes
Message 3 of 3

SandmanINV
Advocate
Advocate
Accepted solution

I had my solution. Thankyou

0 Likes