home *** CD-ROM | disk | FTP | other *** search
/ Delphi Developer's Kit 1996 / Delphi Developer's Kit 1996.iso / power / regmax.000 / mainform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-12-22  |  21.4 KB  |  687 lines

  1. VERSION 2.00
  2. Begin Form MAINFORM 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "GBLIB2.EXE Demonstration. Press F1 for Help"
  6.    ClientHeight    =   6135
  7.    ClientLeft      =   2340
  8.    ClientTop       =   1890
  9.    ClientWidth     =   7155
  10.    Height          =   6825
  11.    Icon            =   MAINFORM.FRX:0000
  12.    Left            =   2280
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   6135
  16.    ScaleWidth      =   7155
  17.    Top             =   1260
  18.    Width           =   7275
  19.    Begin Frame Fra_Info 
  20.       BackColor       =   &H00C0C0C0&
  21.       Caption         =   "R&ead External Information"
  22.       FontBold        =   -1  'True
  23.       FontItalic      =   0   'False
  24.       FontName        =   "Arial"
  25.       FontSize        =   9
  26.       FontStrikethru  =   0   'False
  27.       FontUnderline   =   0   'False
  28.       ForeColor       =   &H00800000&
  29.       Height          =   2475
  30.       Index           =   3
  31.       Left            =   3000
  32.       TabIndex        =   18
  33.       Top             =   3420
  34.       Width           =   2595
  35.       Begin CommandButton btn_Read_Ext_EXE 
  36.          Caption         =   "Read from External EXE"
  37.          FontBold        =   -1  'True
  38.          FontItalic      =   0   'False
  39.          FontName        =   "Arial"
  40.          FontSize        =   9
  41.          FontStrikethru  =   0   'False
  42.          FontUnderline   =   0   'False
  43.          Height          =   495
  44.          Left            =   180
  45.          TabIndex        =   21
  46.          Top             =   480
  47.          Width           =   2235
  48.       End
  49.       Begin CommandButton btn_Read_Ext_INI 
  50.          Caption         =   "External Read INI"
  51.          FontBold        =   -1  'True
  52.          FontItalic      =   0   'False
  53.          FontName        =   "Arial"
  54.          FontSize        =   9
  55.          FontStrikethru  =   0   'False
  56.          FontUnderline   =   0   'False
  57.          Height          =   495
  58.          Left            =   180
  59.          TabIndex        =   20
  60.          Top             =   1080
  61.          Width           =   2235
  62.       End
  63.       Begin CommandButton btn_Read_Ext_EXEINI 
  64.          Caption         =   "Read External INI && EXE"
  65.          FontBold        =   -1  'True
  66.          FontItalic      =   0   'False
  67.          FontName        =   "Arial"
  68.          FontSize        =   9
  69.          FontStrikethru  =   0   'False
  70.          FontUnderline   =   0   'False
  71.          Height          =   495
  72.          Left            =   180
  73.          TabIndex        =   19
  74.          Top             =   1740
  75.          Width           =   2235
  76.       End
  77.    End
  78.    Begin Frame Fra_Info 
  79.       BackColor       =   &H00C0C0C0&
  80.       Caption         =   "Wr&ite to External EXE"
  81.       FontBold        =   -1  'True
  82.       FontItalic      =   0   'False
  83.       FontName        =   "Arial"
  84.       FontSize        =   9
  85.       FontStrikethru  =   0   'False
  86.       FontUnderline   =   0   'False
  87.       ForeColor       =   &H00004080&
  88.       Height          =   2475
  89.       Index           =   2
  90.       Left            =   180
  91.       TabIndex        =   14
  92.       Top             =   3420
  93.       Width           =   2595
  94.       Begin CommandButton btn_Write_Ext_EXE 
  95.          Caption         =   "Write to External EXE"
  96.          FontBold        =   -1  'True
  97.          FontItalic      =   0   'False
  98.          FontName        =   "Arial"
  99.          FontSize        =   9
  100.          FontStrikethru  =   0   'False
  101.          FontUnderline   =   0   'False
  102.          Height          =   495
  103.          Left            =   180
  104.          TabIndex        =   17
  105.          Top             =   480
  106.          Width           =   2235
  107.       End
  108.       Begin CommandButton Btn_Write_Ext_INI 
  109.          Caption         =   "External Write INI"
  110.          FontBold        =   -1  'True
  111.          FontItalic      =   0   'False
  112.          FontName        =   "Arial"
  113.          FontSize        =   9
  114.          FontStrikethru  =   0   'False
  115.          FontUnderline   =   0   'False
  116.          Height          =   495
  117.          Left            =   180
  118.          TabIndex        =   16
  119.          Top             =   1080
  120.          Width           =   2235
  121.       End
  122.       Begin CommandButton btn_Write_Ext_EXEINI 
  123.          Caption         =   "Write External INI && EXE"
  124.          FontBold        =   -1  'True
  125.          FontItalic      =   0   'False
  126.          FontName        =   "Arial"
  127.          FontSize        =   9
  128.          FontStrikethru  =   0   'False
  129.          FontUnderline   =   0   'False
  130.          Height          =   495
  131.          Left            =   180
  132.          TabIndex        =   15
  133.          Top             =   1740
  134.          Width           =   2235
  135.       End
  136.    End
  137.    Begin CommonDialog CMDialog 
  138.       DefaultExt      =   "*.EXE"
  139.       Filter          =   "Executables *.EXE|*.EXE"
  140.       Flags           =   4100
  141.       HelpFile        =   "GBLIB2.hlp"
  142.       Left            =   6120
  143.       Top             =   2460
  144.    End
  145.    Begin CommandButton btn_Check 
  146.       Caption         =   "Self-&Check"
  147.       FontBold        =   0   'False
  148.       FontItalic      =   0   'False
  149.       FontName        =   "Arial"
  150.       FontSize        =   9
  151.       FontStrikethru  =   0   'False
  152.       FontUnderline   =   0   'False
  153.       Height          =   495
  154.       Left            =   2940
  155.       TabIndex        =   9
  156.       Top             =   2760
  157.       Width           =   1215
  158.    End
  159.    Begin Frame Fra_Info 
  160.       BackColor       =   &H00C0C0C0&
  161.       Caption         =   "&Read Information"
  162.       FontBold        =   -1  'True
  163.       FontItalic      =   0   'False
  164.       FontName        =   "Arial"
  165.       FontSize        =   9
  166.       FontStrikethru  =   0   'False
  167.       FontUnderline   =   0   'False
  168.       ForeColor       =   &H00FF0000&
  169.       Height          =   2475
  170.       Index           =   1
  171.       Left            =   2940
  172.       TabIndex        =   6
  173.       Top             =   120
  174.       Width           =   2595
  175.       Begin CommandButton btn_ReadBoth 
  176.          Caption         =   "Self-Read b&oth INI && EXE"
  177.          FontBold        =   -1  'True
  178.          FontItalic      =   0   'False
  179.          FontName        =   "Arial"
  180.          FontSize        =   9
  181.          FontStrikethru  =   0   'False
  182.          FontUnderline   =   0   'False
  183.          Height          =   495
  184.          Left            =   180
  185.          TabIndex        =   13
  186.          Top             =   1740
  187.          Width           =   2235
  188.       End
  189.       Begin CommandButton btn_ReadINIData 
  190.          Caption         =   "Read &INI Information"
  191.          FontBold        =   -1  'True
  192.          FontItalic      =   0   'False
  193.          FontName        =   "Arial"
  194.          FontSize        =   9
  195.          FontStrikethru  =   0   'False
  196.          FontUnderline   =   0   'False
  197.          Height          =   495
  198.          Left            =   180
  199.          TabIndex        =   11
  200.          Top             =   1080
  201.          Width           =   2235
  202.       End
  203.       Begin CommandButton btn_ReadRegData 
  204.          Caption         =   "Self-Read from &EXE"
  205.          FontBold        =   -1  'True
  206.          FontItalic      =   0   'False
  207.          FontName        =   "Arial"
  208.          FontSize        =   9
  209.          FontStrikethru  =   0   'False
  210.          FontUnderline   =   0   'False
  211.          Height          =   495
  212.          Left            =   180
  213.          TabIndex        =   8
  214.          Top             =   480
  215.          Width           =   2235
  216.       End
  217.    End
  218.    Begin Frame Fra_Info 
  219.       BackColor       =   &H00C0C0C0&
  220.       Caption         =   "Wri&te Information"
  221.       FontBold        =   -1  'True
  222.       FontItalic      =   0   'False
  223.       FontName        =   "Arial"
  224.       FontSize        =   9
  225.       FontStrikethru  =   0   'False
  226.       FontUnderline   =   0   'False
  227.       ForeColor       =   &H000000FF&
  228.       Height          =   2475
  229.       Index           =   0
  230.       Left            =   180
  231.       TabIndex        =   5
  232.       Top             =   120
  233.       Width           =   2595
  234.       Begin CommandButton btn_WriteBoth 
  235.          Caption         =   "Self-Wri&te to INI && EXE"
  236.          FontBold        =   -1  'True
  237.          FontItalic      =   0   'False
  238.          FontName        =   "Arial"
  239.          FontSize        =   9
  240.          FontStrikethru  =   0   'False
  241.          FontUnderline   =   0   'False
  242.          Height          =   495
  243.          Left            =   180
  244.          TabIndex        =   12
  245.          Top             =   1740
  246.          Width           =   2235
  247.       End
  248.       Begin CommandButton btn_WriteINIData 
  249.          Caption         =   "Write &INI Information"
  250.          FontBold        =   -1  'True
  251.          FontItalic      =   0   'False
  252.          FontName        =   "Arial"
  253.          FontSize        =   9
  254.          FontStrikethru  =   0   'False
  255.          FontUnderline   =   0   'False
  256.          Height          =   495
  257.          Left            =   180
  258.          TabIndex        =   10
  259.          Top             =   1080
  260.          Width           =   2235
  261.       End
  262.       Begin CommandButton btn_WriteRegData 
  263.          Caption         =   "Self-Write to E&XE"
  264.          FontBold        =   -1  'True
  265.          FontItalic      =   0   'False
  266.          FontName        =   "Arial"
  267.          FontSize        =   9
  268.          FontStrikethru  =   0   'False
  269.          FontUnderline   =   0   'False
  270.          Height          =   495
  271.          Left            =   180
  272.          TabIndex        =   7
  273.          Top             =   480
  274.          Width           =   2235
  275.       End
  276.    End
  277.    Begin CommandButton btn_ENCRYPT 
  278.       Caption         =   "Encr&ypt"
  279.       FontBold        =   0   'False
  280.       FontItalic      =   0   'False
  281.       FontName        =   "Arial"
  282.       FontSize        =   9
  283.       FontStrikethru  =   0   'False
  284.       FontUnderline   =   0   'False
  285.       Height          =   495
  286.       Left            =   1560
  287.       TabIndex        =   2
  288.       Top             =   2760
  289.       Width           =   1215
  290.    End
  291.    Begin CommandButton btn_WINSYSDIR 
  292.       Caption         =   "&WIN/SYSDIR"
  293.       FontBold        =   0   'False
  294.       FontItalic      =   0   'False
  295.       FontName        =   "Arial"
  296.       FontSize        =   9
  297.       FontStrikethru  =   0   'False
  298.       FontUnderline   =   0   'False
  299.       Height          =   495
  300.       Left            =   4320
  301.       TabIndex        =   0
  302.       Top             =   2760
  303.       Width           =   1215
  304.    End
  305.    Begin CommandButton btn_MakeAKey 
  306.       Caption         =   "Ma&keakey"
  307.       FontBold        =   0   'False
  308.       FontItalic      =   0   'False
  309.       FontName        =   "Arial"
  310.       FontSize        =   9
  311.       FontStrikethru  =   0   'False
  312.       FontUnderline   =   0   'False
  313.       Height          =   495
  314.       Left            =   180
  315.       TabIndex        =   1
  316.       Top             =   2760
  317.       Width           =   1215
  318.    End
  319.    Begin CommandButton btn_Exit 
  320.       Cancel          =   -1  'True
  321.       Caption         =   "E&xit"
  322.       FontBold        =   -1  'True
  323.       FontItalic      =   0   'False
  324.       FontName        =   "Arial"
  325.       FontSize        =   9.75
  326.       FontStrikethru  =   0   'False
  327.       FontUnderline   =   0   'False
  328.       Height          =   495
  329.       Left            =   5760
  330.       TabIndex        =   3
  331.       Top             =   180
  332.       Width           =   1215
  333.    End
  334.    Begin Shape sh_MainBorder 
  335.       BorderColor     =   &H00800000&
  336.       BorderStyle     =   6  'Inside Solid
  337.       BorderWidth     =   3
  338.       Height          =   6135
  339.       Left            =   0
  340.       Top             =   0
  341.       Width           =   7155
  342.    End
  343.    Begin Label lbl_Copyright 
  344.       Alignment       =   2  'Center
  345.       BackColor       =   &H00C0C0C0&
  346.       Caption         =   "(c)1995 [GB]"
  347.       Height          =   435
  348.       Left            =   6000
  349.       TabIndex        =   4
  350.       Top             =   5460
  351.       Width           =   735
  352.       WordWrap        =   -1  'True
  353.    End
  354.    Begin Image img_Icon 
  355.       BorderStyle     =   1  'Fixed Single
  356.       Height          =   510
  357.       Left            =   6120
  358.       Picture         =   MAINFORM.FRX:0302
  359.       Top             =   960
  360.       Width           =   510
  361.    End
  362.    Begin Menu mfile 
  363.       Caption         =   "&File"
  364.       Begin Menu mfile_Exit 
  365.          Caption         =   "E&xit"
  366.       End
  367.       Begin Menu mfile_About 
  368.          Caption         =   "&About"
  369.       End
  370.    End
  371. Option Explicit
  372. '   /* Modified 31/12/94 [GB] */
  373. '   /* Created 31/12/94 [GB] */
  374. '   //Form variable for messages//
  375. Dim msg As String
  376. Sub btn_Check_click ()
  377. '   /* Modified 15/01/95 [GB] */
  378. '   /* Created 15/01/95 [GB] */
  379. Dim i_RetVal As Integer
  380. Dim msg As String
  381. i_RetVal = IsUnRegistered()
  382. If i_RetVal = 0 Then
  383.     msg = "Registration cross-checks out OK."
  384.     msg = "Registration cross-check fails." & Chr$(10)
  385.     msg = msg & Check_ErrorString(i_RetVal)
  386. End If
  387. MsgBox msg, 64, "CheckRegistered() Report"
  388. End Sub
  389. Sub btn_ENCRYPT_Click ()
  390. '   /* Modified 14/01/95 [GB] */
  391. '   /* Created 14/01/95 [GB] */
  392. '   //*** Warning *** Alpha data only!//
  393. Dim Answer As String
  394. Dim sz As String
  395. Dim ALen As Integer
  396. '   //Make enough room//
  397. sz = String$(255, 0)
  398. Answer = InputBox$("Type in a string", "EncryptIt Demo", "Gordon Bamber")
  399. '   //Cancel?//
  400. If Answer = "" Then Exit Sub
  401. '   //Check if too long//
  402. If Len(Answer) > 254 Then
  403.     sz = Left$(Answer, 254)
  404.     sz = Answer
  405. End If
  406. '   //Do the deed//
  407. Encryptit sz, ALen
  408. '   //Chop off the surplus//
  409. sz = Left$(sz, ALen)
  410. MsgBox Answer & Chr$(10) & Chr$(10) & "has been encrypted to" & Chr$(10) & Chr$(10) & sz, 64, "Encrypt"
  411. End Sub
  412. Sub btn_Exit_Click ()
  413. '   /* Modified 30/12/94 [GB] */
  414. '   /* Created 30/12/94 [GB] */
  415. End Sub
  416. Sub btn_MakeAKey_Click ()
  417. '   /* Modified 31/12/94 [GB] */
  418. '   /* Created 31/12/94 [GB] */
  419. '   //Simple function. Possible crosscheck on USERNAME/USERORG? //
  420. Dim Answer As Long
  421. Dim sz As String
  422. sz = InputBox$("Type in a string", "MakeAKey Demo", "Gordon Bamber")
  423. '   //Cancel?//
  424. If sz = "" Then Exit Sub
  425. '   //Result has to be a Long Integer Type//
  426. Answer = MakeAKey(sz)
  427. MsgBox "Key generated is " & Format$(Answer), 64, "MakeAKey"
  428. End Sub
  429. Sub btn_Read_Ext_EXE_Click ()
  430. '   /* Modified 15/01/95 [GB] */
  431. '   /* Created 15/01/95 [GB] */
  432. CMDialog.DialogTitle = "Read from External EXE file"
  433. CMDialog.Action = 1
  434. sz_EXEPath = CMDialog.Filename
  435. If sz_EXEPath = "" Then
  436.     sz_EXEPath = Get_sz_CurrentEXEPath()
  437.     Exit Sub
  438. End If
  439. Dim x As Integer
  440. x = MsgBox("Show Date and Expiry Information?", 36, "ReadRegData")
  441. If x = 6 Then
  442.     DisplayRegInfoWithExpiry
  443.     DisplayRegInfo
  444. End If
  445. End Sub
  446. Sub btn_Read_Ext_EXEINI_Click ()
  447. '   /* Modified 15/01/95 [GB] */
  448. '   /* Created 15/01/95 [GB] */
  449. CMDialog.DialogTitle = "Read from External EXE and INI file"
  450. CMDialog.Action = 1
  451. sz_EXEPath = CMDialog.Filename
  452. If sz_EXEPath = "" Then
  453.     sz_EXEPath = Get_sz_CurrentEXEPath()
  454.     Exit Sub
  455. End If
  456. Dim i_RetVal As Integer
  457. i_RetVal = IsUnRegistered()
  458. Dim msg As String
  459. msg = ""
  460. Select Case i_RetVal
  461.     Case Is >= 16384
  462.     msg = msg & "Error in INI-File" & Chr$(10)
  463.     Case Is >= 8192
  464.     msg = msg & "Error in EXE-File"
  465. End Select
  466. msg = msg & Chr$(10) & "USERNAME=" & USERNAME
  467. msg = msg & Chr$(10) & "USERORG=" & USERORG
  468. msg = msg & Chr$(10) & "INI_USERNAME=" & INI_USERNAME
  469. msg = msg & Chr$(10) & "INI_USERORG=" & INI_USERORG
  470. msg = msg & Chr$(10) & "Errorcode is: " & Format$(i_RetVal)
  471. If i_RetVal = 0 Then msg = msg & Chr$(10) & "Registration confirmed OK"
  472. MsgBox msg, 48, "Read both INI and EXE"
  473. End Sub
  474. Sub btn_Read_Ext_INI_Click ()
  475. '   /* Modified 15/01/95 [GB] */
  476. '   /* Created 15/01/95 [GB] */
  477. CMDialog.DialogTitle = "Read from External INI file"
  478. CMDialog.Action = 1
  479. sz_EXEPath = CMDialog.Filename
  480. If sz_EXEPath = "" Then
  481.     sz_EXEPath = Get_sz_CurrentEXEPath()
  482.     Exit Sub
  483. End If
  484. Dim i_RetVal As Integer
  485. i_RetVal = DisplayRegInfoFromINI()
  486. End Sub
  487. Sub btn_ReadBoth_Click ()
  488. '   /* Modified 15/01/95 [GB] */
  489. '   /* Created 15/01/95 [GB] */
  490. sz_EXEPath = Get_sz_CurrentEXEPath()
  491. Dim i_RetVal As Integer
  492. i_RetVal = IsUnRegistered()
  493. Dim msg As String
  494. msg = ""
  495. Select Case i_RetVal
  496.     Case Is >= 16384
  497.     msg = msg & "Error in INI-File" & Chr$(10)
  498.     Case Is >= 8192
  499.     msg = msg & "Error in EXE-File"
  500. End Select
  501. msg = msg & Chr$(10) & "USERNAME=" & USERNAME
  502. msg = msg & Chr$(10) & "USERORG=" & USERORG
  503. msg = msg & Chr$(10) & "INI_USERNAME=" & INI_USERNAME
  504. msg = msg & Chr$(10) & "INI_USERORG=" & INI_USERORG
  505. msg = msg & Chr$(10) & "Errorcode is: " & Format$(i_RetVal)
  506. If i_RetVal = 0 Then msg = msg & Chr$(10) & "Registration confirmed OK"
  507. MsgBox msg, 48, "Read both INI and EXE"
  508. End Sub
  509. Sub btn_ReadINIData_Click ()
  510. '   /* Modified 14/01/95 [GB] */
  511. '   /* Created 14/01/95 [GB] */
  512. sz_EXEPath = Get_sz_CurrentEXEPath()
  513. Dim i_RetVal As Integer
  514. i_RetVal = DisplayRegInfoFromINI()
  515. End Sub
  516. Sub btn_ReadRegData_Click ()
  517. '   /* Modified 31/12/94 [GB] */
  518. '   /* Created 31/12/94 [GB] */
  519. Dim x As Integer
  520. sz_EXEPath = Get_sz_CurrentEXEPath()
  521. '   //Quit out in development mode//
  522. If IsVBRunning() = 0 Then
  523.     x = MsgBox("Show Date and Expiry Information?", 36, "ReadRegData")
  524.     If x = 6 Then
  525.     DisplayRegInfoWithExpiry
  526.     Else
  527.     DisplayRegInfo
  528.     End If
  529.     DevMsg
  530.     Exit Sub
  531. End If
  532. End Sub
  533. Sub btn_WINSYSDIR_Click ()
  534. '   /* Modified 14/01/95 [GB] */
  535. '   /* Created 14/01/95 [GB] */
  536. ShowWinDir
  537. ShowSysDir
  538. End Sub
  539. Sub btn_Write_Ext_EXE_Click ()
  540. '   /* Modified 15/01/95 [GB] */
  541. '   /* Created 15/01/95 [GB] */
  542. CMDialog.DialogTitle = "Write to External EXE file"
  543. CMDialog.Action = 1
  544. sz_EXEPath = CMDialog.Filename
  545. If sz_EXEPath = "" Then
  546.     sz_EXEPath = Get_sz_CurrentEXEPath()
  547.     Exit Sub
  548. End If
  549. EXE = True
  550. INI = False
  551. '   //Hide the main form//
  552. Me.Hide
  553. DoEvents
  554. '   //Show regform non-modally//
  555. Regform.Show
  556. '   //No more writes in this instance!//
  557. DisableWrites
  558. End Sub
  559. Sub btn_Write_Ext_EXEINI_Click ()
  560. '   /* Modified 15/01/95 [GB] */
  561. '   /* Created 15/01/95 [GB] */
  562. CMDialog.DialogTitle = "Write to External EXE and INI file"
  563. CMDialog.Action = 1
  564. sz_EXEPath = CMDialog.Filename
  565. If sz_EXEPath = "" Then
  566.     sz_EXEPath = Get_sz_CurrentEXEPath()
  567.     Exit Sub
  568. End If
  569. EXE = True
  570. INI = True
  571. '   //Hide the main form//
  572. Me.Hide
  573. DoEvents
  574. '   //Show regform non-modally//
  575. Regform.Show
  576. '   //No more writes in this instance!//
  577. DisableWrites
  578. End Sub
  579. Sub Btn_Write_Ext_INI_Click ()
  580. '   /* Modified 15/01/95 [GB] */
  581. '   /* Created 15/01/95 [GB] */
  582. CMDialog.DialogTitle = "Write to External INI file"
  583. CMDialog.Action = 1
  584. sz_EXEPath = CMDialog.Filename
  585. If sz_EXEPath = "" Then
  586.     sz_EXEPath = Get_sz_CurrentEXEPath()
  587.     Exit Sub
  588. End If
  589. EXE = False
  590. INI = True
  591. '   //Hide the main form//
  592. Me.Hide
  593. DoEvents
  594. '   //Show regform non-modally//
  595. Regform.Show
  596. End Sub
  597. Sub btn_WriteBoth_Click ()
  598. '   /* Modified 14/01/95 [GB] */
  599. '   /* Created 14/01/95 [GB] */
  600. EXE = True
  601. INI = True
  602. sz_EXEPath = Get_sz_CurrentEXEPath()
  603. '   //Hide the main form//
  604. Me.Hide
  605. DoEvents
  606. '   //Show regform non-modally//
  607. Regform.Show
  608. '   //No more writes in this instance!//
  609. DisableWrites
  610. End Sub
  611. Sub btn_WriteINIData_Click ()
  612. '   /* Modified 14/01/95 [GB] */
  613. '   /* Created 14/01/95 [GB] */
  614. EXE = False
  615. INI = True
  616. sz_EXEPath = Get_sz_CurrentEXEPath()
  617. '   //Hide the main form//
  618. Me.Hide
  619. DoEvents
  620. '   //Show regform non-modally//
  621. Regform.Show
  622. End Sub
  623. Sub btn_WriteRegData_Click ()
  624. '   /* Modified 30/12/94 [GB] */
  625. '   /* Created 30/12/94 [GB] */
  626. '   //Quit out in development mode//
  627. If IsVBRunning() <> 0 Then
  628.     DevMsg
  629.     Exit Sub
  630. End If
  631. EXE = True
  632. INI = False
  633. sz_EXEPath = Get_sz_CurrentEXEPath()
  634. '   //Hide the main form//
  635. Me.Hide
  636. DoEvents
  637. '   //Show regform non-modally//
  638. Regform.Show
  639. '   //No more writes in this instance!//
  640. DisableWrites
  641. End Sub
  642. Sub DisableWrites ()
  643. '   /* Modified 15/01/95 [GB] */
  644. '   /* Created 15/01/95 [GB] */
  645. btn_WriteINIData.Enabled = False
  646. btn_WriteRegData.Enabled = False
  647. btn_WriteBoth.Enabled = False
  648. btn_Write_Ext_EXE.Enabled = False
  649. btn_Write_EXt_INI.Enabled = False
  650. btn_Write_EXt_EXEINI.Enabled = False
  651. fra_Info(0).Caption = "EXE has been modified"
  652. fra_Info(2).Caption = "Writing now disabled"
  653. End Sub
  654. Sub Form_Load ()
  655. '   /* Modified 11/01/95 [GB] */
  656. '   /* Modified 06/01/94 [GB] */
  657. '   /* Modified 02/01/95 [GB] */
  658. '   //Place the form correctly on the screen//
  659. Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
  660. On Error Resume Next
  661. '   //Check if already running//
  662. If APP.PrevInstance = True Then
  663.     MsgBox APP.EXEName & " is already running. Click OK.", 48, APP.EXEName & " Information"
  664.     AppActivate "GBLIB2.EXE Demonstration. Press F1 for Help"
  665.     DoEvents
  666.     End
  667. End If
  668. '   //Use the current application//
  669. sz_EXEPath = Get_sz_CurrentEXEPath()
  670. '   //Skip the following if in development mode//
  671. If IsVBRunning() = 0 Then ShowSplash
  672. End Sub
  673. Sub mfile_About_Click ()
  674. '   /* Modified 03/01/95 [GB] */
  675. '   /* Created 03/01/95 [GB] */
  676. msg = "The REGMAX/GBLIB2 Project" & Chr$(10) & Chr$(10)
  677. msg = msg & "Source code Copyright" & Chr$(10)
  678. msg = msg & "(c)1994/5 Gordon Bamber" & Chr$(10) & Chr$(10)
  679. msg = msg & "Distributed to Visual Basic V3.0" & Chr$(10)
  680. msg = msg & "developers as FREEWARE"
  681. MsgBox msg, 64, "About"
  682. End Sub
  683. Sub mfile_Exit_Click ()
  684. '   /* Modified 03/01/95 [GB] */
  685. '   /* Created 03/01/95 [GB] */
  686. End Sub
  687.