Invoking the hover preview from code - c#

Is there anyway to invoke the windows preview effect (the one you get when you hover over the icon screenshot in the taskbar)? Notice how the other windows are made transparent? Is there an API to invoke that?

This sounds like precisely your problem. The answer seems to be "It's purposely impossible and you should feel bad for wanting to do that."

This was a question from a while ago. I found a snippet that works. You can find it in use at InteropAndHelpers file in the windowwalker project over at Github.

Related

Screenshot for all open windows

I wanted to include this code in my script, everything fits so far. Unfortunately, only a black image is created, exactly as the original creator of the post has already written it. Unfortunately, he did not describe exactly how he could solve the problem, so I ask here, maybe someone has an answer for me?
Screenshot of all open windows
He wrote the following in his post, which i don't understand what he means:
Blockquote
I finally found the issue.
I had changed windows 7 settings for best performance, once I changed it to normal Aero settings. It works as expected.

WPF - Customizing title bar - uptodate solution

I love WPF but I'm in trouble.
Everything is very customizable but I didn't found anything valid for personalizing title Bar and Application borders.
I've understand that isn't possible to customize it directly because it's Windows that manage that, but otherwise I didn't found any valid solutions...
The only results that show up from google are using WindowChrome, but I think it's a VERY outdated solution.
Otherwise I only found THIS code snippet, but it is (for me, at least) a bit complicated to understand fully. Also, I've tried it but it doesn't allow to do some actions, like move window when maximized, but a lot of application (done in WPF) that I saw daily are able to do that.
In final word I can't find anything good.
I think WPF is very used even today, and I really don't understand how they do good looking solutions, that doesn't involve using a 2009 library.
You should get started with the docs. That sample you linked to will make more sense after that.
Basically, you are asking OS that you own the entire region and will take care of ensuring everything continues to behave as expected.

Touch Keyboard in .NET Compact Framework

I browsed the web for a simplified keyboard for a project running on windows mobile, but I could not find anything good, so I tried to create one myself.
The basic problem encountered, related to which control use to realize the "keys", was: I need a control that:
- is clickable
- can contain text
- DOES NOT TAKE THE FOCUS
I made some attempt, and I found that the LinkLabel seems to be exactly what I need: it works.
Now, the question is: is that a good idea to use the LinkLabel to realize a touch screen keyboard, or this is the wrong approach?
I would like to avoid developing all the application with this keyboard, and then find some trouble when it will be "too late".
Honestly the "right" approach is to create an actual SIP (there's a sample in the WinMo SDK). Anything else and you have to deal with the focus issues you're already seeing.

an XNA way to make a menustrip

I will preface this by I am new to XNA and I realize what I am asking for doesn't exist.
However I am curious if I wanted to create something similar to a menustrip from winforms in XNA, how would I do that? Is there a best way? Or even a way?
I appreciate it, thanks!
Well, if you're only targeting windows, you can always render XNA in a winforms project or wpf app. Once you do that, you can use the built-in controls to render the menu.
If however you're looking for something that will work on xbox or windows phone, you will have to do the work of rendering and positioning the menu yourself using whatever rendering techniques you are familiar with (ie. SpriteBatch, etc.)
I found a possible solution, that will need further investigation:
http://neoforce.codeplex.com/
This should give me UI control w/o having to recode everything, unless I can just add an XNA pane to my winforms app
Edit:
neoforce appears to not work well with c# 2010. I did however find this: http://create.msdn.com/en-US/education/catalog/sample/winforms_series_1 which does work, to do as Joel Martinez mentioned of drawing an XNA form inside of a winform. It is not trivial but this example code should be enough for a jump start.

Icons on Titlebar

I just found something really cool and i'm surprised i didn't really notice it sooner. Have you ever seen WordPad running on Windows 7? If you have, you'll notice that on the top-left of the window's titlebar are a few icons (save, undo/redo). On the actual titlebar itself! How cool is that? I was wondering how i would implement that feature into my own programs but don't know where to start. I went to MSDN and then got lost because i wasn't sure of what to actually look for... Can somebody please help me?
If you would like a piccture of what i'm talking about i can try and upload a pic somewhere like maybe photobucket or similar?
Thank you
Jase
It is part of the Ribbon ui. Here is some code from the code project.
http://www.codeproject.com/KB/toolbars/WinFormsRibbon.aspx
You can use a stack of commands to create a system that supports multiple level undo.

Categories