TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ahmed elbarbary
NA
1.6k
278k
How to show image for 10 second period then will be null aft
Mar 28 2019 11:11 AM
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
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 ?
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:
private
void
TimerCount_Tick(
object
sender, EventArgs e)
{
TimerCount.Start();
GetMembersDataImage();
}
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);
Gate1Pic.Image = ByteArrayToImagebyMemoryStream(MemberImage);
}
}
Reply
Answers (
1
)
HttpContext - access issue
Problem with Many to Many and EF6