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.
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.
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.
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