Solved

Task-Bar Height and Location

Posted on 1998-08-30
2
149 Views
Last Modified: 2010-04-30
Hi,
How do i get the Height and Location of Task-bar and the list of active tasks in vb5

thanks.
0
Comment
Question by:msali
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
shchuka earned 50 total points
ID: 1432010
This is how you can find the location and the size of the taskbar:

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

Dim R As RECT, lRes As Long,
Dim lW As Long, lH As Long

lRes = SystemParametersInfo(SPI_GETWORKAREA, 0, R, 0)
If lRes Then
      With R
            .Left = Screen.TwipsPerPixelX * .Left
            .Top = Screen.TwipsPerPixelY * .Top
            .Right = Screen.TwipsPerPixelX * .Right
            .Bottom = Screen.TwipsPerPixelY * .Bottom
            lW = .Right - .Left
            lH = .Bottom - .Top
      End With
End If

Now iw and ih contain the width and height of the taskbar correspondently;
r.left and r.top contai the upper left coordinates of the taskbar (in twips).
0
 
LVL 2

Expert Comment

by:shchuka
ID: 1432011
To find the tasks running on the system, you may try using the sysinfo.ocx control.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Window placement 17 74
DO Loop not working 4 72
Restricting text box entry from \/:?<>"| 9 76
String manipulation in Visual Basic 7 59
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now