cancel
Showing results for 
Search instead for 
Did you mean: 

Error

Pioneer
Pioneer

hello

 

I am learning NXSnap for first time. I dont have any background in programming. While I was trying this program from the Snap Guide I cam eacross this error. Please could any one help.

nx_snap.PNGThank you

Pooja

9 REPLIES

Re: Error

Phenom
Phenom

You will need to "import" the SNAP namespace, see below:

 

Option Explicit Off
Imports Snap, Snap.Create, System.Drawing.Color

Module SnapSample
   Public Sub Main()

        myForm = New Snap.UI.WinForm()
        myForm.BackColor = Red
        myForm.Opacity = 0.5
        myForm.Text = "Hi there"
        myForm.ShowDialog()

    End Sub
End Module

Also note that it is myForm.BackColor, not myForm.BlackColor.

Re: Error

Pioneer
Pioneer

Sorry. But its still showing the same error

Re: Error

Genius
Genius
SNAP requires an additional license. Regards, jan
Jan Böttcher

Re: Error

Phenom
Phenom

Do you have a SNAP license? If not, that example may not run for you. Everyone has access to "miniSnap", which I see referenced in your code. "MiniSnap" is a subset of the SNAP functions which essentially allows you to give SNAP a trial run before purchasing a license.

Re: Error

Pioneer
Pioneer

Yes I dont have a SNAP Licence but I could run other programs through MiniSnap and why not this?

Re: Error

Genius
Genius

Look at your log-file. You need the license to load the SNAP.dll. As Cowski1 mentioned MiniSnap.dll is only a free subset and the class WinForm seems not to be in it.

 

 

Regards Jan

Jan Böttcher

Re: Error

Siemens Phenom Siemens Phenom
Siemens Phenom

Snap and MiniSnap are different libraries. MiniSnap is a "limited capability" free version of Snap. Either should work in this case.

 

The code provided works for me with no issue:

 

Option Explicit Off
Imports MiniSnap, MiniSnap.Create

Module SnapSample
   Public Sub Main()

        myForm = New Snap.UI.WinForm()
        myForm.BackColor = System.Drawing.Color.Red
        myForm.Opacity = 0.5
        myForm.Text = "Hi there"
        myForm.ShowDialog()

    End Sub
End Module

 

@pghatge, please make sure that the MiniSnap.dll is in the nxbin\managed folder. Check the syslog and see if there are any errors related to locating and loading MiniSnap.dll

Re: Error

Genius
Genius

You need to call MiniSnap.UI.WinForm()

 

 

Jan Böttcher

Re: Error

Pioneer
Pioneer

Thank you. Worked!!! Smiley Happy