12-07-2010, 07:53 PM
(12-06-2010, 03:43 PM)KoBE Wrote: I don't understand why you would want two forms for this, or why you would use:
if you arent even using Label1.Code:Label1.Text = WindowsSerial
If you used this as your Form1_Load it it would work just fine w/ one form.
Code:Dim MOS As ManagementObjectSearcher = New ManagementObjectSearcher("Select * From Win32_OperatingSystem")
Dim MO As System.Management.ManagementObject
Dim MOC As System.Management.ManagementObjectCollection = MOS.Get
Dim WindowsSerial As String = String.Empty
For Each MO In MOC
WindowsSerial = MO("SerialNumber")
Next
If WindowsSerial = "YOUR WINDOWS SERIAL" Then
Me.Opacity = 100
Else
MsgBox("Your windows serial does not match.")
Me.close
End If
Good share none the less.
Thanks for the tips and feedback Kobe.
That label is hidden on the form ...