-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: DeepakG_MSFT
Message 5 in Discussion

Hi Pradeep,   Webforms work slightly differently in the sense that you don't have a 
client window area where you can perform the drawing. What you'll need to do is draw 
the rectangle or perform any other graphical operation on an in memory bitmap and then 
push the bitmap out to the client.    Try the following code snippet (this one draws a 
circle)   <%@ Page Language="VB" ContentType="image/jpeg"%>
<%@ Import Namespace="System.Drawing"%>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Drawing.Imaging"%> <script runat="server">
 Sub Page_Load(O As Object, E As EventArgs)
  Dim newBitmap As New Bitmap(100,100)
  Dim g As Graphics = Graphics.FromImage(newBitmap)
  g.FillRectangle(new SolidBrush(Color.White), new Rectangle(0,0,100,100))
  g.DrawEllipse(New Pen(Color.Red), new Rectangle(0,0,80,80))
  Dim strm As Stream
  strm = Response.OutputStream
  newBitmap.Save(strm,ImageFormat.gif)
  
  
 End Sub
</script>   You can also see it in action at: http://www.winisp.net/deepak/Image.aspx  

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to