Solved

Task-Bar Height and Location

Posted on 1998-08-30
2
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

695 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