New project based on Outlook2003Bar

Topics: Bug Information
May 9, 2007 at 11:47 AM
Edited May 9, 2007 at 11:48 AM
Hi for all!

I'm working on a new project named OutlookNavBar for now.
This project is based on Outlook2003Bar, but has a lot of changes and improvements.
I think that Outlook2003Bar name is no longer appropriate for this project, because the new class has implemented new themes and another themed controls.
What's the best choice: change the project name or start a new project?

If you want to take a look at the new control, please visit:

Jun 18, 2007 at 11:29 AM

I am catching up on all the posts in here. I've been away for awhile, but will be posting in here regularly from now on. I feel bad that your post just sat here like this. Please accept my apology. No need for a new project though if the project's scope has changed or increased significantly you might want to reflect that in this project's page here on CodePlex. In any event, I think a name change would be appropriate if you feel the need. Do you have any names in mind?
Jun 22, 2007 at 5:27 PM
Edited Jun 22, 2007 at 5:43 PM
Hi Craig!
Apology accepted. : )))

I think that ThemedControls is a good name.
Now, I have two classes: OutlookNavBar (old Outlook2003Bar without themes functionalities in itself) and ThemedControls (with a lot of themed controls including one named ThemedOutlookNavBar based on the new OutlookNavBar control).
All themes elements (images, colors, fonts, etc) are now stored (I'm not using GDI+ anymore) in a new class named ThemesManager.
Each control has a method that get your themes elements from ThemesManager and this method is fired always that theme changes (because it is binded to an event of ThemesManager control).
This way, everytime that I need to add a new theme (like I do with Vista theme), I only need to change ThemesManager class.
Much more easy!

If you don't understand my points (sorry, my english is poor), please, download the sample in the link above and take a brief look (overview) at the class.

What you think about?

I also would ask Goran Zidar (TabMenu) and Kevin Ragsdale (Desktop Alerts) about to include this controls in ThemedControls.
This way we would have a good set of themed controls to improve VFP applications!
Aug 18, 2007 at 12:01 PM
Hi Emerson,

'ThemedControls' is a fine name. The OutlookNavBar looks VERY professional and I like the overall functionality. I aslo think that creating more controls for use in VFP that have the same professional appearance is a great idea. You seem to have a knack for it. A few questions and thoughts about the project...

1. Why the dependency on _Base and _Menu for the project? I would like to see these removed if possible.

2. Interesting the way you put the hexbinary of the images in the thememanager class code. Nice job of black boxing this even if it makes modificaitons to existing themes more difficult. Have you documented the way in which these hexbinary strings are to be created? If not, you might think of adding a comment or two to the code explaining how this is done. Also, eventually some straight-forward instructions on creating themes/skins for this might be helpful in getting more developers involved. One of the minor goals of the library (IMHO) should be making it easy for developers to change existing themes and creating themes of their own.

3. I wish you hadn't ditched GDI+ and given up on supporting the uxtheme.dll (exists on both Windows XP and Vista), but then I am very biased because of my participation in GDIPlusX, so take this with a grain of salt.

4. The "" seems to be the latest version and the version here on VFPX would then be deprecated, I would like to see you post the latest version here on VFPX in the near future.

5. If you need any help changing the project name or setting some stuff up here on VFPX please let me know. You have my email address.

6. Regarding the ThemesManager class... it would be good to include some compiler directives so that developers could choose to only compile in certain themes. I realize the bloat of compiling all themes isn't significant yet, but as you add more themes it would be a nice feature to have.

7. Is the ZoomNavBar a planned part of this project? If so, I think that GDIPlusX would work very nice for rendering the image animation (scrolling and zooming). This would then allow you to use a much smaller control (half the height) and still retain the zooming effect of the images where it could be painted outside the control's boundaries.

Overall this project is looking really good and I like the direction you are headed in. If there is one thing that VFP developers need, it is tools and classes that make creating professional looking UI's easier in VFP. Thanks for all your hardwork Emerson. I look forward to the progression of this project over the coming months.
Aug 20, 2007 at 11:55 PM
Hi Craig!

1. I think that I've placed some control based on some "_" class instead of VFP base classes. I'll take a look at it and change this.

2. Yes, I can document how to put the hexbinary of the images in the thememanager class code. Maybe I could create a "Themes Editor" and save all themes to XML files and use these files instead of hardcode them. This way makes easy to create/add new user themes.

3. In the first control version, I've used GDI+ to create the images because was easy to create a gradient effect like Office 2003, but I don't get good results when I tried to create the glass effect like Office 2007". This was the reason to use "physical" images instead of GDI+.
Despite of this, I've just used uxtheme.dll to know if themes are enabled, because "Office Themes" doesn't seems to use the values provided in this dll to render the control themes (like you can see in another thread in this forum).
Another good reason to not continue in this way was the fact that the new Office 2007 themes doesn't follow the Windows active theme like Office 2003 does.

4. Of course I will post the new version here! I just only want to make some changes in the help file before.

5. Yes! I think that we could do this now. ; )

6. Could you give me a sample on how to do this?

7. Yes. I've received a lot of feedbacks asking about to do something to make this control smaller.
Could you point me on how can I use GDIPlusX to do this?

Thanks for your words and the time spent helping me.
I really like to do this!
Aug 22, 2007 at 4:52 AM
2. A Themes Editor is exactly what I was hoping for. That would be awesome.

6. The basic idea is to wrap the code for each theme in #IF, #IFDEF, or #IFNDEF... #ENDIF preprocessor directives. One of the best ways to do it is to include a header file (.H) with the class library and then within that have a number of defines, one for each theme. Then the developer can simply comment out the themes they aren't using in their project and that they don't want to be compiled when they generate the application. Then in your classes simply use the #IFDEF...#ENDIF to wrap the pertinent code. Some care must be taken so that removing certain themes doesn't break the classes of course, but with a minimal amount of effort you should be able to provide this type of optional compiling to your project especially given the way in which you are using the themesmanager. If you need a more concrete example or further assistance with this please don't hesitate to contact me directly.

7. Give me a few days and I'll see if I can't work something up and send it to you via email.

I enjoy this as well Emerson.

Aug 22, 2007 at 10:17 PM
Edited Aug 22, 2007 at 10:21 PM
Emerson and Craig,

About item # 7, using GDI+ to scale the images.

craigsboyd wrote:
7. Is the ZoomNavBar a planned part of this project? If so, I think that GDIPlusX would work very nice for rendering the image animation (scrolling and zooming). This would then allow you to use a much smaller control (half the height) and still retain the zooming effect of the images where it could be painted outside the control's boundaries.

IMO, using the original VFP Image control will do better than GDI+.
For this, Emerson would use an Image control instead of a commandbutton. This image would use the "stretch" property, so all Emerson would need is to scale and position the control correctly, and VFP will scale automatically.

This way, "ZOOM NAVBAR" will work without the need of any other extra library.
Sep 12, 2007 at 9:51 AM
Really nice and easy to use. I would like it to behave a bit more like outlook in that a splitter is added to the right of the class to resize the width and to stop the resize of width from the current splitter. If not a splitter could be added to the form to the right of the class but the question is how to stop the width being resized when the form is resized.
It does look good though. Regards
Sep 12, 2007 at 3:49 PM
ok seems I had an old version of the outlook control. I now have the themed set and plying with those. Even better.
Oct 10, 2007 at 3:38 PM
Excellent controls. Very good work.
It had, perhaps, to include a way to make the localization.
I suggest to show the caption of the current button in the vertical panel, when minimized.
Nov 5, 2007 at 10:13 AM
Hi Emerson
In the original controls you had a second splitter to use with the left and right as opposed to the normal one to split the outlooknavbar. What happened to it, could really do with that. I tried to copy the original one into the new classes but it errors on the exe with out of memory.