Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
0
Answer
A simple program to stop Window Messenger Blinking VS 2008
Jennifer Logam
16y
2.1k
1
Reply
I was going through some old programs and I came upon one that blinks a window juts like msn does. the following is the code that does this:
Code:
private void btnFlash_Click(object sender, System.EventArgs e)
{
FLASHWINFO flashInfo = new FLASHWINFO();
flashInfo.cbSize = Marshal.SizeOf(flashInfo);
flashInfo.hWnd = this.Handle;
flashInfo.dwFlags = FLASHW_ALL;
flashInfo.uCount = 5; // Number of times to flash window.
flashInfo.dwTimeout = 0;
FlashWindowEx(ref flashInfo);
}
struct FLASHWINFO
{
public int cbSize;
public IntPtr hWnd;
public int dwFlags;
public int uCount;
public int dwTimeout;
}
[DllImport("user32")] private static extern int FlashWindowEx (
ref FLASHWINFO pwfi
);
const int FLASHW_STOP = 0;
const int FLASHW_CAPTION = 0x1;
const int FLASHW_TRAY = 0x2;
const int FLASHW_ALL = 0x3;
const int FLASHW_TIMER = 0x4;
const int FLASHW_TIMERNOFG = 0xC;
Now I was thinking of writing a simple program, like a service, that could stop window messenger from blinking when a message arrives. So its stopping the blinking but in another program. Is this possible? and if so, could someone give me a start or a hint in constructing such a program?
Jennifer.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
Generics
External device communication from web application