engsalah2018
Technical User
problem
How to show image for 10 second period then will be null After that ?
I have TimerCount on windows form get last image on table members every second
and this is work success using windows form timer on visual studio 2017 .
and I need when new image retrieved show this image for 10 second then make it null
Code:
picturebox1.image=null
After that will be null in case of not new image retrieved
and within 10 second if new image retrieved by TimerCount not wait for ten second
show image per 10 second only if no image retrieved within ten second
and if after 10 second no image retrieved set image to null ?
Code:
pseudo code
if(new image retrieved )
{
show it per 10 second
}
if(after 10 second no image retrived)
{
picturebox1.image=null;
}
if(new image retrieved by timercount)
{
not wait until 10 second display for current image
}
can you help me or give me idea for that please ?
What I have tried:
Code:
Code:
private void TimerCount_Tick(object sender, EventArgs e)
{
TimerCount.Start();
GetMembersDataImage();
}
Code:
public void GetMembersData()
{
string sqlGetLast = @"select isnull((select top 1 MemberCode from members order by MemberCode desc),1) ";
MemberCode = Utilities.ObjectConverter.ConvertToInteger(DataAccess.ExecuteScalar(sqlGetLast));
string sqlImage = "select MemberImage FROM Members WHERE MemberCode =" + MemberCode + "";
if (Utilities.ObjectConverter.ConvertToString(DataAccess.ExecuteScalar(sqlImage)) != "")
{
byte[] MemberImage = (byte[])DataAccess.ExecuteScalar(sqlImage);