Preview Handlers (Office 2007, Vista & Win7) - issue w/ reisize - windows-7

Greetings,
I'm working on a preview handler for Office 2007, Vista and Windows 7. I'm basing my code off the following
MSDN article.
The "guts" are done as it was pretty straight forward. I've been testing in Windows 7 (64-bit) Explorer. One thing I've noticed is the preview handler appears to "lock" the Explorer window and doesn't allow it to resize.
My handler derives from FileBasedPreviewHandler, the Control from FileBasedPreviewHandlerControl. The #Load override simply does:
MyViewer viewer = new MyViewer();
viewer.Dock = DockStyle.Fill;
viewer.SetFile( file.FullName );
Controls.Add( viewer );
A couple things I've tried, a variety of times is to set, in the design view, the AutoSize and AutoSizeMode to true and GrowAndShrink
Now, the funny thing, i swear it worked once. Now, I can't get it to work at all.
If anyone has any input, that would be great. I think I posted all the relevant info, but if I missed something vital, let me know. I appreciate your attention to this question.
-Cheers!

Apparently, by setting the AutoSize and AutoSizeMode as state above, does work. Explorer is simply temperamental. What I found was if you get strange behavior, you can use task manager to close the explorer process than relaunch it.
For the record, what I found works 99% of the time is to to:
make sure all Explorer windows areclosed (w/ preview panel off)
unregasm/remove from ga
build
add to gac/regasm
run Explorer and check preview panel
rinse & repeat
I'm also using a throw-away win forms app to test changes that don't involve the integration.
Hope this helps someone looking.
-Cheers!

Related

Why is my Visual Studio taskbar Icon animated

The icon for Visual Studio on my Windows 7 taskbar is animated with a green bar moving left to right. What does it mean, and how can I stop it?
http://i.imgur.com/v1AEcue.jpg?1
I've not got any extensions installed, but I do have resharper (version 7 until I can afford to upgrade). I can't find anything relevant through google, and I can't see an option in the options panels.
The animation is used to represent progress. It's the same as for file copies (for example). I've seen ReSharper do this while running unit tests. Perhaps that, or maybe another extension?
I know this is an old post, but I am still experiencing the issue where the animation persists even though the tests have long finished (with VS2015 and Resharper 2016.1.2).
One way to get around this problem is to disable taskbar animations altogether:

can anyone show me how and How they have 5 button on the title bar instead of 3 max, resize, close in Windows?

mostly in all article i found that everyone show that their OS give them 5 button. can anyone explain how
http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part1-cs
in this article every window's title bar have 5 button on top whenever i can see only three button in my windows [close, restore ,maximize].
can anyone show me reason behind it.
They're running UltraMon, which is a utility that provides enhancements for multiple monitor support.
In particular, it adds extra window management buttons to the title bars of all applications, which make it easy to move windows from screen to screen.
You can download a free evaluation version from the vendor, but the full version will cost you $39.95 US.
He has multiple screens on his computer, those buttons mean move to next screen.
Extra buttons in the titlebar come from utility applications that hook into every process.
Take a look at this tutorial for a basic example, you also need to register a hook with SetWindowsHookEx (WH_CBT or WH_SHELL)
For Windows Vista and 7, Microsoft has provided detailed guidance in the article Custom Window Frame Using DWM.
Copied from my answer here.

Windows Phone 7 Page Transition

Is there any built-in way to reproduce the behaviour showed on the Office app, a 0:36 ? When the user tap the Shared Document item, a nice WP7-like transition makes it goes to the next page
http://www.youtube.com/watch?v=EUZx8YHPlWM#t=0m36s
Thanks !
You should take a look at the Silverlight for Windows Phone Toolkit. It has a "Page Transition" control that does, I think, exactly what you want. It's a new feature in the November 2010 release.
Good luck.

BHO or Command Button for explorer

I am trying to develop a command button that would appear on windows explorer. I can do this for an NSE but what I want to do is make the button visible on every explorer window. I want it to work for windows 7 and vista. I know it is possible as I have seen office Groove do it, and I am not sure if I have to implement the IExplorer(...) interfaces or just create a simple BHO (Browser Helper Button) that is registered for windows explorer and not IE.
Any help is appreciated.
I am trying to do the same thing, with no luck so far (My question).
What i did manage to learn is that "BHO is the way to go". After trying tons of different ways i found it is the simplest way to hook to all windows explorer instances.
Within your BHO code you could filter out instances of IE, but there is probably a registry way to do it also.
Good luck, and let us know if you figured it out.

Change min/max/close buttons theme

im currently overiding the WM_NCPAINT, WM_NCCALCSIZE and WM_NCACTIVATE to paint my own color/themed title bar for an application im working on. Now this is working great however the min, max and close buttons still are xp default theme.
I looked into what controls them and the mouse messages do. However they also contol resizing and other functions that I dont want to lose.
Is there an easy way to just change the theme of these buttons?
Windows XP
MFC Forms
Visual studio 2005
I think your best bet here is to disable the buttons and redraw them with something akin to to the code I posted in this answer. It's in C# with WinForms, but the vast majority of it is overloaded WndProc() anyway, which you should be able to use almost copy/paste into MFC.
Implementing click handlers to do what you want them to do is trivial.
Note: The asker of that question said the code didn't work in Vista. I don't have a Vista box, but it works for me in XP.
This also helped: http://www.catch22.net/tuts/titlebar
You can also check out how it's done in MFC Next (VS2008 SP1). The theming support there does custom draw of the whole title bar, you can get a few ideas from that. I presume they tested it on Vista, too ;)

Resources