31-03-13, 01:48 AM
تفضل اخى
كود :
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
On Error Resume Next
Dim computer As String = "."
Dim wmi As Object = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & computer & "\root\cimv2")
Dim processors As Object = wmi.ExecQuery("Select * from " & "Win32_Processor")
Dim cpu_ids As String = ""
For Each cpu As Object In processors
cpu_ids = cpu.ProcessorId
MsgBox("رقم المعالج : " & cpu_ids & "", MsgBoxStyle.Information)
Next
If cpu_ids = "BFEBFBFF00020655" Then
Form2.Show()
Me.Hide()
Else
MsgBox("هذه النسخة ليست مرخصة لك", MsgBoxStyle.Critical)
End
End If
End Sub