⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menue.frm

📁 注册使用ocx的例子
💻 FRM
字号:
VERSION 5.00
Object = "{DB1EACDC-26FE-11D2-9A7B-000000000000}#1.0#0"; "Registration.OCX"
Begin VB.Form frmMenue 
   BackColor       =   &H00404040&
   Caption         =   "A small sample - Programm // Version from 17.07.1998"
   ClientHeight    =   6945
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   8580
   LinkTopic       =   "Form1"
   ScaleHeight     =   6945
   ScaleWidth      =   8580
   StartUpPosition =   3  'Windows-Standard
   WindowState     =   2  'Maximiert
   Begin RegistrationOCX.Licence Licence2 
      Left            =   2520
      Top             =   5100
      _ExtentX        =   873
      _ExtentY        =   873
   End
   Begin RegistrationOCX.Licence Licence1 
      Left            =   1680
      Top             =   5100
      _ExtentX        =   873
      _ExtentY        =   873
   End
   Begin RegistrationOCX.Registration_Info Registration_Info1 
      Left            =   1800
      Top             =   2340
      _ExtentX        =   873
      _ExtentY        =   873
   End
   Begin VB.Menu M_Menue 
      Caption         =   "&Menue"
      Begin VB.Menu M_ViewLicenceinformation 
         Caption         =   "[Example] &View Licenceinformation "
      End
      Begin VB.Menu m_Manual_Licenceinformation 
         Caption         =   "[Example] View manual &Licenceinformation"
      End
      Begin VB.Menu M_RegisterthisProgramm 
         Caption         =   "[Example] &Register this Programm "
      End
      Begin VB.Menu M_Manual_Registration 
         Caption         =   "[Example] &Manual Registration"
      End
      Begin VB.Menu M_Info 
         Caption         =   "[Example] &Information"
      End
      Begin VB.Menu M_Nothing 
         Caption         =   "-"
      End
      Begin VB.Menu M_End 
         Caption         =   "&End"
      End
   End
   Begin VB.Menu M_OnlyregisteredUsers 
      Caption         =   "&Only for registered Users !"
   End
End
Attribute VB_Name = "frmMenue"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Form_Load()


'   Center Form frmMenue
Call CenterForm(frmMenue)

'   ATTENTION:
'
'   At Runtime you must set Path one time, to the location where you licence and
'   registrationdata is aviable !

frmMenue.Registration_Info1.Path = App.Path

'   Use Refresh to get the lastest Informations

frmMenue.Registration_Info1.Refresh




If Registration_Info1.LIZENZ_Accepted = False Then
    '
    '   The User does not have accepted the Licence of this
    '   sample-Programm
    '
    '   Therefore they will be now displayed
    '
    Licence1.Caption = "Licence"
    Licence1.Button1Caption = "&Yes"
    Licence1.Button2Caption = "&No"
    Licence1.Text = "Type in here the Text, the User should be motivated to accept the Licence in this form :)"
    Licence1.TextHight = 400
    Licence1.Path = App.Path
    '   Use our own Display
    Licence1.ShowLicenceInformation
    
End If

End Sub



Private Sub Licence1_ClickButton(ByVal Button As Integer)

'
'   You are interested, which Button was clicked ???
'
'   Parameters:
'   Button = 1      : YES
'   Button = 2      : No
'   Button = 4      : Abbort

End Sub

Private Sub Licence1_LicenseABBORT()

'
'   The USER has abbort ...
'
'   ... That should be the same as say "no" to the licence !
'
'       ... oR ?!?
'
'
MsgBox "Licence was abbort ! I think it will be the best to end this sample :)"
End

End Sub

Private Sub Licence1_LicenseNO()

'
'   The USER does not have accepted this licence
'

MsgBox "Licence not accepted ! I think it will be the best to end this sample :)"
End

End Sub

Private Sub Licence1_LicenseYES()

'
'   The USER has say "YES" to your Licence
'

MsgBox "Fine ! Licence accepted"


End Sub

Private Sub M_End_Click()

End

End Sub

Private Sub M_Info_Click()

frmInfo.Show 1

End Sub

Private Sub m_Manual_Licenceinformation_Click()

frmManualLicence.Show 1

End Sub

Private Sub M_Manual_Registration_Click()

frmMenue.Registration_Info1.Refresh
If Registration_Info1.REG_Korrekt = True Then MsgBox ("This Programm is allway's korrekt registered... But try again with this Example !")
frmManualRegistration.Show 1

End Sub

Private Sub M_OnlyregisteredUsers_Click()

'
'   Refresh, to get the latest Informations since last refresh
'

frmMenue.Registration_Info1.Refresh

'
'   Is User registered ???
'
If frmMenue.Registration_Info1.REG_Korrekt = True Then

        MsgBox ("Kongratulation ! You are registered !")
    
    Else
        
        MsgBox ("Sorry... Only for registered User aviable")

End If

End Sub

Private Sub M_RegisterthisProgramm_Click()

frmMenue.Registration_Info1.Refresh

If frmMenue.Registration_Info1.REG_Korrekt = True Then MsgBox ("This Programm is allway's korrekt registered... But try again with this Example !")

frmRegistration.Show 1

End Sub

Private Sub M_ViewLicenceinformation_Click()


Select Case frmMenue.Registration_Info1.LIZENZ_Accepted
    Case True
        MsgBox ("You have accepted this Licence at " & frmMenue.Registration_Info1.LIZENZ_AcceptAtDate & "/" & frmMenue.Registration_Info1.LIZENZ_AcceptAtTime)
End Select

    Licence2.Caption = "You have accepted this Licence at " & frmMenue.Registration_Info1.LIZENZ_AcceptAtDate & "/" & frmMenue.Registration_Info1.LIZENZ_AcceptAtTime
    Licence2.Text = "Do you accept this Licence again ?"
    Licence2.Button1Caption = "&Yes"
    Licence2.Button2Caption = "&No"
    Licence2.TextHight = 200
    Licence2.Path = App.Path
    '   Use our own Display
    Licence2.ShowLicenceInformation

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -