home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / cdspy / f_toolbo.frm < prev    next >
Text File  |  1995-02-26  |  8KB  |  241 lines

  1. VERSION 2.00
  2. Begin Form F_Toolbox 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   " "
  5.    ClientHeight    =   4290
  6.    ClientLeft      =   6750
  7.    ClientTop       =   2085
  8.    ClientWidth     =   1710
  9.    ControlBox      =   0   'False
  10.    Height          =   4695
  11.    Left            =   6690
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   4290
  16.    ScaleWidth      =   1710
  17.    Tag             =   "Toolbar"
  18.    Top             =   1740
  19.    Visible         =   0   'False
  20.    Width           =   1830
  21.    Begin Frame FrmToolbox 
  22.       Caption         =   "Frame1"
  23.       Height          =   4155
  24.       Left            =   90
  25.       TabIndex        =   0
  26.       Top             =   90
  27.       Width           =   1545
  28.       Begin CommandButton Cmd_Array 
  29.          BackColor       =   &H00C0C0C0&
  30.          Caption         =   "Info"
  31.          Enabled         =   0   'False
  32.          Height          =   525
  33.          Index           =   0
  34.          Left            =   0
  35.          TabIndex        =   1
  36.          Top             =   60
  37.          Width           =   1500
  38.       End
  39.       Begin CommandButton Cmd_Array 
  40.          BackColor       =   &H00C0C0C0&
  41.          Caption         =   "Start"
  42.          Enabled         =   0   'False
  43.          Height          =   525
  44.          Index           =   1
  45.          Left            =   0
  46.          TabIndex        =   8
  47.          Top             =   540
  48.          Width           =   1500
  49.       End
  50.       Begin CommandButton Cmd_Array 
  51.          BackColor       =   &H00C0C0C0&
  52.          Caption         =   "Demo"
  53.          Enabled         =   0   'False
  54.          Height          =   525
  55.          Index           =   2
  56.          Left            =   0
  57.          TabIndex        =   2
  58.          Top             =   1080
  59.          Width           =   1500
  60.       End
  61.       Begin CommandButton Cmd_Array 
  62.          BackColor       =   &H00C0C0C0&
  63.          Caption         =   "Kopieren"
  64.          Enabled         =   0   'False
  65.          Height          =   525
  66.          Index           =   3
  67.          Left            =   0
  68.          TabIndex        =   3
  69.          Top             =   1620
  70.          Width           =   1500
  71.       End
  72.       Begin CommandButton Cmd_Array 
  73.          BackColor       =   &H00C0C0C0&
  74.          Caption         =   "Installieren"
  75.          Enabled         =   0   'False
  76.          Height          =   525
  77.          Index           =   4
  78.          Left            =   0
  79.          TabIndex        =   4
  80.          Top             =   2160
  81.          Width           =   1500
  82.       End
  83.       Begin CommandButton Cmd_Array 
  84.          BackColor       =   &H00C0C0C0&
  85.          Caption         =   "Code"
  86.          Enabled         =   0   'False
  87.          Height          =   525
  88.          Index           =   5
  89.          Left            =   0
  90.          TabIndex        =   5
  91.          Top             =   2610
  92.          Width           =   1500
  93.       End
  94.       Begin CommandButton Cmd_Array 
  95.          BackColor       =   &H00C0C0C0&
  96.          Caption         =   "Hilfedatei"
  97.          Enabled         =   0   'False
  98.          Height          =   525
  99.          Index           =   6
  100.          Left            =   0
  101.          TabIndex        =   6
  102.          Top             =   3150
  103.          Width           =   1500
  104.       End
  105.       Begin CommandButton Cmd_Array 
  106.          BackColor       =   &H00C0C0C0&
  107.          Caption         =   "Readme"
  108.          Enabled         =   0   'False
  109.          Height          =   525
  110.          Index           =   7
  111.          Left            =   0
  112.          TabIndex        =   7
  113.          Top             =   3690
  114.          Width           =   1500
  115.       End
  116.    End
  117. End
  118. Option Explicit
  119. Option Compare Text
  120.  
  121. Sub CMD_Array_Click (Index As Integer)
  122.   Dim i%
  123.   Dim L_Verz$
  124.   Dim OldActive As control
  125.   On Error GoTo Err_Cmd_Array_Click
  126.   Set OldActive = screen.ActiveControl
  127.   Select Case Index
  128.     Case Is = GCM_CMD_INFO
  129.       F_Inform.Show
  130.     Case Is = GCM_CMD_START
  131.       PM_ShowToolbox False
  132.       ' Aktuelles Verzeichnis und Laufwerk sichern
  133.       L_Verz$ = CurDir$
  134.       ' Aktuelles Verzeichnis und Laufwerk setzen
  135.       Rem ChDrive GM_AktElement.Verzeichnis
  136.       ChDir GM_AktElement.Verzeichnis
  137.       PM_ShellAndWait FM_Verz$(GM_AktElement.Verzeichnis) & GM_AktElement.Startfile$
  138.       ' Ursprⁿngliches Verzeichnis und Laufwerk wiederherstellen
  139.       Rem ChDrive L_Verz$
  140.       ChDir L_Verz$
  141.       PM_ShowToolbox True
  142.     Case Is = GCM_CMD_DEMO
  143.       PM_ShowToolbox False
  144.       ' Aktuelles Verzeichnis und Laufwerk sichern
  145.       L_Verz$ = CurDir$
  146.       ' Aktuelles Verzeichnis und Laufwerk setzen
  147.       Rem ChDrive GM_AktElement.Verzeichnis
  148.       ChDir GM_AktElement.Verzeichnis
  149.       PM_ShellAndWait FM_Verz$(GM_AktElement.Verzeichnis) & GM_AktElement.Demofile$
  150.       ' Ursprⁿngliches Verzeichnis und Laufwerk wiederherstellen
  151.       Rem ChDrive L_Verz$
  152.       ChDir L_Verz$
  153.       PM_ShowToolbox True
  154.     Case Is = GCM_CMD_INSTALL
  155.       PM_ShowToolbox False
  156.       ' MDICDSpy.MnuSetup.Enabled = False
  157.       PM_ShellAndWait FM_Verz$(GM_AktElement.Verzeichnis) & GM_AktElement.SetupCommand$
  158.       PM_ShowToolbox True
  159.     Case Is = GCM_CMD_CODE
  160.       F_Codes.Show
  161.     Case Is = GCM_CMD_HILFE
  162.       PM_ShowToolbox False
  163.       ' MDICDSpy.MnuSetup.Enabled = False
  164.       PM_ShellAndWait GM_AktElement.Hilfefile
  165.       PM_ShowToolbox True
  166.     Case Is = GCM_CMD_README
  167.       PM_ShowToolbox False
  168.       ' MDICDSpy.MnuSetup.Enabled = False
  169.       'PM_EditFile FM_Verz$(GM_DB.Verzeichnis$) & CMD_Array(Index).Tag
  170.       PM_LookforExt FM_Verz$(GM_AktElement.Verzeichnis$) & GM_AktElement.Readmefile$
  171.       PM_ShowToolbox True
  172.     Case Is = GCM_CMD_COPY
  173.       PM_ShowToolbox False
  174.       F_Kopie.Show 1
  175.       PM_ShowToolbox True
  176.       If G_CopyFiles$ <> "" Then
  177.         PM_CopyFiles
  178.       End If
  179.   End Select
  180.   OldActive.SetFocus
  181.   Exit Sub
  182. Err_Cmd_Array_Click:
  183.   Select Case Err
  184.     Case Is = GCM_OWNER_ERROR
  185.       If Index = GCM_CMD_README Then
  186.         MsgBox "Die Datei " & Cmd_Array(Index).Tag & " kann nicht betrachtet werden, weil die Verknⁿpfung fehlt!", 48, "Fehler"
  187.       End If
  188.     Case Else
  189.       MsgBox "Die Funktion kann leider nicht ausgefⁿhrt werden.", 48, "Fehler"
  190.   End Select
  191.  
  192.   PM_ShowToolbox True
  193.   Exit Sub
  194. End Sub
  195.  
  196. Sub Form_Activate ()
  197.   P_SetWindowTop Me
  198. End Sub
  199.  
  200. Sub Form_Load ()
  201.   P_ResizeObjectToForm Me, frmToolbox, 100
  202.   P_ResizeMultiObjectToParents Me, frmToolbox, Cmd_Array(0), 8, 0, 0
  203.   P_SetWindowTop Me
  204.   PM_LiesForm Me
  205.   If Me.Left > screen.Width - Me.Width Then
  206.     Me.Left = screen.Width - Me.Width
  207.   End If
  208.   If Me.Top > screen.Height - Me.Height Then
  209.     Me.Top = screen.Height - Me.Height
  210.   End If
  211.  
  212.   Show3d Me
  213. End Sub
  214.  
  215. Sub Form_Paint ()
  216.   If FM_Refresh() Then
  217.     Me.Cmd_Array(GCM_CMD_INFO).Enabled = (GM_AktElement.Info$ <> "")
  218.     MDICDSpy.MnuSetupItem(GCM_CMD_INFO).Visible = Me.Cmd_Array(GCM_CMD_INFO).Enabled
  219.     Me.Cmd_Array(GCM_CMD_START).Enabled = (GM_AktElement.Startfile$ <> "")
  220.     MDICDSpy.MnuSetupItem(GCM_CMD_START).Visible = Me.Cmd_Array(GCM_CMD_START).Enabled
  221.     Me.Cmd_Array(GCM_CMD_DEMO).Enabled = (GM_AktElement.Demofile$ <> "")
  222.     MDICDSpy.MnuSetupItem(GCM_CMD_DEMO).Visible = Me.Cmd_Array(GCM_CMD_DEMO).Enabled
  223.     Me.Cmd_Array(GCM_CMD_COPY).Enabled = GM_AktElement.Copy%
  224.     MDICDSpy.MnuSetupItem(GCM_CMD_COPY).Visible = Me.Cmd_Array(GCM_CMD_COPY).Enabled
  225.     Me.Cmd_Array(GCM_CMD_INSTALL).Enabled = (GM_AktElement.SetupCommand$ <> "")
  226.     MDICDSpy.MnuSetupItem(GCM_CMD_INSTALL).Visible = Me.Cmd_Array(GCM_CMD_INSTALL).Enabled
  227.     Me.Cmd_Array(GCM_CMD_CODE).Enabled = GM_AktElement.Code%
  228.     MDICDSpy.MnuSetupItem(GCM_CMD_CODE).Visible = Me.Cmd_Array(GCM_CMD_CODE).Enabled
  229.     Me.Cmd_Array(GCM_CMD_HILFE).Enabled = (GM_AktElement.Hilfefile$ <> "")
  230.     MDICDSpy.MnuSetupItem(GCM_CMD_HILFE).Visible = Me.Cmd_Array(GCM_CMD_HILFE).Enabled
  231.     Me.Cmd_Array(GCM_CMD_README).Enabled = (GM_AktElement.Readmefile$ <> "")
  232.     MDICDSpy.MnuSetupItem(GCM_CMD_README).Visible = Me.Cmd_Array(GCM_CMD_README).Enabled
  233.   End If
  234. End Sub
  235.  
  236. Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  237. UnloadMode = 0
  238.   PM_SchreibForm Me
  239. End Sub
  240.  
  241.