home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 2.00 Begin Form MainForm BackColor = &H00C0C0C0& Caption = "NoGhost TestApp" ClientHeight = 3930 ClientLeft = 1020 ClientTop = 1710 ClientWidth = 7350 Height = 4620 Icon = NOGHOST.FRX:0000 Left = 960 LinkTopic = "Form1" ScaleHeight = 3930 ScaleWidth = 7350 Top = 1080 Width = 7470 Begin Label Label1 AutoSize = -1 'True BackColor = &H00C0C0C0& Height = 195 Left = 120 TabIndex = 0 Top = 120 Width = 7095 WordWrap = -1 'True End Begin Menu FileMenu Caption = "&File" Begin Menu ExitChoice Caption = "E&xit" End End Begin Menu ConfigureMenu Caption = "&Configuration" Begin Menu EnableChoice Caption = "&Enable Processing" Checked = -1 'True End Begin Menu SizingOption Caption = "&Sizeable" Checked = -1 'True End End DefInt A-Z Declare Function RegNoGhost Lib "noghost.dll" (ByVal hWnd%, ByVal AllowSizing%, ByVal OnOff%) As Integer Const lblMult = .9 Dim lblString$ Sub EnableChoice_Click () EnableChoice.Checked = Not (EnableChoice.Checked) If EnableChoice.Checked Then ErrCode = RegNoGhost(MainForm.hWnd, True, False) ErrCode = RegNoGhost(MainForm.hWnd, SizingOption.Checked, True) Else ErrCode = RegNoGhost(MainForm.hWnd, SizingOption.Checked, False) End If End Sub Sub ExitChoice_Click () ErrCode = RegNoGhost(MainForm.hWnd, True, False) Unload MainForm End Sub Sub Form_Load () lblString$ = "NoGhost is a tool which allows Visual Basic applications to respond to Cascade and Tile messages properly. It also behaves properly when the Visual Basic application is minimized and does not detract from the Cascading or Tiling of other applications. NoGhost is programmer configurable to allow or disallow sizing of the Visual Basic application's window. " lblString$ = lblString$ + "Try this sample program to get an idea how the control works. Turning off the Enable Processing option will show you how Visual Basic applications normally behave. " lblString$ = lblString$ + "NoGhost only requires 5K of memory and one simple call to a DLL function." lblString$ = lblString$ + Chr$(13) + Chr$(10) + Chr$(13) + Chr$(10) + "By Greg Blaum - CIS: 71212,1763" lblString$ = lblString$ + Chr$(13) + Chr$(10) + "Copyright 1993" lblString$ = lblString$ + Chr$(13) + Chr$(10) + "NoGhost is FREEWARE, suggestions or questions are welcome" ErrCode = RegNoGhost(MainForm.hWnd, True, True) Label1.Caption = lblString$ Label1.Refresh End Sub Sub Form_Resize () If WindowState <> 1 Then Label1.Visible = False Label1.Width = lblMult * MainForm.Width Label1.Refresh Label1.Visible = True End If End Sub Sub Form_Unload (Cancel As Integer) ErrCode = RegNoGhost(MainForm.hWnd, True, False) End Sub Sub SizingOption_Click () SizingOption.Checked = Not (SizingOption.Checked) If EnableChoice.Checked Then ErrCode = RegNoGhost(MainForm.hWnd, True, False) ErrCode = RegNoGhost(MainForm.hWnd, SizingOption.Checked, True) Else ErrCode = RegNoGhost(MainForm.hWnd, SizingOption.Checked, False) End If End Sub