Last post Sep 28, 2005 06:52 AM by anujpant
Sep 26, 2005 11:23 PM|anujpant|LINK
Sep 27, 2005 01:52 AM|JDHill|LINK
here or here for ideas how to do this.
Sep 27, 2005 04:56 AM|anujpant|LINK
Also, is there a way using GDI+ functions like drawRectangle.
I am able to draw static rectangles on screen but they hide all the buttons and images in the background. The Code is as follows
Is there a way to show the drawn rectangle without hiding the image or server controls in the background.
Can i use the mouse to define the starting and ending points for the rectangle.
Page.Response.ContentType = "image/jpeg"
g = Graphics.FromImage(b)
g.DrawRectangle(redpen, 100, 100, 300, 300)
Sep 27, 2005 09:42 AM|JDHill|LINK
Yes, you can use gdi+ to draw rectangles, but what you're really doing is drawing them on the Server, then ASP.Net is creating the HTML for the browser with your rectangles included. The completed page is then pushed over the wire to finally be rendered
in the user's browser.
As far as your buttons being hidden, I would need to look closer at your actual code. If you are using absolute positioning, then most likely, you need to make sure that your rectangles appear in the HTML before the buttons, etc. Also, if you are using any
CSS z-index values on these various elements, then that could be a reason for this layering.
Unfortunately, if you want to capture the user's mouse movements, you'll need to do so using client-side script.
An alternative to this would be to author a Windows Forms application (this is where gdi+ shines!), or a Java Applet to be embedded in your page and run in the context of the browser, although this gets
much more complicated.
I hope this helps to further answer your questions.
Sep 28, 2005 06:52 AM|anujpant|LINK