Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Explain this Project please....

Posted on 2005-04-06
5
Medium Priority
?
146 Views
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 :

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

0
Comment
Question by:mugman21
  • 3
  • 2
5 Comments
 
LVL 8

Author Comment

by:mugman21
ID: 13715995
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
 
LVL 13

Accepted Solution

by:
iHadi earned 2000 total points
ID: 13716605
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
 
LVL 8

Author Comment

by:mugman21
ID: 13717123
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
 
LVL 8

Author Comment

by:mugman21
ID: 13725906
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
 
LVL 13

Expert Comment

by:iHadi
ID: 13726082
Your welcome
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…
Suggested Courses
Course of the Month15 days, 12 hours left to enroll

581 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