home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
-
- Global Const GWW_HINSTANCE = (-6)
- Global Const SRCCOPY = &HCC0020
- Global tx%, ty%
- Type itemdata
- cap As String 'description
- cline As String 'command line
- dir As String 'working dir
- iconpath As String '-
- xpos As Integer 'pos in window
- ypos As Integer 'pos in window
- iconindex As Integer '-
- key As Integer 'shortcut key
- min As Integer 'run minimized
- End Type
- 'used to transfer data between windows
- Global gItem As itemdata
-
-
-
- Declare Function BitBlt% Lib "GDI" (ByVal hDestDC%, ByVal x%, ByVal y%, ByVal nWidth%, ByVal nHeight%, ByVal hSrcDC%, ByVal XSrc%, ByVal YSrc%, ByVal dwRop&)
- Declare Function DrawIcon% Lib "User" (ByVal hDC%, ByVal x%, ByVal y%, ByVal hIcon%)
- Declare Function ExtractIcon% Lib "shell.dll" (ByVal hisnt%, ByVal lpszExeName$, ByVal iIcon%)
- Declare Function GetWindowWord% Lib "User" (ByVal hWnd%, ByVal nIndex%)
-
- Function GetFile (actn%, fndx%, act%) As String
- 't%=dialog type 'fn%=filterindex 'act%=action
- sample1.cd.Filter = "All Files(*.*)|*.*|Executable Files(*.hlp;*.exe)|*.hlp;*.exe|Graphic Files(*.bmp;*.ico)|*.bmp;*.ico"
- Select Case actn%
- Case 2'cap
- sample1.cd.DialogTitle = "Save a Graphic File"
- Case 4'browse
- sample1.cd.DialogTitle = "Browse"
- End Select
- sample1.cd.FilterIndex = fndx%
- On Error Resume Next
- sample1.cd.Action = act%
- GetFile = sample1.cd.Filename
- If Err = 32755 Then GetFile = ""
- End Function
-
- Sub RaiseForm (F As Form)
- Dim x%, y%
- If F.ScaleMode = 3 Then x = 1: y = 1 Else x = tx: y = ty
- F.Line (0, F.ScaleHeight - y)-(0, 0), QBColor(15)
- F.Line -(F.ScaleWidth - x, 0), QBColor(15)
- F.Line -(F.ScaleWidth - x, F.ScaleHeight - y), QBColor(8)
- F.Line -(0, F.ScaleHeight - y), QBColor(8)
- End Sub
-
- Sub Sink (F As Form, c As Control)
- Dim l, t, r, B
- Dim x%, y%
- If F.ScaleMode = 3 Then x = 1: y = 1 Else x = tx: y = ty
-
- l = c.Left - x: t = c.Top - y: r = c.Left + c.Width: B = c.Top + c.Height
- F.Line (l, B - y)-(l, t), QBColor(8)
- F.Line -(r, t), QBColor(8)
- F.Line -(r, B), QBColor(15)
- F.Line -(l - x, B), QBColor(15)
- End Sub
-
-