untuk modulnya..
Private Declare Function GetVolumeSerialNumber Lib "Kernel32.dll"
Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal
ipVolumeNameBuffer As String, ByVal nVolumeNameSize As Long,
ipVolumeSerialNumber As Long, ipMaximumComponentLength As Long,
ipFileSystemFlags As Long, ByVal ipFileSystemNameBuffer As String,
ByVal nFileSystemNameSize As Long) As Long
Public Function VolumeSerialNumber(ByVal RootPath As String) As String
Dim VolLabel As String
Dim VolSize As Long
Dim Serial As Long
Dim Maxlen As Long
Dim Flags As Long
Dim Name As String
Dim NameSize As Long
Dim s As String
Dim X As Byte
If GetVolumeSerialNumber(RootPath, VolLabel, VolSize, Serial, Maxlen,
Flags, Name, NameSize) Then
'bikin 8 karakter string
s = Format(Hex(Serial), "00000000")
'tambahkan '-' antara 4 karakter pertama dan4 karakter terakhir
VolumeSerialNumber = Left(s, 4) + "-" + Right(s, 4)
Else
'jika terjadi kesalahan, nilai yang dibalikkan 0000-0000
'VolumeSerialNumber = "0000-0000"
X = MsgBox("FLASH DISK Tidak Terpasang !!!, Cabut dan Pasang
Kembali ...", vbOKOnly, "Perhatian")
End
End If
End Function
untuk formnnya... 1 textbox dan satu command
Dim MNomerSerial As String
Private Sub Command1_Click()
'tampilkan serial number drive H (ato drive yg mana saja)
txtNomerSerial.Text = " " + VolumeSerialNumber("H:\")
End Sub
tinggal butuh kesabaran untuk modifikasinya
semoga membantu...
Hendra
--- In [email protected], Robert Suryadi
<[EMAIL PROTECTED]> wrote:
>
> boleh minta source code untuk protect program nggak...?
> buat referensi....
>
>
>
> ---------------------------------
> Yahoo! Music Unlimited - Access over 1 million songs.Try it free.
>
> [Non-text portions of this message have been removed]
>
Untuk berhenti berlangganan kirim email kosong ke : [EMAIL PROTECTED]
Forum ini berkembang dengan pesat, jika anda memiliki
dedikasi dan waktu, silahkan mengaplikasikan diri
menjadi moderator.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/indoprog-vb/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/