home *** CD-ROM | disk | FTP | other *** search
/ Master 95 #1 / MASTER95_1.iso / microsof / vbasic4 / vb4-6.cab / calldlls.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-07-26  |  29.5 KB  |  852 lines

  1. VERSION 4.00
  2. Begin VB.Form frmCallDlls 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Calling DLL Procedures"
  5.    ClientHeight    =   1890
  6.    ClientLeft      =   2400
  7.    ClientTop       =   3270
  8.    ClientWidth     =   5535
  9.    ClipControls    =   0   'False
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   1
  13.       weight          =   700
  14.       size            =   8.25
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    Height          =   2295
  20.    Left            =   2340
  21.    LinkTopic       =   "Form1"
  22.    MaxButton       =   0   'False
  23.    ScaleHeight     =   1890
  24.    ScaleWidth      =   5535
  25.    Top             =   2925
  26.    Width           =   5655
  27.    Begin VB.PictureBox picSprite 
  28.       AutoRedraw      =   -1  'True
  29.       AutoSize        =   -1  'True
  30.       BeginProperty Font 
  31.          name            =   "MS Sans Serif"
  32.          charset         =   1
  33.          weight          =   700
  34.          size            =   8.25
  35.          underline       =   0   'False
  36.          italic          =   0   'False
  37.          strikethrough   =   0   'False
  38.       EndProperty
  39.       Height          =   510
  40.       Left            =   960
  41.       Picture         =   "CALLDLLS.frx":0000
  42.       ScaleHeight     =   32
  43.       ScaleMode       =   3  'Pixel
  44.       ScaleWidth      =   32
  45.       TabIndex        =   25
  46.       Top             =   1920
  47.       Visible         =   0   'False
  48.       Width           =   510
  49.    End
  50.    Begin VB.PictureBox picCopy 
  51.       AutoRedraw      =   -1  'True
  52.       BorderStyle     =   0  'None
  53.       BeginProperty Font 
  54.          name            =   "MS Sans Serif"
  55.          charset         =   1
  56.          weight          =   700
  57.          size            =   8.25
  58.          underline       =   0   'False
  59.          italic          =   0   'False
  60.          strikethrough   =   0   'False
  61.       EndProperty
  62.       Height          =   495
  63.       Left            =   1680
  64.       ScaleHeight     =   33
  65.       ScaleMode       =   3  'Pixel
  66.       ScaleWidth      =   33
  67.       TabIndex        =   24
  68.       Top             =   1920
  69.       Visible         =   0   'False
  70.       Width           =   495
  71.    End
  72.    Begin VB.PictureBox picMask 
  73.       AutoRedraw      =   -1  'True
  74.       AutoSize        =   -1  'True
  75.       BeginProperty Font 
  76.          name            =   "MS Sans Serif"
  77.          charset         =   1
  78.          weight          =   700
  79.          size            =   8.25
  80.          underline       =   0   'False
  81.          italic          =   0   'False
  82.          strikethrough   =   0   'False
  83.       EndProperty
  84.       Height          =   510
  85.       Left            =   240
  86.       Picture         =   "CALLDLLS.frx":030A
  87.       ScaleHeight     =   32
  88.       ScaleMode       =   3  'Pixel
  89.       ScaleWidth      =   32
  90.       TabIndex        =   23
  91.       Top             =   1920
  92.       Visible         =   0   'False
  93.       Width           =   510
  94.    End
  95.    Begin VB.CommandButton cmdBitBlt 
  96.       Caption         =   "BitBlt"
  97.       BeginProperty Font 
  98.          name            =   "MS Sans Serif"
  99.          charset         =   1
  100.          weight          =   700
  101.          size            =   8.25
  102.          underline       =   0   'False
  103.          italic          =   0   'False
  104.          strikethrough   =   0   'False
  105.       EndProperty
  106.       Height          =   495
  107.       Left            =   4680
  108.       TabIndex        =   22
  109.       Top             =   1320
  110.       Width           =   735
  111.    End
  112.    Begin VB.Frame fraInfo 
  113.       Caption         =   "Instructions"
  114.       ClipControls    =   0   'False
  115.       BeginProperty Font 
  116.          name            =   "MS Sans Serif"
  117.          charset         =   1
  118.          weight          =   700
  119.          size            =   8.25
  120.          underline       =   0   'False
  121.          italic          =   0   'False
  122.          strikethrough   =   0   'False
  123.       EndProperty
  124.       Height          =   1695
  125.       Index           =   0
  126.       Left            =   120
  127.       TabIndex        =   0
  128.       Top             =   120
  129.       Width           =   4455
  130.       Begin VB.Label lblInfo 
  131.          Caption         =   "Click the right mouse button on the icons to the right."
  132.          BeginProperty Font 
  133.             name            =   "MS Sans Serif"
  134.             charset         =   1
  135.             weight          =   700
  136.             size            =   8.25
  137.             underline       =   0   'False
  138.             italic          =   0   'False
  139.             strikethrough   =   0   'False
  140.          EndProperty
  141.          Height          =   495
  142.          Index           =   1
  143.          Left            =   840
  144.          TabIndex        =   1
  145.          Top             =   480
  146.          Width           =   2415
  147.       End
  148.    End
  149.    Begin VB.Timer tmrBounce 
  150.       Enabled         =   0   'False
  151.       Interval        =   1
  152.       Left            =   4080
  153.       Top             =   1920
  154.    End
  155.    Begin VB.Frame fraInfo 
  156.       Caption         =   "General Info"
  157.       ClipControls    =   0   'False
  158.       BeginProperty Font 
  159.          name            =   "MS Sans Serif"
  160.          charset         =   1
  161.          weight          =   700
  162.          size            =   8.25
  163.          underline       =   0   'False
  164.          italic          =   0   'False
  165.          strikethrough   =   0   'False
  166.       EndProperty
  167.       Height          =   1695
  168.       Index           =   4
  169.       Left            =   120
  170.       TabIndex        =   13
  171.       Top             =   120
  172.       Visible         =   0   'False
  173.       Width           =   4455
  174.       Begin VB.Label lblInfo 
  175.          Caption         =   "Keyboard:"
  176.          BeginProperty Font 
  177.             name            =   "MS Sans Serif"
  178.             charset         =   1
  179.             weight          =   700
  180.             size            =   8.25
  181.             underline       =   0   'False
  182.             italic          =   0   'False
  183.             strikethrough   =   0   'False
  184.          EndProperty
  185.          Height          =   435
  186.          Index           =   14
  187.          Left            =   120
  188.          TabIndex        =   17
  189.          Top             =   1080
  190.          Width           =   4230
  191.       End
  192.       Begin VB.Label lblInfo 
  193.          AutoSize        =   -1  'True
  194.          Caption         =   "Language:"
  195.          BeginProperty Font 
  196.             name            =   "MS Sans Serif"
  197.             charset         =   1
  198.             weight          =   700
  199.             size            =   8.25
  200.             underline       =   0   'False
  201.             italic          =   0   'False
  202.             strikethrough   =   0   'False
  203.          EndProperty
  204.          Height          =   195
  205.          Index           =   13
  206.          Left            =   120
  207.          TabIndex        =   16
  208.          Top             =   840
  209.          Width           =   915
  210.       End
  211.       Begin VB.Label lblInfo 
  212.          AutoSize        =   -1  'True
  213.          Caption         =   "Mouse:"
  214.          BeginProperty Font 
  215.             name            =   "MS Sans Serif"
  216.             charset         =   1
  217.             weight          =   700
  218.             size            =   8.25
  219.             underline       =   0   'False
  220.             italic          =   0   'False
  221.             strikethrough   =   0   'False
  222.          EndProperty
  223.          Height          =   195
  224.          Index           =   12
  225.          Left            =   120
  226.          TabIndex        =   15
  227.          Top             =   360
  228.          Width           =   630
  229.       End
  230.       Begin VB.Label lblInfo 
  231.          AutoSize        =   -1  'True
  232.          Caption         =   "Network:"
  233.          BeginProperty Font 
  234.             name            =   "MS Sans Serif"
  235.             charset         =   1
  236.             weight          =   700
  237.             size            =   8.25
  238.             underline       =   0   'False
  239.             italic          =   0   'False
  240.             strikethrough   =   0   'False
  241.          EndProperty
  242.          Height          =   195
  243.          Index           =   11
  244.          Left            =   120
  245.          TabIndex        =   14
  246.          Top             =   600
  247.          Width           =   780
  248.       End
  249.    End
  250.    Begin VB.Frame fraInfo 
  251.       Caption         =   "Operating System"
  252.       ClipControls    =   0   'False
  253.       BeginProperty Font 
  254.          name            =   "MS Sans Serif"
  255.          charset         =   1
  256.          weight          =   700
  257.          size            =   8.25
  258.          underline       =   0   'False
  259.          italic          =   0   'False
  260.          strikethrough   =   0   'False
  261.       EndProperty
  262.       Height          =   1695
  263.       Index           =   1
  264.       Left            =   120
  265.       TabIndex        =   2
  266.       Top             =   120
  267.       Visible         =   0   'False
  268.       Width           =   4455
  269.       Begin VB.Label lblInfo 
  270.          AutoSize        =   -1  'True
  271.          Caption         =   "(Enhanced mode)"
  272.          BeginProperty Font 
  273.             name            =   "MS Sans Serif"
  274.             charset         =   1
  275.             weight          =   700
  276.             size            =   8.25
  277.             underline       =   0   'False
  278.             italic          =   0   'False
  279.             strikethrough   =   0   'False
  280.          EndProperty
  281.          Height          =   195
  282.          Index           =   3
  283.          Left            =   360
  284.          TabIndex        =   8
  285.          Top             =   600
  286.          Width           =   1500
  287.       End
  288.       Begin VB.Label lblInfo 
  289.          AutoSize        =   -1  'True
  290.          Caption         =   "Disk Operating System 5.0"
  291.          BeginProperty Font 
  292.             name            =   "MS Sans Serif"
  293.             charset         =   1
  294.             weight          =   700
  295.             size            =   8.25
  296.             underline       =   0   'False
  297.             italic          =   0   'False
  298.             strikethrough   =   0   'False
  299.          EndProperty
  300.          Height          =   195
  301.          Index           =   4
  302.          Left            =   240
  303.          TabIndex        =   4
  304.          Top             =   960
  305.          Width           =   2265
  306.       End
  307.       Begin VB.Label lblInfo 
  308.          AutoSize        =   -1  'True
  309.          Caption         =   "Microsoft Windows Version 3.1"
  310.          BeginProperty Font 
  311.             name            =   "MS Sans Serif"
  312.             charset         =   1
  313.             weight          =   700
  314.             size            =   8.25
  315.             underline       =   0   'False
  316.             italic          =   0   'False
  317.             strikethrough   =   0   'False
  318.          EndProperty
  319.          Height          =   195
  320.          Index           =   2
  321.          Left            =   240
  322.          TabIndex        =   3
  323.          Top             =   360
  324.          Width           =   2640
  325.       End
  326.    End
  327.    Begin VB.Frame fraInfo 
  328.       Caption         =   "Processor, Memory, and System Resources"
  329.       ClipControls    =   0   'False
  330.       BeginProperty Font 
  331.          name            =   "MS Sans Serif"
  332.          charset         =   1
  333.          weight          =   700
  334.          size            =   8.25
  335.          underline       =   0   'False
  336.          italic          =   0   'False
  337.          strikethrough   =   0   'False
  338.       EndProperty
  339.       Height          =   1695
  340.       Index           =   2
  341.       Left            =   120
  342.       TabIndex        =   5
  343.       Top             =   120
  344.       Visible         =   0   'False
  345.       Width           =   4455
  346.       Begin VB.Timer tmrSysInfo 
  347.          Interval        =   1
  348.          Left            =   3840
  349.          Top             =   240
  350.       End
  351.       Begin VB.Shape shpFrame 
  352.          Height          =   255
  353.          Index           =   1
  354.          Left            =   1080
  355.          Top             =   960
  356.          Width           =   3135
  357.       End
  358.       Begin VB.Shape shpBar 
  359.          BackStyle       =   1  'Opaque
  360.          DrawMode        =   7  'Invert
  361.          Height          =   255
  362.          Index           =   1
  363.          Left            =   1080
  364.          Top             =   960
  365.          Width           =   1695
  366.       End
  367.       Begin VB.Shape shpFrame 
  368.          Height          =   255
  369.          Index           =   2
  370.          Left            =   1080
  371.          Top             =   1320
  372.          Width           =   3135
  373.       End
  374.       Begin VB.Shape shpBar 
  375.          BackStyle       =   1  'Opaque
  376.          DrawMode        =   7  'Invert
  377.          Height          =   255
  378.          Index           =   2
  379.          Left            =   1080
  380.          Top             =   1320
  381.          Width           =   1695
  382.       End
  383.       Begin VB.Label lblResInfo 
  384.          Alignment       =   2  'Center
  385.          Caption         =   "user"
  386.          BeginProperty Font 
  387.             name            =   "MS Sans Serif"
  388.             charset         =   1
  389.             weight          =   700
  390.             size            =   8.25
  391.             underline       =   0   'False
  392.             italic          =   0   'False
  393.             strikethrough   =   0   'False
  394.          EndProperty
  395.          Height          =   255
  396.          Index           =   2
  397.          Left            =   1080
  398.          TabIndex        =   21
  399.          Top             =   1320
  400.          Width           =   3135
  401.       End
  402.       Begin VB.Label lblResInfo 
  403.          Alignment       =   2  'Center
  404.          Caption         =   "gdi"
  405.          BeginProperty Font 
  406.             name            =   "MS Sans Serif"
  407.             charset         =   1
  408.             weight          =   700
  409.             size            =   8.25
  410.             underline       =   0   'False
  411.             italic          =   0   'False
  412.             strikethrough   =   0   'False
  413.          EndProperty
  414.          Height          =   255
  415.          Index           =   1
  416.          Left            =   1080
  417.          TabIndex        =   20
  418.          Top             =   960
  419.          Width           =   3135
  420.       End
  421.       Begin VB.Label lblR 
  422.          Caption         =   "GDI"
  423.          BeginProperty Font 
  424.             name            =   "MS Sans Serif"
  425.             charset         =   1
  426.             weight          =   700
  427.             size            =   8.25
  428.             underline       =   0   'False
  429.             italic          =   0   'False
  430.             strikethrough   =   0   'False
  431.          EndProperty
  432.          Height          =   255
  433.          Index           =   1
  434.          Left            =   240
  435.          TabIndex        =   19
  436.          Top             =   960
  437.          Width           =   855
  438.       End
  439.       Begin VB.Label lblR 
  440.          Caption         =   "User"
  441.          BeginProperty Font 
  442.             name            =   "MS Sans Serif"
  443.             charset         =   1
  444.             weight          =   700
  445.             size            =   8.25
  446.             underline       =   0   'False
  447.             italic          =   0   'False
  448.             strikethrough   =   0   'False
  449.          EndProperty
  450.          Height          =   255
  451.          Index           =   2
  452.          Left            =   240
  453.          TabIndex        =   18
  454.          Top             =   1320
  455.          Width           =   855
  456.       End
  457.       Begin VB.Label lblInfo 
  458.          AutoSize        =   -1  'True
  459.          Caption         =   "CPU: 486 (with Math Coprocessor)"
  460.          BeginProperty Font 
  461.             name            =   "MS Sans Serif"
  462.             charset         =   1
  463.             weight          =   700
  464.             size            =   8.25
  465.             underline       =   0   'False
  466.             italic          =   0   'False
  467.             strikethrough   =   0   'False
  468.          EndProperty
  469.          Height          =   195
  470.          Index           =   5
  471.          Left            =   240
  472.          TabIndex        =   7
  473.          Top             =   360
  474.          Width           =   2940
  475.       End
  476.       Begin VB.Label lblInfo 
  477.          AutoSize        =   -1  'True
  478.          Caption         =   "Memory Free"
  479.          BeginProperty Font 
  480.             name            =   "MS Sans Serif"
  481.             charset         =   1
  482.             weight          =   700
  483.             size            =   8.25
  484.             underline       =   0   'False
  485.             italic          =   0   'False
  486.             strikethrough   =   0   'False
  487.          EndProperty
  488.          Height          =   195
  489.          Index           =   6
  490.          Left            =   240
  491.          TabIndex        =   6
  492.          Top             =   600
  493.          Width           =   1095
  494.       End
  495.    End
  496.    Begin VB.Frame fraInfo 
  497.       Caption         =   "Video"
  498.       ClipControls    =   0   'False
  499.       BeginProperty Font 
  500.          name            =   "MS Sans Serif"
  501.          charset         =   1
  502.          weight          =   700
  503.          size            =   8.25
  504.          underline       =   0   'False
  505.          italic          =   0   'False
  506.          strikethrough   =   0   'False
  507.       EndProperty
  508.       Height          =   1695
  509.       Index           =   3
  510.       Left            =   120
  511.       TabIndex        =   9
  512.       Top             =   120
  513.       Visible         =   0   'False
  514.       Width           =   4455
  515.       Begin VB.Label lblInfo 
  516.          AutoSize        =   -1  'True
  517.          Caption         =   "Colors:"
  518.          BeginProperty Font 
  519.             name            =   "MS Sans Serif"
  520.             charset         =   1
  521.             weight          =   700
  522.             size            =   8.25
  523.             underline       =   0   'False
  524.             italic          =   0   'False
  525.             strikethrough   =   0   'False
  526.          EndProperty
  527.          Height          =   195
  528.          Index           =   10
  529.          Left            =   240
  530.          TabIndex        =   12
  531.          Top             =   1320
  532.          Width           =   600
  533.       End
  534.       Begin VB.Label lblInfo 
  535.          AutoSize        =   -1  'True
  536.          Caption         =   "Resolution"
  537.          BeginProperty Font 
  538.             name            =   "MS Sans Serif"
  539.             charset         =   1
  540.             weight          =   700
  541.             size            =   8.25
  542.             underline       =   0   'False
  543.             italic          =   0   'False
  544.             strikethrough   =   0   'False
  545.          EndProperty
  546.          Height          =   195
  547.          Index           =   9
  548.          Left            =   240
  549.          TabIndex        =   11
  550.          Top             =   960
  551.          Width           =   915
  552.       End
  553.       Begin VB.Label lblInfo 
  554.          Caption         =   "Video Driver:"
  555.          BeginProperty Font 
  556.             name            =   "MS Sans Serif"
  557.             charset         =   1
  558.             weight          =   700
  559.             size            =   8.25
  560.             underline       =   0   'False
  561.             italic          =   0   'False
  562.             strikethrough   =   0   'False
  563.          EndProperty
  564.          Height          =   495
  565.          Index           =   8
  566.          Left            =   240
  567.          TabIndex        =   10
  568.          Top             =   360
  569.          Width           =   3975
  570.       End
  571.    End
  572.    Begin VB.Image ImgIcon 
  573.       Height          =   480
  574.       Index           =   1
  575.       Left            =   4800
  576.       Picture         =   "CALLDLLS.frx":0614
  577.       Top             =   720
  578.       Width           =   480
  579.    End
  580.    Begin VB.Image ImgIcon 
  581.       Height          =   480
  582.       Index           =   0
  583.       Left            =   4800
  584.       Picture         =   "CALLDLLS.frx":091E
  585.       Top             =   120
  586.       Width           =   480
  587.    End
  588. Attribute VB_Name = "frmCallDlls"
  589. Attribute VB_Creatable = False
  590. Attribute VB_Exposed = False
  591. Option Explicit
  592. Dim dx As Integer, dy As Integer, X As Integer, Y As Integer
  593. Dim PicWidth As Integer, PicHeight As Integer
  594. Dim RightEdge As Integer, BottomEdge As Integer
  595. Private Sub cmdBitBlt_Click()
  596. Dim t As Integer
  597.     If tmrBounce.Enabled Then
  598.         tmrBounce.Enabled = False
  599.         Refresh
  600.     Else
  601.         ScaleMode = PIXELS
  602.         dx = 15
  603.         dy = 15
  604.         tmrBounce.Enabled = True
  605.         PicWidth = picSprite.ScaleWidth
  606.         PicHeight = picSprite.ScaleHeight
  607.         picCopy.Width = PicWidth
  608.         picCopy.Height = PicHeight
  609.         t = BitBlt(picCopy.hDC, 0, 0, PicWidth, PicHeight, hDC, X, Y, SRCCOPY)
  610.     End If
  611. End Sub
  612. 'begin conditional compile
  613. #If Win32 Then              '32-bit version of sub
  614.     Private Sub FillSysInfo()
  615.         Dim FreeSpace As Currency, FreeBlock As Currency, temp
  616.         frainfo(4).Visible = False
  617.        
  618.         'Operating System Info.
  619.             Dim YourSystem As SystemInfo
  620.             GetSystemInfo YourSystem
  621.             
  622.             If WindowsVersion() = 4 Then
  623.                 lblinfo(2).Caption = "Microsoft Windows 95"
  624.                 lblinfo(3).Caption = ""
  625.                 lblinfo(4).Caption = ""
  626.             Else
  627.                 lblinfo(2).Caption = "Microsoft Windows NT"
  628.                 lblinfo(3).Caption = ""
  629.                 lblinfo(4).Caption = ""
  630.             End If
  631.                     
  632.         ' CPU Info.
  633.             lblinfo(5).Caption = "CPU: " & YourSystem.dwProcessorType
  634.             
  635.         ' Video info.
  636.             lblinfo(8).Visible = False
  637.             lblinfo(9).Caption = "Resolution: " & Screen.Width \ Screen.TwipsPerPixelX & " x " & Screen.Height \ Screen.TwipsPerPixelY
  638.             lblinfo(10).Caption = "Colors: " & DeviceColors((hDC))
  639.         
  640.         ' General info.
  641.             If GetSystemMetrics(SM_MOUSEPRESENT) Then
  642.                 lblinfo(11).Caption = "Mouse: " & GetSysIni("boot.description", "mouse.drv")
  643.             Else
  644.                 lblinfo(11).Caption = "No mouse"
  645.             End If
  646.             lblinfo(12).Caption = "Network: " & GetSysIni("boot.description", "network.drv")
  647.             lblinfo(13).Caption = "Language: " & GetSysIni("boot.description", "language.dll")
  648.             lblinfo(14).Caption = "Keyboard: " & GetSysIni("boot.description", "keyboard.typ")
  649.     End Sub
  650. #Else                       '16-bit version of sub
  651.     Private Sub FillSysInfo()
  652.         Dim FreeSpace As Currency, FreeBlock As Currency, temp
  653.         Dim WinFlags As Long
  654.         
  655.         ' Operating System Info.
  656.         WinFlags = GetWinFlags()
  657.         
  658.         lblinfo(2).Caption = "Microsoft Windows Version " & WindowsVersion()
  659.         If WinFlags And WF_ENHANCED Then
  660.             lblinfo(3).Caption = "(Enhanced Mode)"
  661.         Else
  662.             lblinfo(3).Caption = "(Standard Mode)"
  663.         End If
  664.         
  665.         lblinfo(4).Caption = "Disk Operating System " & DosVersion()
  666.         
  667.         ' CPU Info.
  668.            If WinFlags And WF_CPU486 Then
  669.             lblinfo(5).Caption = "CPU: 486"
  670.         ElseIf WinFlags And WF_CPU386 Then
  671.             lblinfo(5).Caption = "CPU: 386"
  672.         ElseIf WinFlags And WF_CPU286 Then
  673.             lblinfo(5).Caption = "CPU: 286"
  674.         End If
  675.         If WinFlags And WF_80x87 Then
  676.             lblinfo(5).Caption = lblinfo(5).Caption & " (with Math coprocessor)"
  677.         End If
  678.         
  679.         ' Video info.
  680.            lblinfo(8).Caption = "Video Driver: " & GetSysIni("boot.description", "display.drv")
  681.         lblinfo(9).Caption = "Resolution: " & Screen.Width \ Screen.TwipsPerPixelX & " x " & Screen.Height \ Screen.TwipsPerPixelY
  682.         lblinfo(10).Caption = "Colors: " & DeviceColors((hDC))
  683.         
  684.         ' General info.
  685.            If GetSystemMetrics(SM_MOUSEPRESENT) Then
  686.             lblinfo(11).Caption = "Mouse: " & GetSysIni("boot.description", "mouse.drv")
  687.         Else
  688.             lblinfo(11).Caption = "No mouse"
  689.         End If
  690.         lblinfo(12).Caption = "Network: " & GetSysIni("boot.description", "network.drv")
  691.         lblinfo(13).Caption = "Language: " & GetSysIni("boot.description", "language.dll")
  692.         lblinfo(14).Caption = "Keyboard: " & GetSysIni("boot.description", "keyboard.typ")
  693.     End Sub
  694. #End If
  695. 'end conditional compile
  696. ' begin conditional compile
  697. #If Win32 Then                  '32-bit version of sub
  698.     Private Sub Form_Load()
  699.         Show                ' Make sure this form has an hWnd, etc.
  700.         Load frmMenus
  701.         Icon = imgIcon(1).Picture
  702.         FillSysInfo
  703.         frmMenus.mnuSysInfo(3).Visible = False
  704.     End Sub
  705. #Else                       '16-bit version of sub
  706.     Private Sub Form_Load()
  707.         Show                ' Make sure this form has an hWnd, etc.
  708.         Load frmMenus
  709.         Icon = imgIcon(1).Picture
  710.         FillSysInfo
  711.     End Sub
  712. #End If
  713. 'end conditional compile
  714. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  715.     End
  716. End Sub
  717. Private Sub Form_Resize()
  718. Dim t As Integer, hDC As Integer
  719.     If WindowState = MINIMIZED Then
  720.         RightEdge = Screen.Width \ Screen.TwipsPerPixelX
  721.         BottomEdge = Screen.Height \ Screen.TwipsPerPixelY
  722.         If tmrBounce.Enabled Then
  723.             hDC = GetDC(GetDesktopWindow())
  724.             t = BitBlt(picCopy.hDC, 0, 0, PicWidth, PicHeight, hDC, X, Y, SRCCOPY)
  725.             ReleaseDC GetDesktopWindow(), hDC
  726.         End If
  727.     Else
  728.         ScaleMode = PIXELS
  729.         RightEdge = ScaleWidth
  730.         BottomEdge = ScaleHeight
  731.         If tmrBounce.Enabled Then
  732.             hDC = GetDC(GetDesktopWindow())
  733.             t = BitBlt(hDC, X, Y, PicWidth, PicHeight, picCopy.hDC, 0, 0, SRCCOPY)
  734.             ReleaseDC GetDesktopWindow(), hDC
  735.         End If
  736.     End If
  737. End Sub
  738. Private Sub ImgIcon_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  739. Dim IX  As Integer, IY As Integer
  740. 'hMenu and hSubMenu must be long to run on 32-bit
  741. Dim hMenu As Long, hSubMenu As Long, R As Integer
  742. Dim menRect As Rect
  743.     If Button And 2 Then
  744.         ScaleMode = TWIPS
  745.         menRect.Left = 0
  746.         menRect.Top = 0
  747.         menRect.Right = Screen.Width / Screen.TwipsPerPixelX
  748.         menRect.Bottom = Screen.Height / Screen.TwipsPerPixelY
  749.         IX = (X + Left + imgIcon(Index).Left) \ Screen.TwipsPerPixelX
  750.         IY = (Y + Top + imgIcon(Index).Top + imgIcon(Index).Height) \ Screen.TwipsPerPixelY
  751.         hMenu = GetMenu(frmMenus.hWnd)
  752.         hSubMenu = GetSubMenu(hMenu, Index)
  753.         R = TrackPopupMenu(hSubMenu, 2, IX, IY, 0, frmMenus.hWnd, menRect)
  754.     End If
  755.     ' Refresh SysInfo
  756.     If Index = 2 Then
  757.         FillSysInfo
  758.     End If
  759. End Sub
  760. Private Sub tmrBounce_Timer()
  761. 'Following are static only to improve speed
  762. Static NewX As Integer, NewY As Integer, temp As Integer
  763. Static hDC As Integer, releaseit As Integer
  764. 'Calculate new position
  765.     ScaleMode = PIXELS
  766.     temp = X + dx
  767.     If temp + PicWidth \ 2 > RightEdge Then
  768.         dx = -Abs(dx)
  769.     ElseIf temp < 0 Then
  770.         dx = Abs(dx)
  771.     End If
  772.     NewX = X + dx
  773.     temp = Y + dy
  774.     If temp + PicHeight \ 2 > BottomEdge Then
  775.         dy = -Abs(dy)
  776.     ElseIf temp < 0 Then
  777.         dy = Abs(dy)
  778.     End If
  779.     NewY = Y + dy
  780.     If WindowState = MINIMIZED Then
  781.         hDC = GetDC(GetDesktopWindow())
  782.         releaseit = True
  783.     Else
  784.         hDC = Me.hDC
  785.         releaseit = False
  786.     End If
  787. 'Now perform "transparent" BitBlts:
  788. '1 Copy old background back over sprite's old position
  789. '2 Copy the background where the sprite will go
  790. '3 Draw the mask
  791. '4 Draw the sprite
  792.     temp = BitBlt(hDC, X, Y, PicWidth, PicHeight, picCopy.hDC, 0, 0, SRCCOPY)
  793.     temp = BitBlt(picCopy.hDC, 0, 0, PicWidth, PicHeight, hDC, NewX, NewY, SRCCOPY)
  794.     temp = BitBlt(hDC, NewX, NewY, PicWidth, PicHeight, picMask.hDC, 0, 0, SRCAND)
  795.     temp = BitBlt(hDC, NewX, NewY, PicWidth, PicHeight, picSprite.hDC, 0, 0, SRCINVERT)
  796.     X = NewX
  797.     Y = NewY
  798.     If releaseit Then ReleaseDC GetDesktopWindow(), hDC
  799. End Sub
  800. 'begin conditional compile
  801. #If Win32 Then      '32-bit version of sub
  802.     Private Sub tmrSysInfo_Timer()
  803.         If frainfo(RES_INFO).Visible Then
  804.             Dim intX As Integer
  805.             For intX = 1 To 2
  806.                 lblResInfo(intX).Visible = False
  807.                 shpBar(intX).Visible = False
  808.                 shpFrame(intX).Visible = False
  809.             Next intX
  810.         End If
  811.         
  812.         lblR(1).Visible = False
  813.         lblR(2).Visible = False
  814.         
  815.         Dim YourMemory As MemoryStatus
  816.         GlobalMemoryStatus YourMemory
  817.         lblinfo(6).Caption = "Free Memory: " & YourMemory.dwMemoryLoad & "%"
  818.     End Sub
  819. #Else               'i6-bit version of sub
  820.     Private Sub tmrSysInfo_Timer()
  821.     Static Res(1 To 2) As Integer, OldFreeSpace As Currency
  822.     Dim i As Integer, newVal As Integer, temp, FreeSpace As Currency
  823.         ' Update resource info if visible.
  824.         If frainfo(RES_INFO).Visible Then
  825.             For i = 1 To 2
  826.                 newVal = GetFreeSystemResources(i)
  827.                 ' Reduce flashing by updating bar graphs and percentage
  828.                 ' display only if they've actually changed.
  829.                 If newVal <> Res(i) Then
  830.                     Res(i) = newVal
  831.                     lblResInfo(i).Caption = Res(i) & "%"
  832.                     shpBar(i).Width = shpFrame(i).Width * Res(i) \ 100
  833.                 End If
  834.             Next
  835.             
  836.             temp = GetFreeSpace(0)
  837.             If Sgn(temp) = -1 Then
  838.                 ' Return of GetFreeSpace is an unsigned long
  839.                 ' so handle case when high bit is set (two's complement).
  840.                 FreeSpace = CLng(temp + 1&) Xor &HFFFF
  841.             Else
  842.                 FreeSpace = temp
  843.             End If
  844.             If FreeSpace <> OldFreeSpace Then
  845.                 lblinfo(6).Caption = "Free memory space: " & Format(FreeSpace, "#,# \b\y\t\e\s")
  846.                 OldFreeSpace = FreeSpace
  847.             End If
  848.         End If
  849.     End Sub
  850. #End If
  851. 'end conditional compile
  852.