473,513 Members | 2,493 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem in blinking an icon.....

38 New Member
Hello,

I'm doing a vb project which contains some data in flexgrid the data in the flexgrid can change upon each and every execution . Now each data in the grid correspond to one particular icon in the form so when the user clicks on the grid i want that particular icon to start blinking .I'm not able to achieve it .Plz can someone help me out .

Thanks & regards,
Oct 4 '07 #1
11 2292
Killer42
8,435 Recognized Expert Expert
Two questions...

What version of VB are you using?

What have you tried so far? I expect a timer control would be the way to go.
Oct 5 '07 #2
sumuka
38 New Member
Two questions...

What version of VB are you using?

What have you tried so far? I expect a timer control would be the way to go.

Thanks for having look at my question and replying.

I'm using VB 6.0 i have used timer by setting its interval as 500 but the problem is a single number in the flexgrid can correspond to more than one icon in the diagram for ex: assume that the first cell of the flexgrid contains no 6 and it may correspond to 4 icons , now when the user clicks the cell which contain 6 i want all the 4 icons to start blinking simultaneously.I have used picture box to paste the icon.

regards,
Oct 5 '07 #3
Killer42
8,435 Recognized Expert Expert
I don't know enough about your situation to make many suggestions. But if I have a form where I want to do something like blink a number of controls, what I like to do is flag them with some string in their Tag property. The timer just has to loop through the controls on the form checking their Tag and when it finds that string, do the "blinking" thing to that control. That may mean turning its visibility on/off, or changing its colours, or whatever.
Oct 5 '07 #4
jamesd0142
469 Contributor
See if this helps...

It makes the button flash like crazy!

Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.     Dim a As String = 0
  3.     Dim b as integer
  4.     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  5.         If a = 0 Then
  6.             Button2.Visible = False
  7.             a = 1
  8.             Exit Sub
  9.         End If
  10.         If a = 1 Then
  11.             Button2.Visible = True
  12.             a = 0
  13.             Exit Sub
  14.         End If
  15.     End Sub
  16. End Class
You use this button to stop/start it flashing....
Expand|Select|Wrap|Line Numbers
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         If b = 2 Then
  3.             b = 0
  4.             Exit Sub
  5.         End If
  6.         If b = 0 Then
  7.             b = 2
  8.             Button2.Visible = True
  9.             Exit Sub
  10.         End If
  11.     End Sub
Oct 5 '07 #5
Killer42
8,435 Recognized Expert Expert
See if this helps...
sumuka, note that this is VB.Net code and won't work in VB6.
Oct 6 '07 #6
Killer42
8,435 Recognized Expert Expert
Here's a working sample written in VB6. Just load it into VB6 and run it. There's not much code, and it has comments to show what's what.

I've also included the EXE for anyone who just wants to try running it. As far as I know it's virus free and so on, but take the usual precautions, of course.
Attached Files
File Type: zip Blinking controls.zip (5.2 KB, 181 views)
Oct 6 '07 #7
jamesd0142
469 Contributor
That's good Killer, think you can post the code as I don't have VB6 only VB.Net?

Thanks.
Oct 6 '07 #8
Killer42
8,435 Recognized Expert Expert
think you can post the code as i dont have vb6 only vb.net?
I did. It's in the zip file.
Oct 7 '07 #9
sumuka
38 New Member
Here's a working sample written in VB6. Just load it into VB6 and run it. There's not much code, and it has comments to show what's what.

I've also included the EXE for anyone who just wants to try running it. As far as I know it's virus free and so on, but take the usual precautions, of course.

Thank you for your interest. The problem here is I have a flex grid whose cells contain one or the other number and when I click on the number I want the corresponding icon to blink automatically. Each and every number is connected with one or the other icon on the form.
Please help me.


Thanks in anticipation,
Sumuka.
Oct 11 '07 #10
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

What is stored in FlexGrid Cell...?
Index Number of the Icons(What Character Seperates them)..?
List of Icon Names?
Can you post the Cells's TextMatrix here ..?

Regards
Veena
Oct 11 '07 #11
Killer42
8,435 Recognized Expert Expert
Thank you for your interest. The problem here is I have a flex grid ...
Sorry, but I just can't seem to understand exactly what it is you want us to help with. Can you try to go into more detail, or show us what you have tried? Just stating the situation again and again won't help, we need to know more about precisely what you have, and what you want to do with it.

For instance, in what way are the icons "connected" with the grid cells?
Oct 11 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4819
by: Fast Eddie | last post by:
Can anyone tell me a good way to make a blinking systray icon? I want it to alternate between two icons. I've tried toggling between two notifyIcons and alternating the visible variable - but that...
2
2549
by: Elad Gutman | last post by:
Hi Everyone, I'm facing an annoying problem and any help will be most appreciated . .. . I have a main application form and its icon is functioning excellent: it appears both in the taskbar...
2
5813
by: Sharon | last post by:
The ErrorProvider text is also blinking together with the icon. It’s making the reading of the error description very uncomfortable. Is there a way to prevent the text from blinking while the...
1
2215
by: Sharon | last post by:
The ErrorProvider text is also blinking together with the icon. It’s making the reading of the error description very uncomfortable. Is there a way to prevent the text from blinking while the...
0
7260
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,...
0
7161
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...
0
7384
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,...
0
7539
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5089
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3234
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...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1596
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 ...

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.