?
Solved

Is it possible to create realtime graphics in an ASP.NET page using GDI (E.G A clock)?

Posted on 2006-05-08
3
Medium Priority
?
424 Views
Last Modified: 2006-11-18
Hi,

I'm not looking for code, more of a high level idea of where to start if it's possible.  I have created a control for a windows application that draws an analogue meter using GDI+.  It's just a jpg background that looks like a tachometer, and then I use GDI to draw the needle and update it every 300 milliseconds.

Is it possible to do the same sort of thing on an ASP.Net page?

Could I have an ASP page that has some kind of control embedded updates in realtime without the entire page needing to be refreshed?  I'm thinking of something like the Java applet analogue clocks that were so popular when Java first took off.

Thanks

Mick
0
Comment
Question by:lambch0p
3 Comments
 
LVL 18

Expert Comment

by:Elvio Lujan
ID: 16631347
may be you can do it with an activeX control...
0
 
LVL 25

Accepted Solution

by:
DBAduck - Ben Miller earned 1000 total points
ID: 16631983
You can do that if you use GDI to draw the entire image, but it would be a lot of out of band updates to keep a clock updated in Analog format.

The only ways that I can think of is to draw like 15 seconds worth of images and cache them on the client by downloading them and using the javascript that is used to update the clock in digital format (many are available out on the web) and just change the graphics.

Then at a 10 second interval use something like Ajax or the controls in Atlas (atlas.asp.net) to make calls to get the next set of graphics so that you do not incur timing issues in updating the clock.  

I have built a Java applet one a long time ago and it was pretty configurable and stuff, but to do this type of active programming on a web page, is doable, but may be hoaky at best.

But the answer is, you can do it.  The other thing you may be able to do is to put an image at an absolute position that is the "face" of the analog clock, and then have an image of the needles and with javascript move the needles to another absolute location and use an array to keep track of those in an array and just cycle through them with for(i=0;i<60;i++) and move the second hand needle, etc.

Ben.
0
 

Author Comment

by:lambch0p
ID: 16632619
Thanks Ben,

You've just convinced me that a Windows application is the way to go.

M
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month16 days, 22 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question