473,662 Members | 2,547 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Making a control flash

I want to deliberately make a label (and perhaps a button) flash to
alert the user that something very serious has happened.

Any ideas on how to do this?
Nov 15 '05 #1
4 5876
without stating my opinion on blinking things in a UI...

Add a timer control to your form and then whenever you want it to start
blinking, set it's enabled property to true. In the timer's tick event, set
it to visible if visible is false and set visible to false if it's true.
You can use a Static module level variable and just set the visible property
to the boolean variable....and just change the bool's value with each tick.

HTH,

Bill
"Mystery Man" <Pr************ @hotmail.com> wrote in message
news:87******** *************** **@posting.goog le.com...
I want to deliberately make a label (and perhaps a button) flash to
alert the user that something very serious has happened.

Any ideas on how to do this?

Nov 15 '05 #2
I'd recommend rather than toggling the visibility, toggling the enabled state,
that way it flashes from black to gray to black, similar effect, but the text
is always visible.

No need to store the state separately, just use the following:

label.Enabled = !label.Enabled;

in response to the timer event.

William Ryan eMVP wrote:

without stating my opinion on blinking things in a UI...

Add a timer control to your form and then whenever you want it to start
blinking, set it's enabled property to true. In the timer's tick event, set
it to visible if visible is false and set visible to false if it's true.
You can use a Static module level variable and just set the visible property
to the boolean variable....and just change the bool's value with each tick.

HTH,

Bill
"Mystery Man" <Pr************ @hotmail.com> wrote in message
news:87******** *************** **@posting.goog le.com...
I want to deliberately make a label (and perhaps a button) flash to
alert the user that something very serious has happened.

Any ideas on how to do this?


--
Bret Pehrson
mailto:br**@inf owest.com
NOSPAM - Include this key in all e-mail correspondence <<38952rglkwdsl >>
Nov 15 '05 #3
Bret:

Good points, and yes, there are multiple properties that you can manipulate
to create a blinking effect. Personally, I tend to use the approach you
mention setting the property to it's opposite when state can only be one of
two conditions. However, I have run into occassions where the behavior
might need to be temporarily changed and other properties may need to be
changed based on that change, hence the module level variable. I think for
this issue though, your approach is definitely cleaner.

Cheers,

Bill
"Bret Pehrson" <br**@infowest. com> wrote in message
news:40******** *******@infowes t.com...
I'd recommend rather than toggling the visibility, toggling the enabled state, that way it flashes from black to gray to black, similar effect, but the text is always visible.

No need to store the state separately, just use the following:

label.Enabled = !label.Enabled;

in response to the timer event.

William Ryan eMVP wrote:

without stating my opinion on blinking things in a UI...

Add a timer control to your form and then whenever you want it to start
blinking, set it's enabled property to true. In the timer's tick event, set it to visible if visible is false and set visible to false if it's true.
You can use a Static module level variable and just set the visible property to the boolean variable....and just change the bool's value with each tick.
HTH,

Bill
"Mystery Man" <Pr************ @hotmail.com> wrote in message
news:87******** *************** **@posting.goog le.com...
I want to deliberately make a label (and perhaps a button) flash to
alert the user that something very serious has happened.

Any ideas on how to do this?


--
Bret Pehrson
mailto:br**@inf owest.com
NOSPAM - Include this key in all e-mail correspondence <<38952rglkwdsl >>

Nov 15 '05 #4
If that serious thing is some erroneous input use the Error provider class
that is the standard way of doing making a alert.

Nirosh.

"Mystery Man" <Pr************ @hotmail.com> wrote in message
news:87******** *************** **@posting.goog le.com...
I want to deliberately make a label (and perhaps a button) flash to
alert the user that something very serious has happened.

Any ideas on how to do this?

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1944
by: Ron Vecchi | last post by:
Hello, Through using this and many other Microsoft dotnet newsgroups I have been pointed towards many helpful open source projects and articles that have helped a great deal in my studies as well as projects. Recently I have been using a lot of Macromedia Flash Movies within my asp.net pages, as many people have. For those familiar with Flash macromedia can publish the html output for you so you only need to copy/paste to your...
2
1961
by: Alex Maghen | last post by:
I want to insert (or not insert) a Macromedia Flash object on my ASP.NET .ASPX page. What is the most elegant way of doing this? I know that I could use an <ASP:Literal> control and just spit the <OBJECT> tag text out to the browser (or not if I don't want to present the Flash movie). Is there another way? Is there an ASP.NET "OBJECT" Web Control?? Alex
0
765
by: BobAchgill | last post by:
Do I use forms or controls to accomplish layers 2 and 3??? The scenario is this: Layer 1 (on bottom) is a web client control in my base Form. Now I want to temporarily over lay the web client window with: Layer two – a Flash movie
2
3122
by: rhungund | last post by:
Hi all. I have a user control I'm using as my "include" file for my flash navigation. My asp.net app is written in vb.net. The swf file takes a parameter which I would like to pass into my user control. Ideally i'd like to do something like this: <object type="application/x-shockwave-flash" data="flash/navigation.swf?page=<%pageName%>" width="850" height="148"> <param name="movie" value="flash/navigation.swf?page=<%pageName%>" />...
1
1886
by: Haobing | last post by:
I embeded an flash activex control to a wxPanel inherited class 'MyPanel' using wxPython's MakeActiveXClass method, and 'MyPanel' only has flash control ;But when then dialog init,the focus is not on the flash, I have to click the flash control manully to setfocus on it; It will lose focus again when the dialog is block by other windows, so I have to click again to pull the focus back. I just want to know howto SetFocus to an activex...
351
12955
by: CBFalconer | last post by:
We often find hidden, and totally unnecessary, assumptions being made in code. The following leans heavily on one particular example, which happens to be in C. However similar things can (and do) occur in any language. These assumptions are generally made because of familiarity with the language. As a non-code example, consider the idea that the faulty code is written by blackguards bent on foulling the language. The term...
1
3179
by: Priya | last post by:
Hi , I'm creating a custom control for a web project. I wanted to add flash content as part of that control. How do i do that in C# file. Pls help. Thanks in advance, Priya
3
2150
by: VMI | last post by:
What are the advantages/disadvantages of using the Flash component on my screensaver application? The basic animation that the screensaver will include can be done either with Flash or by writing code. But with the Flash control, I can easily add much more fancy animation. But I don't know what disadvantages (in terms of user installation, PC requirements during installation, etc) may arise from using this Flash component. Any help is...
3
2012
by: vinceboy | last post by:
Hi..guys.I am newbie here and have a page which need to load two different flash element with session control.However something went wrong in the code and cause the first if clause is not working.I try to echo out what I want before the if clause but it displayed nothing. Thanks for your generious help.. <?php echo $_SESSION; if (isset($_SESSION)){ ?> <tr> <td colspan="2"> <div align="center">
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8344
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8546
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.