home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 September / CHIP_CD_1997_09_PL.iso / software / testsoft / adabas / setup / data.z / Demo.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-04-09  |  14.9 KB  |  431 lines

  1. VERSION 4.00
  2. Begin VB.MDIForm frmDemo 
  3.    BackColor       =   &H8000000C&
  4.    Caption         =   "Northwind Traders"
  5.    ClientHeight    =   5352
  6.    ClientLeft      =   1500
  7.    ClientTop       =   2352
  8.    ClientWidth     =   9456
  9.    Height          =   5676
  10.    Icon            =   "Demo.frx":0000
  11.    Left            =   1452
  12.    LinkTopic       =   "MDIForm1"
  13.    Top             =   2076
  14.    Width           =   9552
  15.    Begin VB.PictureBox picStatus 
  16.       Align           =   2  'Align Bottom
  17.       BorderStyle     =   0  'None
  18.       Height          =   396
  19.       Left            =   0
  20.       ScaleHeight     =   396
  21.       ScaleWidth      =   9456
  22.       TabIndex        =   13
  23.       Top             =   4956
  24.       Visible         =   0   'False
  25.       Width           =   9456
  26.       Begin VB.TextBox txtStatus 
  27.          BackColor       =   &H00C0C0C0&
  28.          Height          =   285
  29.          Left            =   1740
  30.          Locked          =   -1  'True
  31.          TabIndex        =   14
  32.          TabStop         =   0   'False
  33.          Text            =   "..."
  34.          Top             =   60
  35.          Width           =   7335
  36.       End
  37.    End
  38.    Begin VB.PictureBox picADABAS 
  39.       Align           =   3  'Align Left
  40.       AutoSize        =   -1  'True
  41.       Height          =   4956
  42.       Left            =   1710
  43.       ScaleHeight     =   4908
  44.       ScaleWidth      =   7380
  45.       TabIndex        =   10
  46.       Top             =   0
  47.       Width           =   7428
  48.       Begin VB.Label lblV 
  49.          AutoSize        =   -1  'True
  50.          BackStyle       =   0  'Transparent
  51.          Caption         =   "Visual Basic 4.0 Demo"
  52.          BeginProperty Font 
  53.             name            =   "Arial"
  54.             charset         =   0
  55.             weight          =   700
  56.             size            =   9.6
  57.             underline       =   0   'False
  58.             italic          =   -1  'True
  59.             strikethrough   =   0   'False
  60.          EndProperty
  61.          ForeColor       =   &H00FF0000&
  62.          Height          =   240
  63.          Index           =   0
  64.          Left            =   5040
  65.          TabIndex        =   12
  66.          Top             =   900
  67.          Width           =   2055
  68.       End
  69.       Begin VB.Label lblV 
  70.          AutoSize        =   -1  'True
  71.          BackStyle       =   0  'Transparent
  72.          Caption         =   "Visual Basic 4.0 Demo"
  73.          BeginProperty Font 
  74.             name            =   "Arial"
  75.             charset         =   0
  76.             weight          =   700
  77.             size            =   9.6
  78.             underline       =   0   'False
  79.             italic          =   -1  'True
  80.             strikethrough   =   0   'False
  81.          EndProperty
  82.          ForeColor       =   &H00C0C0C0&
  83.          Height          =   240
  84.          Index           =   1
  85.          Left            =   5040
  86.          TabIndex        =   19
  87.          Top             =   960
  88.          Width           =   2055
  89.       End
  90.       Begin VB.Label lblP 
  91.          AutoSize        =   -1  'True
  92.          BackStyle       =   0  'Transparent
  93.          Caption         =   "Personal Edition"
  94.          BeginProperty Font 
  95.             name            =   "Arial"
  96.             charset         =   0
  97.             weight          =   700
  98.             size            =   9.6
  99.             underline       =   0   'False
  100.             italic          =   -1  'True
  101.             strikethrough   =   0   'False
  102.          EndProperty
  103.          ForeColor       =   &H00FF0000&
  104.          Height          =   240
  105.          Index           =   0
  106.          Left            =   5520
  107.          TabIndex        =   17
  108.          Top             =   600
  109.          Width           =   1530
  110.       End
  111.       Begin VB.Label lblA 
  112.          AutoSize        =   -1  'True
  113.          BackStyle       =   0  'Transparent
  114.          Caption         =   "ADABAS D"
  115.          BeginProperty Font 
  116.             name            =   "Times New Roman"
  117.             charset         =   0
  118.             weight          =   700
  119.             size            =   24
  120.             underline       =   0   'False
  121.             italic          =   0   'False
  122.             strikethrough   =   0   'False
  123.          EndProperty
  124.          ForeColor       =   &H00FF0000&
  125.          Height          =   495
  126.          Index           =   0
  127.          Left            =   4560
  128.          TabIndex        =   15
  129.          Top             =   60
  130.          Width           =   2445
  131.       End
  132.       Begin VB.Label lblP 
  133.          AutoSize        =   -1  'True
  134.          BackStyle       =   0  'Transparent
  135.          Caption         =   "Personal Edition"
  136.          BeginProperty Font 
  137.             name            =   "Arial"
  138.             charset         =   0
  139.             weight          =   700
  140.             size            =   9.6
  141.             underline       =   0   'False
  142.             italic          =   -1  'True
  143.             strikethrough   =   0   'False
  144.          EndProperty
  145.          ForeColor       =   &H00C0C0C0&
  146.          Height          =   240
  147.          Index           =   1
  148.          Left            =   5520
  149.          TabIndex        =   18
  150.          Top             =   660
  151.          Width           =   1530
  152.       End
  153.       Begin VB.Label lblA 
  154.          AutoSize        =   -1  'True
  155.          BackStyle       =   0  'Transparent
  156.          Caption         =   "ADABAS D"
  157.          BeginProperty Font 
  158.             name            =   "Times New Roman"
  159.             charset         =   0
  160.             weight          =   700
  161.             size            =   24
  162.             underline       =   0   'False
  163.             italic          =   0   'False
  164.             strikethrough   =   0   'False
  165.          EndProperty
  166.          ForeColor       =   &H00C0C0C0&
  167.          Height          =   495
  168.          Index           =   1
  169.          Left            =   4620
  170.          TabIndex        =   16
  171.          Top             =   120
  172.          Width           =   2445
  173.       End
  174.       Begin VB.Label lblInfo 
  175.          BackStyle       =   0  'Transparent
  176.          Caption         =   "Info"
  177.          BeginProperty Font 
  178.             name            =   "MS Sans Serif"
  179.             charset         =   0
  180.             weight          =   700
  181.             size            =   9.6
  182.             underline       =   0   'False
  183.             italic          =   0   'False
  184.             strikethrough   =   0   'False
  185.          EndProperty
  186.          ForeColor       =   &H00FF0000&
  187.          Height          =   852
  188.          Index           =   0
  189.          Left            =   360
  190.          TabIndex        =   11
  191.          Top             =   1260
  192.          Visible         =   0   'False
  193.          Width           =   3792
  194.       End
  195.       Begin VB.Label lblInfo 
  196.          BackStyle       =   0  'Transparent
  197.          Caption         =   "Info"
  198.          BeginProperty Font 
  199.             name            =   "MS Sans Serif"
  200.             charset         =   0
  201.             weight          =   700
  202.             size            =   9.6
  203.             underline       =   0   'False
  204.             italic          =   0   'False
  205.             strikethrough   =   0   'False
  206.          EndProperty
  207.          ForeColor       =   &H00C0C0C0&
  208.          Height          =   852
  209.          Index           =   1
  210.          Left            =   420
  211.          TabIndex        =   20
  212.          Top             =   1320
  213.          Visible         =   0   'False
  214.          Width           =   3792
  215.       End
  216.       Begin VB.Image imgADABAS 
  217.          Height          =   5055
  218.          Left            =   0
  219.          Picture         =   "Demo.frx":030A
  220.          Stretch         =   -1  'True
  221.          Top             =   -60
  222.          Width           =   7335
  223.       End
  224.    End
  225.    Begin VB.PictureBox picPanel 
  226.       Align           =   3  'Align Left
  227.       AutoSize        =   -1  'True
  228.       Height          =   4956
  229.       Left            =   0
  230.       ScaleHeight     =   4908
  231.       ScaleWidth      =   1668
  232.       TabIndex        =   0
  233.       Top             =   0
  234.       Width           =   1716
  235.       Begin VB.CommandButton cmdForm 
  236.          Caption         =   "&Requests..."
  237.          Height          =   495
  238.          Index           =   8
  239.          Left            =   60
  240.          TabIndex        =   9
  241.          Tag             =   "SQL requests"
  242.          Top             =   4380
  243.          Width           =   1515
  244.       End
  245.       Begin VB.CommandButton cmdForm 
  246.          Caption         =   "S&ales/Employee"
  247.          Height          =   495
  248.          Index           =   7
  249.          Left            =   60
  250.          TabIndex        =   8
  251.          Tag             =   "Graphic with sales per employee"
  252.          Top             =   3840
  253.          Width           =   1515
  254.       End
  255.       Begin VB.CommandButton cmdForm 
  256.          Caption         =   "Sh&ippers"
  257.          Height          =   495
  258.          Index           =   6
  259.          Left            =   60
  260.          TabIndex        =   7
  261.          Tag             =   "List of shippers"
  262.          Top             =   3300
  263.          Width           =   1515
  264.       End
  265.       Begin VB.CommandButton cmdForm 
  266.          Caption         =   "&Suppliers"
  267.          Height          =   495
  268.          Index           =   5
  269.          Left            =   60
  270.          TabIndex        =   6
  271.          Tag             =   "Suppliers of Northwind Traders"
  272.          Top             =   2760
  273.          Width           =   1515
  274.       End
  275.       Begin VB.CommandButton cmdForm 
  276.          Caption         =   "&Orders"
  277.          Height          =   495
  278.          Index           =   4
  279.          Left            =   60
  280.          TabIndex        =   5
  281.          Tag             =   "All orders with details (Master-Detail)"
  282.          Top             =   2220
  283.          Width           =   1515
  284.       End
  285.       Begin VB.CommandButton cmdForm 
  286.          Caption         =   "&Employees"
  287.          Height          =   495
  288.          Index           =   3
  289.          Left            =   60
  290.          TabIndex        =   4
  291.          Tag             =   "Employees of Northwind Traders"
  292.          Top             =   1680
  293.          Width           =   1515
  294.       End
  295.       Begin VB.CommandButton cmdForm 
  296.          Caption         =   "C&ustomers"
  297.          Height          =   495
  298.          Index           =   2
  299.          Left            =   60
  300.          TabIndex        =   3
  301.          Tag             =   "Customers of Northwind Traders"
  302.          Top             =   1140
  303.          Width           =   1515
  304.       End
  305.       Begin VB.CommandButton cmdForm 
  306.          Caption         =   "&Products"
  307.          Height          =   495
  308.          Index           =   1
  309.          Left            =   60
  310.          TabIndex        =   2
  311.          Tag             =   "Products form"
  312.          Top             =   600
  313.          Width           =   1515
  314.       End
  315.       Begin VB.CommandButton cmdForm 
  316.          Caption         =   "&Categories"
  317.          Height          =   495
  318.          Index           =   0
  319.          Left            =   60
  320.          TabIndex        =   1
  321.          Tag             =   "Categories with products (Master-Detail)"
  322.          Top             =   60
  323.          Width           =   1515
  324.       End
  325.    End
  326. Attribute VB_Name = "frmDemo"
  327. Attribute VB_Creatable = False
  328. Attribute VB_Exposed = False
  329. ' ADABAS D
  330. ' Personal Edition
  331. ' Copyright 
  332.  1995 Software AG
  333. Option Explicit
  334. Private Sub cmdForm_Click(Index As Integer)
  335.     picADABAS.Visible = False
  336.     picStatus.Visible = True
  337.     MousePointer = vbHourglass
  338.     Select Case Index
  339.         Case 0: frmCategories.Show
  340.         Case 1: frmProducts.Show
  341.         Case 2: frmCustomers.Show
  342.         Case 3: frmEmployees.Show
  343.         Case 4: frmOrders.Show
  344.         Case 5: frmSuppliers.Show
  345.         Case 6: frmShippers.Show
  346.         Case 7: frmSales.Show
  347.         Case 8: frmRequests.Show
  348.     End Select
  349.     MousePointer = vbDefault
  350. End Sub
  351. Private Sub cmdForm_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  352.     Dim i As Integer
  353.     If Forms.Count = 1 Then
  354.         If Not picADABAS.Visible Then
  355.             picStatus.Visible = False
  356.             picADABAS.Visible = True
  357.         End If
  358.         For i = 0 To 1
  359.             lblInfo(i).Caption = cmdForm(Index).Tag
  360.             lblInfo(i).Visible = True
  361.         Next
  362.     End If
  363. End Sub
  364. Private Sub imgADABAS_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  365.     Dim i As Integer
  366.     For i = 0 To 1
  367.         If lblInfo(i).Visible Then
  368.             lblInfo(i).Visible = False
  369.         End If
  370.     Next
  371. End Sub
  372. Private Sub MDIForm_Load()
  373.     On Error GoTo MDIForm_Load_Error
  374.     StatusClose
  375.     lblInfo(0).ForeColor = RGB(128, 0, 192)
  376.     lblInfo(1).Move lblInfo(0).Left + Screen.TwipsPerPixelX, lblInfo(0).Top + Screen.TwipsPerPixelY
  377.     Exit Sub
  378. MDIForm_Load_End:
  379.     Unload Me
  380.     Exit Sub
  381. MDIForm_Load_Error:
  382.     StatusClose
  383.     MsgBox "Error " & Str(Err.Number)
  384.     Resume MDIForm_Load_End
  385. End Sub
  386. Private Sub MDIForm_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  387.     If Forms.Count = 1 Then
  388.         If Not picADABAS.Visible Then
  389.             picStatus.Visible = False
  390.             picADABAS.Visible = True
  391.         End If
  392.     End If
  393. End Sub
  394. Private Sub MDIForm_Resize()
  395.     If WindowState = 1 Then Exit Sub
  396.     If (Me.Width - picPanel.Width - Screen.TwipsPerPixelX * 8) > 0 Then
  397.         picADABAS.Width = Me.Width - picPanel.Width - Screen.TwipsPerPixelX * 8
  398.     End If
  399. End Sub
  400. Private Sub MDIForm_Unload(Cancel As Integer)
  401.     dbCurrentDB.Close
  402. End Sub
  403. Private Sub picADABAS_Resize()
  404.     imgADABAS.Move 0, 0, picADABAS.ScaleWidth, picADABAS.ScaleHeight
  405.     If (picADABAS.ScaleWidth - lblA(0).Width - Screen.TwipsPerPixelX * 12) > 0 Then
  406.         lblA(0).Move picADABAS.ScaleWidth - lblA(0).Width - Screen.TwipsPerPixelX * 12, Screen.TwipsPerPixelY * 4
  407.         lblA(1).Move picADABAS.ScaleWidth - lblA(1).Width - Screen.TwipsPerPixelX * 11, Screen.TwipsPerPixelY * 5
  408.         lblP(0).Move picADABAS.ScaleWidth - lblP(0).Width - Screen.TwipsPerPixelX * 12, lblA(0).Top + lblA(0).Height
  409.         lblP(1).Move picADABAS.ScaleWidth - lblP(1).Width - Screen.TwipsPerPixelX * 11, lblA(1).Top + lblA(1).Height
  410.         lblV(0).Move picADABAS.ScaleWidth - lblV(0).Width - Screen.TwipsPerPixelX * 12, lblP(0).Top + lblP(0).Height + Screen.TwipsPerPixelY * 5
  411.         lblV(1).Move picADABAS.ScaleWidth - lblV(1).Width - Screen.TwipsPerPixelX * 11, lblP(1).Top + lblP(1).Height + Screen.TwipsPerPixelY * 5
  412.     End If
  413. End Sub
  414. Private Sub picPanel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  415.     Dim i As Integer
  416.     If Forms.Count = 1 Then
  417.         If Not picADABAS.Visible Then
  418.             picStatus.Visible = False
  419.             picADABAS.Visible = True
  420.         End If
  421.         For i = 0 To 1
  422.             lblInfo(i).Visible = False
  423.         Next
  424.     End If
  425. End Sub
  426. Private Sub picStatus_Resize()
  427.     If (picStatus.Width - txtStatus.Left - 60) > 0 Then
  428.         txtStatus.Width = picStatus.Width - txtStatus.Left - 60
  429.     End If
  430. End Sub
  431.