Himo Posted May 22, 2005 Posted May 22, 2005 Hello, I'm using this code to put a bitmap up the site, I want to center this bitmap, but the code prerequisites prevent me from doing so. If I don't put the response.clear in the Paint method, then the picture shows up as a bunch of gibber. Any tips on this? BTW: How could I make this script that the circle is placed where the mouse clicks? [CS] private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here Response.Write(Request.QueryString.Get("Username")); Response.Write("<br><br><center>"); Paint(); Response.Write("Midden</center>End"); } private void Paint() { Response.Clear(); Bitmap field = new Bitmap(640,480); System.Drawing.Graphics webpage = Graphics.FromImage(field); webpage.DrawEllipse(new Pen(Color.Blue,1),40,40,40,40); field.Save(Response.OutputStream,System.Drawing.Imaging.ImageFormat.Jpeg); webpage.Dispose(); field.Dispose(); Response.Flush(); }[/CS] Quote For questions about VS .net extensibility, please fire at me! :) For readability, please use the [ CS][/CS ] tags
Himo Posted May 22, 2005 Author Posted May 22, 2005 @ the mouse problem: I tried with the API GetCursorPos, but it does only return 0,0 while it executes perfect... Quote For questions about VS .net extensibility, please fire at me! :) For readability, please use the [ CS][/CS ] tags
Himo Posted May 22, 2005 Author Posted May 22, 2005 And more questions piling up. What about animation? Dear god, this is difficult... Quote For questions about VS .net extensibility, please fire at me! :) For readability, please use the [ CS][/CS ] tags
Himo Posted May 23, 2005 Author Posted May 23, 2005 I drop the question. I just threw away everything I had and started over. Now I'll just make an offline application with a connection to a mysql database online. Suits my needs fine and is much easier :D Quote For questions about VS .net extensibility, please fire at me! :) For readability, please use the [ CS][/CS ] tags
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.