E
engahmedbarbary
Guest
Problem
I have picture box control found on windows form and I need to show Image for 5 second then hide it .
meaning period for showing picture is 5 second after that hide it
I work on windows form c sharp visual studio 2017 with SQL server 2012
Function below working but remaining how to using in timer and which event will be used ?
What I have tried:
public void GetMembersData()
{
string sqlGetLast = @"select isnull((select top 1 MemberCode from members order by MemberCode desc),1) ";
int 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);
pictureBox1.Image = ByteArrayToImagebyMemoryStream(MemberImage);
}
}
Continue reading...