Avoid fade-in effect - winforms

In Vista and higher, a WinForm is faded in by default:
When I show it, it is not "Bamm, here it is", but it has a gentle fade-in by default.
How can I avoid/turn off this fade-in effect per window?

Did you try to set Opacity=1 in the constructor? It's only an idea, I didn't try it

Related

WPF Longtouch interferes with TouchEnter

I have a rectangle which should trigger an event on TouchEnter.
But when I Touch the rectangle nothing happens until the longtouch is over. It looks like it is waiting to be sure there is no longtouch before the TouchEnter kicks in.
If I touch the rectangle and move slightly (so there can't be a LongTouch anymore) it triggers the event.
How can I get rid of this:
"I better wait for the longTouch to be finished until I trigger the touchEnter" ?
The same happens with the TouchDown event...
Set as high as possible in the visual tree the attached properties Stylus.IsPressAndHoldEnabled and Stylus.IsFlicksEnabled to false in xaml or in code.
These will disable most of the delay experienced when doing a touch enter and down due to the touch needing the delay to figure out what the user wants to do.
It happened only on my Touch-Monitor.
Using a Tablet it worked fine.
So I think it depends on the Hardware.

Change tool tip timeout on menustrip in winforms?

How to extend tool tip timeout when hovering on menu items in a menustrip (in winforms)?
I set it like this:
toolStripMenuItem1.ToolTipText = "foo";
You can do it if you use the Tooltip class, by setting the AutoPopDelay property to a higher value (MSDN: Change the Delay of the Windows Forms ToolTip Component).
However, if you try to use the Tooltip class to set a tooltip on a ToolStripMenuItem like this:
ToolTip1.SetToolTip(toolStripMenuItem1, "check it yo!")
You'll get the following error:
'System.Windows.Forms.ToolStripMenuItem' cannot be
converted to 'System.Windows.Forms.Control'.
Check out this StackOverflow question for ways around that.
There is an article on CodeProject that implements a derived version of ToolStrip with custom tool tip support. That could probably be used to do what you want to do.
http://www.codeproject.com/Tips/376643/ToolStrip-with-custom-ToolTip

doing a show() does not let gui update until resize window

doing a show() does not let gui update until resize window.
I have a window that I hide for a while,(has to be over 30 min. or maybe after screensaver kicks in) then when I try to do a show and the gui pops up but it does not update.
I am making correct updates to the gui, but they aren't seen until i physically resize the window. I'm thinking somehow the gui doesn't focus anymore. If I don't let it sit idle for a long time it never has a problem. Is there something I can do to force it to gain focus when I do the show()? thank you very much
To answer your question directly: You can also do a Focus() to make the window focus (in theory anyway).
But I don't think this is your problem. Have you been able to reproduce this behavior on multiple computers?

Need to control "Z Order" of windows within WPF Application

I have an application that, due to OpenGL airspace issues, has to host several controls in separate, exclusive windows. This is working quite well, but I am setting all of the windows to TopMost = true, which means that they do stay showing even when they lose focus, but they also overlay other applications. Also, it kind of binds me to using only one window at a time for this. Activate() doesn't work either.
I found that setting the windows' owners to the main app window allowed them to always float on top.
Inside the control that mediates the content and measurement of the child window:
InnerWindow.Owner = Window.GetWindow(this);
this being the windowHostControl hosting this window.
I use to combine Activate() and Focus() methods to show a hidden Window. Can you try using Focus() and let us know if this is working ?

Form.Show not showing up in Taskbar in Vista

I have a winform app that is hiding it's UI and waiting on a named pipe message before showing up
On receiving the event the thread invokes into the main UI thread and then does the following
Set the opacity to 100
ShowInTaskbar = true;
BringToFront();
ON Windows Vista the window does not show up on the taskbar though and the window is in the background . YOu cant say it
if you finally find it and click on it, it shows up on the taskbar
any ideas on how to fix this
i don't work in vista but it might be better just to flash the taskbar or do a ballon popup or something like that. What your suggesting maybe a bit annoying to a user. Say there typing away and there looking at the keyboard and your window has stolen the focus they look back and find what they just wrote hasn't gone into the app they thought it was going into.like this.
flashing the task bar
this might help also
If the form has an Owner set it might or might not show up in the taskbar.
Don't set the Owner property and it should show fine (it did for me).

Resources