如何将额外的值传递给timer_tick事件 [英] how to pass a extra value to timer_tick event

查看:157
本文介绍了如何将额外的值传递给timer_tick事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我用图片框来显示一些图片。

我有一组图像存储在SQL服务器中将根据某些条件获取数据。我必须逐个播放所有这些图像,如幻灯片



iam使用数据表来获取和存储所有数据。

我使用Timer事件,但它只显示最后一张图片。



请帮助

谢谢和问候

Nirmala Saravanan

Hi,

Iam using a picture box to show some images.
I have set of images stored in SQL server and this data will be fetched according to some conditions. I have to play all these set of images one by one like slide

iam using data table to fetch and store all the data.
Iam using Timer event but it is showing only the last picture.

Pls Help
Thanks and regards
Nirmala Saravanan

推荐答案

您不需要将任何其他信息传递给Timer Tick事件处理程序:只需在表单中的类级别声明变量并正常访问它 - 它将像任何其他类字段一样工作。
You don't need to pass any additional information to the Timer Tick event handler: just declare the variable at class level within your form and access it normally - it will work exactly like any other class field.


这很简单。您无法在Time Tick事件中传递任何其他数据。您必须在事件之外跟踪此附加数据。但是,既然我们不知道你的代码是什么样的,那就不可能告诉你应该做什么了。
It's simple. You can't pass any additional data in the Time Tick event. You have to keep track of this additional data outside the event. But, since we have no idea what you're code looks like, it's impossible to tell you what you should be doing instead.


这篇关于如何将额外的值传递给timer_tick事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆