Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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]

For questions about VS .net extensibility, please fire at me! :)

For readability, please use the [ CS][/CS ] tags

Posted

@ the mouse problem:

I tried with the API GetCursorPos, but it does only return 0,0 while it executes perfect...

For questions about VS .net extensibility, please fire at me! :)

For readability, please use the [ CS][/CS ] tags

Posted

And more questions piling up. What about animation?

Dear god, this is difficult...

For questions about VS .net extensibility, please fire at me! :)

For readability, please use the [ CS][/CS ] tags

Posted
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

For questions about VS .net extensibility, please fire at me! :)

For readability, please use the [ CS][/CS ] tags

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...