Caption = "Take care of (.ini) creation and writing the above information."
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 13
Left = 690
TabIndex = 64
Top = 2250
Width = 4290
End
End
Begin BBSIniMagic INIMAGIC1
AccessMode = 2 'Both
Encryption = -1 'True
EncryptionKey = ""
INIFileName = ""
INIKey = ""
INISection = ""
INIString = ""
Left = 270
Top = 210
End
Begin SSFrame fra3dINIMAGIC
Caption = "LIC File Support"
Font3D = 0 'None
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 3645
Index = 1
Left = 6090
TabIndex = 25
Top = 60
Visible = 0 'False
Width = 5595
Begin SSPanel pnl3dINIMAGIC
AutoSize = 3 'AutoSize Child To Panel
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelWidth = 2
Font3D = 0 'None
Height = 1995
Index = 0
Left = 270
TabIndex = 27
Top = 1170
Width = 5025
Begin TextBox txtLICInfo
BorderStyle = 0 'None
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1935
Left = 30
MultiLine = -1 'True
TabIndex = 5
Top = 30
Width = 4965
End
End
Begin CommandButton cmdLICDone
Caption = "&Done"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 4500
TabIndex = 6
Top = 3240
Width = 825
End
Begin Label lblINIMAGIC
BackStyle = 0 'Transparent
Caption = "In order to use the INIMAGIC.VBX Version 2.2 within the development environment it must be registered. The only means of learning baout the control is through this DEMO and the INIMAGIC.HLP file. Below is an what the INIMAGIC.LIC file contains:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 855
Index = 3
Left = 300
TabIndex = 26
Top = 300
Width = 5085
End
End
Begin SSFrame fra3dINIMAGIC
Caption = "Encryption and Key"
Font3D = 0 'None
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 3645
Index = 2
Left = 6060
TabIndex = 29
Top = 3840
Visible = 0 'False
Width = 5595
Begin SSOption opt3dEncrypt
Caption = "&True"
Font3D = 0 'None
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 0
Left = 2190
TabIndex = 77
TabStop = 0 'False
Top = 1890
Width = 885
End
Begin SSOption opt3dEncrypt
Caption = "&False"
Font3D = 0 'None
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 1
Left = 3120
TabIndex = 76
TabStop = 0 'False
Top = 1890
Width = 885
End
Begin CommandButton cmdSteps
Caption = "&8"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Index = 7
Left = 270
TabIndex = 43
Top = 2820
Width = 315
End
Begin SSPanel pnl3dINIMAGIC
AutoSize = 3 'AutoSize Child To Panel
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelWidth = 2
Caption = "Panel3D1"
Font3D = 0 'None
Height = 255
Index = 6
Left = 2160
TabIndex = 21
Top = 2850
Width = 3015
Begin TextBox txtINIMAGIC
BorderStyle = 0 'None
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 5
Left = 30
TabIndex = 19
Top = 30
Width = 2955
End
End
Begin SSPanel pnl3dINIMAGIC
AutoSize = 3 'AutoSize Child To Panel
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelWidth = 2
Caption = "Panel3D1"
Font3D = 0 'None
Height = 255
Index = 5
Left = 2160
TabIndex = 34
Top = 2190
Width = 3015
Begin TextBox txtINIMAGIC
BorderStyle = 0 'None
Enabled = 0 'False
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 4
Left = 30
TabIndex = 17
Top = 30
Width = 2955
End
End
Begin SSPanel pnl3dINIMAGIC
AutoSize = 3 'AutoSize Child To Panel
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelWidth = 2
Caption = "Panel3D1"
Font3D = 0 'None
Height = 255
Index = 4
Left = 2190
TabIndex = 33
Top = 1530
Width = 2985
Begin TextBox txtINIMAGIC
BorderStyle = 0 'None
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 3
Left = 30
TabIndex = 14
Top = 30
Width = 2925
End
End
Begin SSPanel pnl3dINIMAGIC
AutoSize = 3 'AutoSize Child To Panel
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelWidth = 2
Caption = "Panel3D1"
Font3D = 0 'None
Height = 255
Index = 3
Left = 2190
TabIndex = 32
Top = 1200
Width = 2985
Begin TextBox txtINIMAGIC
BorderStyle = 0 'None
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 2
Left = 30
TabIndex = 12
Top = 30
Width = 2925
End
End
Begin SSPanel pnl3dINIMAGIC
AutoSize = 3 'AutoSize Child To Panel
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelWidth = 2
Caption = "Panel3D1"
Font3D = 0 'None
Height = 255
Index = 2
Left = 2190
TabIndex = 31
Top = 870
Width = 2985
Begin TextBox txtINIMAGIC
BorderStyle = 0 'None
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 1
Left = 30
TabIndex = 10
Top = 30
Width = 2925
End
End
Begin SSPanel pnl3dINIMAGIC
AutoSize = 3 'AutoSize Child To Panel
BackColor = &H00C0C0C0&
BevelOuter = 1 'Inset
BevelWidth = 2
Caption = "Panel3D1"
Font3D = 0 'None
Height = 255
Index = 1
Left = 2190
TabIndex = 30
Top = 540
Width = 2985
Begin TextBox txtINIMAGIC
BorderStyle = 0 'None
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 0
Left = 30
TabIndex = 8
Top = 30
Width = 2925
End
End
Begin CommandButton cmdSteps
Caption = "&7"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Index = 6
Left = 270
TabIndex = 18
Top = 2490
Width = 315
End
Begin CommandButton cmdSteps
Caption = "&6"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Index = 5
Left = 270
TabIndex = 16
Top = 2160
Width = 315
End
Begin CommandButton cmdSteps
Caption = "&5"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Index = 4
Left = 270
TabIndex = 15
Top = 1830
Width = 315
End
Begin CommandButton cmdSteps
Caption = "&4"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Index = 3
Left = 270
TabIndex = 13
Top = 1500
Width = 315
End
Begin CommandButton cmdSteps
Caption = "&3"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Index = 2
Left = 270
TabIndex = 11
Top = 1170
Width = 315
End
Begin CommandButton cmdSteps
Caption = "&2"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Index = 1
Left = 270
TabIndex = 9
Top = 840
Width = 315
End
Begin CommandButton cmdSteps
Caption = "&1"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Index = 0
Left = 270
TabIndex = 7
Top = 510
Width = 315
End
Begin CommandButton cmdEncryptDone
Caption = "&Done"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 4620
TabIndex = 20
Top = 3210
Width = 825
End
Begin Label lblINIMAGIC
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Take care of (.ini) creation and writing the above information."
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 11
Left = 690
TabIndex = 44
Top = 2580
Width = 4290
End
Begin Label lblINIMAGIC
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Decrypted String:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 12
Left = 690
TabIndex = 42
Top = 2910
Width = 1230
End
Begin Label lblINIMAGIC
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "(.ini) Encryption Key:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 10
Left = 660
TabIndex = 41
Top = 2250
Width = 1440
End
Begin Label lblINIMAGIC
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "(.ini) Encryption:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 9
Left = 660
TabIndex = 40
Top = 1920
Width = 1440
End
Begin Label lblINIMAGIC
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "(.ini) String:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 8
Left = 660
TabIndex = 39
Top = 1590
Width = 1440
End
Begin Label lblINIMAGIC
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "(.ini) Key:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 7
Left = 660
TabIndex = 38
Top = 1230
Width = 1440
End
Begin Label lblINIMAGIC
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "(.ini) Section:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 6
Left = 660
TabIndex = 37
Top = 900
Width = 1440
End
Begin Label lblINIMAGIC
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "(.ini) File Name:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 5
Left = 660
TabIndex = 36
Top = 570
Width = 1440
End
Begin Label lblINIMAGIC
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Steps:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 4
Left = 180
TabIndex = 35
Top = 270
Width = 450
End
End
Begin CommonDialog dlgINIMAGIC
Left = 720
Top = 180
End
Begin SSFrame fra3dINIMAGIC
Font3D = 0 'None
ForeColor = &H00000000&
Height = 3405
Index = 0
Left = 1560
TabIndex = 28
Top = 3000
Width = 2805
Begin CommandButton cmdExit
Caption = "E&xit"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 510
TabIndex = 66
Top = 2940
Width = 1905
End
Begin CommandButton cmdHelp
Caption = "Full On-Line &Help"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 480
TabIndex = 0
Top = 990
Width = 1905
End
Begin CommandButton cmdVersion
Caption = "&Version Information"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 510
TabIndex = 1
Top = 1350
Width = 1905
End
Begin CommandButton cmdEncrypt
Caption = "&Encryption and Key"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 510
TabIndex = 2
Top = 1710
Width = 1905
End
Begin CommandButton cmdLIC
Caption = "&LIC File Support"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 510
TabIndex = 3
Top = 2070
Width = 1905
End
Begin CommandButton cmdMode
Caption = "&AccessModes"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 510
TabIndex = 4
Top = 2430
Width = 1905
End
Begin Label lblINIMAGIC
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Open File Dialog Box for selecting (*.ini) files during design time."
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 585
Index = 2
Left = 510
TabIndex = 22
Top = 330
Width = 1935
WordWrap = -1 'True
End
Begin Image imgCheck
Height = 195
Index = 0
Left = 210
Picture = INIMAGIC.FRX:0302
Top = 390
Width = 225
End
Begin Image imgCheck
Height = 195
Index = 1
Left = 210
Picture = INIMAGIC.FRX:045C
Top = 1020
Width = 225
End
Begin Image imgCheck
Height = 195
Index = 2
Left = 210
Picture = INIMAGIC.FRX:05B6
Top = 1380
Width = 225
End
Begin Image imgCheck
Height = 195
Index = 3
Left = 210
Picture = INIMAGIC.FRX:0710
Top = 1770
Width = 225
End
Begin Image imgCheck
Height = 195
Index = 4
Left = 210
Picture = INIMAGIC.FRX:086A
Top = 2100
Width = 225
End
Begin Image imgCheck
Height = 195
Index = 5
Left = 210
Picture = INIMAGIC.FRX:09C4
Top = 2490
Width = 225
End
Begin Label lblINIMAGIC
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Features"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 1
Left = 1080
TabIndex = 24
Top = -30
Width = 615
End
End
Begin Label lblINIMAGIC
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Thank you for taking the time to truy-out INIMAGIC.VBX. The *New* version is an upgrade to the previous 2.1 version, available in CompuServes MSBASIC Forum."
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1185
Index = 0
Left = 1470
TabIndex = 23
Top = 1590
Width = 3015
WordWrap = -1 'True
End
Begin Image imgINIMAGIC
Height = 420
Left = 2700
Picture = INIMAGIC.FRX:0B1E
Top = 990
Width = 420
End
Begin Image imgINIMAGICBanner
Height = 2865
Left = 300
Picture = INIMAGIC.FRX:0D58
Top = 60
Width = 5295
End
End
Option Explicit
' Module level variables.
Dim iResult As Integer
Dim szLICInfo As String
Dim szNewLine As String
' Windows 3.1 Constant Declarations.
Const HELP_FORCEFILE = &H9 ' Ensure correct Help file is displayed
' Common Dialog.
Const DLG_FILE_OPEN = 1
' File Open/Save Dialog Flags.
Const OFN_READONLY = &H1&
Const OFN_OVERWRITEPROMPT = &H2&
Const OFN_HIDEREADONLY = &H4&
Const OFN_NOCHANGEDIR = &H8&
Const OFN_SHOWHELP = &H10&
Const OFN_NOVALIDATE = &H100&
Const OFN_ALLOWMULTISELECT = &H200&
Const OFN_EXTENSIONDIFFERENT = &H400&
Const OFN_PATHMUSTEXIST = &H800&
Const OFN_FILEMUSTEXIST = &H1000&
Const OFN_CREATEPROMPT = &H2000&
Const OFN_SHAREAWARE = &H4000&
Const OFN_NOREADONLYRETURN = &H8000&
' Windows 3.1 API Declarations.
Declare Function WinHelp Lib "User" (ByVal hWnd As Integer, ByVal lpHelpFile As String, ByVal wCommand As Integer, dwData As Any) As Integer
MsgBox "Either enter another (.ini) file or simply use the demo (.ini) file, foo.ini, for demo purposes.", 32, App.Title & " Step 1"
Case 2: ' Step 2.
MsgBox "Enter a section from the (.ini) file, (eg. [foo]).", 32, App.Title & " Step 2"
Case 3: ' Step 3.
MsgBox "Enter a key from the (.ini) file, (eg. foo=).", 32, App.Title & " Step 3"
Case 4: ' Step 4.
MsgBox "Enter a key from the (.ini) file, (eg. foo=).", 32, App.Title & " Step 4"
Case 5: ' Step 5.
MsgBox "Choose whether or not you would like to use encryption?", 32, App.Title & " Step 5"
Case 6: ' Step 6.
MsgBox "If you are using encryption then you may want to specify an encryption key.", 32, App.Title & " Step 5"
Case 7: ' Step 7.
If Me!txtINIMAGIC(0) = "" Then MsgBox "Please go back and follow Step 1.", 48, App.Title & " DEMO Error": Me!txtINIMAGIC(0).SetFocus : Exit Sub
If Me!txtINIMAGIC(1) = "" Then MsgBox "Please go back and follow Step 2.", 48, App.Title & " DEMO Error": Me.txtINIMAGIC(1).SetFocus : Exit Sub
If Me!txtINIMAGIC(2) = "" Then MsgBox "Please go back and follow Step 3.", 48, App.Title & " DEMO Error": Me.txtINIMAGIC(2).SetFocus : Exit Sub
If Me!txtINIMAGIC(3) = "" Then MsgBox "Please go back and follow Step 4.", 48, App.Title & " DEMO Error": Me.txtINIMAGIC(3).SetFocus : Exit Sub
If Me!opt3dEncrypt(0) = True Then
If Me!txtINIMAGIC(4) = "" Then MsgBox "You left the encryption key blank so INIMAGIC will handle encryption by using its internal encryption this time.", 48, App.Title & " DEMO Tip": Exit Sub
End If
' Setup the INIMAGIC Control.
Me!INIMAGIC1.AccessMode = 2 ' Both Read/Write Mode.
' Write the info out.
Me!INIMAGIC1.INIFileName = Me!txtINIMAGIC(0)
Me!INIMAGIC1.INISection = Me!txtINIMAGIC(1)
Me!INIMAGIC1.INIKey = Me!txtINIMAGIC(2)
Me!INIMAGIC1.INIString = Me.txtINIMAGIC(3)
Case 8: ' Step 8.
' Get the string back.
Me!INIMAGIC1.Refresh
Me!txtINIMAGIC(5) = Me!INIMAGIC1.INIString
MsgBox "VOILA!", 64, App.Title & " Step 8 (The End)"
End Select
End Sub
Sub cmdVersion_Click ()
' Display INIMAGIC.VBX version property information.