Explain this Project please....

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 :

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=48185&lngWId=1

LVL 8
mugman21Asked:
Who is Participating?
 
iHadiCommented:
Hi
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
0
 
mugman21Author Commented:
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.

0
 
mugman21Author Commented:
iHadi,

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.



       
0
 
mugman21Author Commented:
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.

Mugman
0
 
iHadiCommented:
Your welcome
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.