VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



TaskBar Height

by Timmy Smith (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

The purpose of the code is to determine the height of the taskbar so that you can display a form at the bottom right hand corner of the screen everytime.

API Declarations
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Const SPI_GETWORKAREA = 48
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Rate TaskBar Height

' this code will display a form at the bottom right had corner everytime.
   dim WindowRect as RECT
   SystemParametersInfo SPI_GETWORKAREA, 0, WindowRect, 0
  
   FrmMain.Top = WindowRect.Bottom * Screen.TwipsPerPixelY - FrmMain.Height
   FrmMain.Left = WindowRect.Right * Screen.TwipsPerPixelX - FrmMain.Width

Download this snippet    Add to My Saved Code

TaskBar Height Comments

No comments have been posted about TaskBar Height. Why not be the first to post a comment about TaskBar Height.

Post your comment

Subject:
Message:
0/1000 characters