home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / ARQS_ZIP / VBMDIXPL.ZIP / FLOATING.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-05-17  |  4.2 KB  |  133 lines

  1. VERSION 2.00
  2. Begin Form FloatingToolbar 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Height          =   2364
  5.    Left            =   6888
  6.    LinkTopic       =   "Form2"
  7.    MaxButton       =   0   'False
  8.    MinButton       =   0   'False
  9.    ScaleHeight     =   1944
  10.    ScaleWidth      =   972
  11.    Top             =   4800
  12.    Width           =   1068
  13.    Begin PictureBox SampleIcon 
  14.       DragMode        =   1  'Automatic
  15.       Height          =   492
  16.       Index           =   7
  17.       Left            =   480
  18.       Picture         =   FLOATING.FRX:0000
  19.       ScaleHeight     =   468
  20.       ScaleWidth      =   468
  21.       TabIndex        =   7
  22.       Top             =   1440
  23.       Width           =   492
  24.    End
  25.    Begin PictureBox SampleIcon 
  26.       DragMode        =   1  'Automatic
  27.       Height          =   492
  28.       Index           =   6
  29.       Left            =   0
  30.       Picture         =   FLOATING.FRX:0302
  31.       ScaleHeight     =   468
  32.       ScaleWidth      =   468
  33.       TabIndex        =   6
  34.       Top             =   1440
  35.       Width           =   492
  36.    End
  37.    Begin PictureBox SampleIcon 
  38.       DragMode        =   1  'Automatic
  39.       Height          =   492
  40.       Index           =   5
  41.       Left            =   480
  42.       Picture         =   FLOATING.FRX:0604
  43.       ScaleHeight     =   468
  44.       ScaleWidth      =   468
  45.       TabIndex        =   5
  46.       Top             =   960
  47.       Width           =   492
  48.    End
  49.    Begin PictureBox SampleIcon 
  50.       DragMode        =   1  'Automatic
  51.       Height          =   492
  52.       Index           =   4
  53.       Left            =   0
  54.       Picture         =   FLOATING.FRX:0906
  55.       ScaleHeight     =   468
  56.       ScaleWidth      =   468
  57.       TabIndex        =   4
  58.       Top             =   960
  59.       Width           =   492
  60.    End
  61.    Begin PictureBox SampleIcon 
  62.       DragMode        =   1  'Automatic
  63.       Height          =   492
  64.       Index           =   3
  65.       Left            =   480
  66.       Picture         =   FLOATING.FRX:0C08
  67.       ScaleHeight     =   468
  68.       ScaleWidth      =   468
  69.       TabIndex        =   3
  70.       Top             =   480
  71.       Width           =   492
  72.    End
  73.    Begin PictureBox SampleIcon 
  74.       DragMode        =   1  'Automatic
  75.       Height          =   492
  76.       Index           =   0
  77.       Left            =   0
  78.       Picture         =   FLOATING.FRX:0F0A
  79.       ScaleHeight     =   468
  80.       ScaleWidth      =   468
  81.       TabIndex        =   2
  82.       Top             =   0
  83.       Width           =   492
  84.    End
  85.    Begin PictureBox SampleIcon 
  86.       DragMode        =   1  'Automatic
  87.       Height          =   492
  88.       Index           =   2
  89.       Left            =   0
  90.       Picture         =   FLOATING.FRX:120C
  91.       ScaleHeight     =   468
  92.       ScaleWidth      =   468
  93.       TabIndex        =   1
  94.       Top             =   480
  95.       Width           =   492
  96.    End
  97.    Begin PictureBox SampleIcon 
  98.       DragMode        =   1  'Automatic
  99.       Height          =   492
  100.       Index           =   1
  101.       Left            =   480
  102.       Picture         =   FLOATING.FRX:150E
  103.       ScaleHeight     =   468
  104.       ScaleWidth      =   468
  105.       TabIndex        =   0
  106.       Top             =   0
  107.       Width           =   492
  108.    End
  109. Declare Function SetWindowPos Lib "user" (ByVal h%, ByVal hb%, ByVal x%, ByVal y%, ByVal cx%, ByVal cy%, ByVal f%) As Integer
  110. Sub Form_Load ()
  111. Const SWP_NOMOVE = 2
  112. Const SWP_NOSIZE = 1
  113. Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
  114. Const HWND_TOPMOST = -1
  115. Const HWND_NOTOPMOST = -2
  116. ' To set the form XXXX to TOPMOST, use the following code:
  117. success% = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
  118.      'success% <> 0 When Successful
  119. ' size the Toolbar:
  120.   FloatingToolbar.Width = SampleIcon(1).Width * 2
  121.   FloatingToolbar.Height = SampleIcon(1).Height * 4 + 300 'empiric for the Titlebar
  122. ' load the Drag Icons
  123. For i = 0 To 7
  124.  SampleIcon(i).DragIcon = SampleIcon(i).Picture
  125. End Sub
  126. Sub Form_QueryUnload (cancel As Integer, UnloadMode As Integer)
  127.  ' Fake an unload
  128.  cancel = 1 ' dont unload
  129.  Me.Visible = False ' but become invisble
  130.  ' reset the Menu-Option
  131.  MDIForm1.M_FloatingToolbar.Checked = False
  132. End Sub
  133.