Explain this Project please....

Posted on 2005-04-06
Last Modified: 2010-05-02
I was playing with this user control that skins VB apps with an XP style. The control when Maximized covers the systems TaskBar. I've read threw the code numerous times, and I can see where it uses the SetWindowPos api to show the taskbar, but I can't figure out what makes the taskbar disappear...... This control also seems to respond to click events that DO NOT exist within the code....

I know the control is a little lame and poorly coded, but it's driving me crazy.... What makes it hide the taskbar when the form is sized at MAX??????????

The control's code is here at :

Question by:mugman21
    LVL 8

    Author Comment

    I've read threw all it's code, the methods for making the taskbar hidden that I know of don't exist. The setwindowpos api is within the code, I see the &H40 constant to show the taskbar, but the &H80 value to make it disapear does not exist.

    The other method to hide the taskbar using the setwindowlong api doesn't seem to be there either, even thought that paticular api is present for other functions.

    LVL 13

    Accepted Solution

    This behaviour of the taskbar is not done from the code but is caused because the form has no border so it can come infront of the taskbar

    when you move the mouse over the bottem border the the code sets the taskbar to front or shows it that means activating it and bringing it to front

    the trick is in the SetStyle sub in the OsenXPForm which sets the form style to none but using Api

    if you create a new project and set the form's BorderStyle to none and put a command button on it and write the following line in the command click event you'll get the same resault

    me.WindowState = 2

    and don't forget to put another command for end or use Alt+Tab
    LVL 8

    Author Comment


    I understand what you mean, I conducted your experiment with a regular form with no border and it behaved as you said it would.

    You stated that within the SetStyle sub is where the parent form is changed to borderless via API.... I've re-read that routine, and have consulted the MSDN, but I don't see exactly where the parent form is being made borderless......

    Within my MSDN software, the constant WS_THICKFRAME is not listed.... is this the value that is making the form borderless?

    For me to fully understand what this code is doing, could you please point out how to prevent this behavior from happening (the hidden taskbar). I'm having some trouble here because some of the names of the constants are not listed in the doc, apparently someone made-up these names and didn't follow the normal conventions.

    LVL 8

    Author Comment

    OK, got it now. WS_THICKFRAME was hidden in the msdn. I fully understand what is going on inside this control now. I appreciate the help.

    LVL 13

    Expert Comment

    Your welcome

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    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…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    733 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

    23 Experts available now in Live!

    Get 1:1 Help Now