Marook-Online
* 06.Feb.2012, 15:10 UTC+1
Welcome, Guest. Please login or register.
Username:
Password:

News: Back again Wink
Main Menu
  Navigation
   Downloads
     Tools
     Music Discs
     SMF Mods
     Trainer & Patches
     EgoShare Uploader
   Guestbook
   NoPaste
   User Map
   Gallery
  
   Malware Scan
   Hacker Blacklist
   Find Abusemail
Top Downloads
Support Me !
Help me by donating a small amount!



Advanced search

Google


Pages: [1]   Go Down
0 Members and 1 Guest are viewing this topic. Topic Tools  
Read
24-Oct-2007 08:30
Marook
Administrator
*****
Offline Offline

Joined: 01-Jan-2005
Posts: 224


Hi, i wrote a dec2hex calculator which startup-position should be exactly above the taskbar. With this function, you can retrieve the height of the taskbar. Paste the following code into a form or module.

Code
GeSHi (vb):
  1. Private Type RECT
  2. Left As Long
  3. Top As Long
  4. Right As Long
  5. Bottom As Long
  6. End Type
  7.  
  8. Private Const SPI_GETWORKAREA = 48
  9.  
  10. Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
  11.  
  12. Private Function GetTaskBarHeight(Optional outputInPixel As Boolean = True) As Long
  13. Dim r As RECT
  14.  
  15.    SystemParametersInfo SPI_GETWORKAREA, 0, r, 0
  16.    GetTaskBarHeight = (Screen.Height / Screen.TwipsPerPixelY) - r.Bottom
  17.  
  18.    Select Case outputInPixel
  19.        Case False
  20.            GetTaskBarHeight = GetTaskBarHeight * Screen.TwipsPerPixelY
  21.    End Select
  22. End Function
  23.  
Created by GeSHI 1.0.7.20

The optional Parameter outputInPixel is used to return the height in pixel or in twips, pixel output as default.
Logged
 

Pages: [1]   Go Up
Jump to:  

Theme by webtechnica.net

MHD v2.1 © 2oo8 by Marook
32116 hacking attempts defended!