ARTICLE

Flash Window

Posted by Vishal Kulkarni Articles | Visual Basic 2010 May 11, 2004
Flashing a window means changing the appearance of its caption bar as if the window were changing from inactive to active status, or vice versa. (An inactive caption bar changes to an active caption bar; an active caption bar changes to an inactive caption bar).
Download Files:
 
Reader Level:

The FlashWindow function flashes the specified window once, whereas the FlashWindowEx function flashes a specified number of times.

Flashing a window means changing the appearance of its caption bar as if the window were changing from inactive to active status, or vice versa. (An inactive caption bar changes to an active caption bar; an active caption bar changes to an inactive caption bar.)

Typically, a window is flashed to inform the user that the window requires attention but that it does not currently have the keyboard focus.

The FlashWindow function flashes the window only once; for repeated flashing, the application should create a system timer. 

This API is useful when the application wants to drag the attention of the user that a particular process is complete.  

  • Run the code. A small window will open with one button 
  • Click the button "Flash". 
  • The window will start flashing at once. Irrespective of the other windows this window will flash.

Source Code:

API structure :
Public Shared Function <DllImport("user32")> _
FlashWindow(
ByVal hwnd As Integer, _
ByVal bInvert As Integer) As Integer
End Function

This API class is imported by writing the following statement. This makes the code written in the API class available to the form.

Imports FlashWindow.API

After a form
is shown the button "Flash" is pressed. This enables the timer.

timer1.Interval = 2000
timer1.Enabled =
True

And the following statement thus calls the API.

Dim iInt As Integer
'imports flashwindow.api imports the api class.
iInt = FlashWindow(form1.Handle, 1)

General Description:

Typically, you flash a window to inform the user that the window requires attention but does not currently have the keyboard focus. When a window flashes, it appears to change from inactive to active status. An inactive caption bar changes to an active caption bar; an active caption bar changes to an inactive caption bar.

Login to add your contents and source code to this article
share this article :
post comment
 

can u send me same sample for asp.net 2.0

Posted by Rajani grandhi Feb 26, 2008
Nevron Diagram
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
Become a Sponsor