Advertisement
5_2007-2008 Windows API Call/ Explanation #172395

32-bit Floating Toolbar (NT & 95)

This code gives you the ability to create a 'floating toolbar' within your application. The old SetWindowWord function is only good for 16-bit applications, so it won't run under a 32-bit OS (like NT4). The API call you should use if you are programming a 32-bit application is SetWindowLong. It works the same way as SetWindowWord, only uses DWORD(Long) values instead of WORD values for the 32-bit OS.

AI

AI சுருக்கம்: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

மூலக் குறியீடு
original-source
' Place this code in the General Declarations section of Form1.
Private Sub Command1_Click()
  'Open the toolbar window
  Form2.Show
  'Move the toolbar to the right
  'of Form1.
  '(gives it a docking effect)
  Form2.Height = Form1.Height - 330
  'Subtract the titlebar height -^
  Form2.Left = Form1.Left + Form1.Width - Form2.Width
  Form2.Top = Form1.Top + Form1.Height - Form2.Height
End Sub
Private Sub Form_Load()
  'Set the button properties
  Command1.Caption = "Show Toolbar"
  Command1.Width = 2055
  Command1.Height = 375
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  'If Form2 is opened when you close
  'Form1, it will not end your app, so
  'you have to manually unload Form2.
  Unload Form2
End Sub
' Place this code in the Form_Load event of Form2
Private Sub Form_Load()
SetWindowLong Me.hwnd, GWL_HWNDPARENT, Form1.hwnd
End Sub

Upload
அசல் கருத்துகள் (3)
வேபேக் மெஷினிலிருந்து (Wayback Machine) மீட்டெடுக்கப்பட்டது