WHAT'S NEW?
Loading...
Showing posts with label VIsual Basic. Show all posts
Showing posts with label VIsual Basic. Show all posts
serial
         Every computer equipment has single and unique manufacture code by which we can identify computer.It is mostly used to prevent pirated sales of license of application.   Here we will learn to get hard disc serial code using vb 6.0.
Here is Function which returns serial number of HDD.

     Public Function GetDriveSerialNumber(Optional ByVal DriveLetter As String) As Long
          Dim fso As Object, Drv As Object
          'Create a FileSystemObject object
          Set fso = CreateObject("Scripting.FileSystemObject")
         
          'Assign the current drive letter if not specified
          If DriveLetter <> "" Then
              Set Drv = fso.GetDrive(DriveLetter)
          Else
              Set Drv = fso.GetDrive(fso.GetDriveName(App.Path))
          End If
     
          With Drv
              If .IsReady Then
                  DriveSerial = Abs(.SerialNumber)
              Else    '"Drive Not Ready!"
                  DriveSerial = -1
              End If
          End With
         
          'Clean up
          Set Drv = Nothing
          Set fso = Nothing
         
          GetDriveSerialNumber = DriveSerial
      End Function

Private Sub Command1_Click()
     MsgBox " Drive serial number for " & Left(App.Path, 1) & ": " & GetDriveSerialNumber
End Sub


New we can convert serial to hex value for more security and compare with value we have already saved in variable.

Dim serial as string
Serial = “0054DRF000”
If serial  <> hex$(GetDriveSerialNumber then)
                Msgbox(“Invalid License”)
End
Endif

We simply call function and compare it  to startup of application if serial can not match vith stored variable value then exit program.







       Invoice Management is simply used to maintain
Invoice and Payment in company. It is simple and easy to operate.

Advantages:
* Easy to operate
* Voucher Management
* Portable and can used from any removable device.
* Easy Installation
* Supports Multiple Company operations.
* Email and SMS Notification for any transction.
* Opensource Project.

Computer Requirement:
* Programming Language :  VB 6.0
* Back End                      :  Microsoft Access
* Minimum Memory         : 256 MB

Request to Download Source Code.