
26/09/2004, 20:44
|
 | Colaborador | | Fecha de Ingreso: diciembre-2003 Ubicación: Antigua Guatemala
Mensajes: 4.032
Antigüedad: 21 años, 2 meses Puntos: 53 | |
mira tengo un par de problemas con ese hosting pero aqui esta el codigo
Código:
Private Declare Function GetVolumeInformation& Lib "kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal pVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long)
Private Sub Command1_Click()
Unload Me
End
End Sub
Private Sub Form_Load()
Dim cad1 As String * 256
Dim cad2 As String * 256
Dim numSerie As Long
Dim longitud As Long
Dim flag As Long
unidad = "C:\"
Call GetVolumeInformation(unidad, cad1, 256, numSerie, longitud, flag, cad2, 256)
Primera.Caption = numSerie
Reg1.Text = GetSetting(App.Title, Me.Name, Reg1.Name, vbChecked)
Reg2.Text = GetSetting(App.Title, Me.Name, Reg2.Name, vbChecked)
Reg3.Text = GetSetting(App.Title, Me.Name, Reg3.Name, vbChecked)
registro.Caption = (numSerie * 3) & "#" & (numSerie * 4) & "#" & (numSerie * 5)
If (Val(Reg1.Text) = (numSerie * 3)) And (Val(Reg2.Text) = (numSerie * 4)) And (Val(Reg3.Text) = (numSerie * 5)) Then
MsgBox "PROGRAMA Registrado"
Else
MsgBox "programa NO Registrado"
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
SaveSetting App.Title, Me.Name, Me.Reg1.Name, Me.Reg1.Text
SaveSetting App.Title, Me.Name, Me.Reg2.Name, Me.Reg2.Text
SaveSetting App.Title, Me.Name, Me.Reg3.Name, Me.Reg3.Text
End Sub
se necesitan 3 textos reg1,reg2,reg3, un boton, labels registro, primera, y asi es como funciona..
__________________ * Antes de preguntar lee las FAQ, y por favor no hagas preguntas en las FAQ
Sitio http://www.geoavila.com twitter: @GeoAvila
Última edición por GeoAvila; 26/09/2004 a las 20:45 |