Click here to Skip to main content
15,902,636 members
Home / Discussions / C#
   

C#

 
GeneralRe: Updating my main form (gui) from another class Pin
eggie517-Oct-03 1:53
eggie517-Oct-03 1:53 
GeneralRe: Updating my main form (gui) from another class Pin
Bo Hunter17-Oct-03 11:32
Bo Hunter17-Oct-03 11:32 
GeneralRe: Updating my main form (gui) from another class Pin
eggie517-Oct-03 11:35
eggie517-Oct-03 11:35 
GeneralRe: Updating my main form (gui) from another class Pin
eggie517-Oct-03 13:49
eggie517-Oct-03 13:49 
GeneralRe: Updating my main form (gui) from another class Pin
eggie517-Oct-03 13:52
eggie517-Oct-03 13:52 
GeneralQuestion regarding DictionaryBase Collections class Pin
Subha Sundara16-Oct-03 11:40
Subha Sundara16-Oct-03 11:40 
GeneralRe: Question regarding DictionaryBase Collections class Pin
Jeff Varszegi16-Oct-03 12:01
professionalJeff Varszegi16-Oct-03 12:01 
GeneralGDI+ question Pin
16-Oct-03 6:22
suss16-Oct-03 6:22 
hi,
I have a question about changing a text(string) to an image(.jpg) in a web page.

I have the code below but when I use it other web controls doesn't initialize??
I mean if I put some text boxes on the .aspx page it doesn't show them only show the .jpg and if I use the code not in page_load it doesn't work,strange isn't it? How can I solve this?

Code:
using System.Drawing;
using System.Drawing.Imaging;

private void Page_Load(object sender, System.EventArgs e)
{
Bitmap b = new Bitmap(250,80);
Graphics g = Graphics.FromImage(b);
SolidBrush sb = new SolidBrush(Color.Green);
Font f = new Font("Arial",12);
g.FillRectangle(new SolidBrush(Color.White),0,0,250,80);
g.DrawString("This is a cool thing",f,sb,5,10);
Response.ContentType = "image/jpeg";
b.Save(Response.OutputStream, ImageFormat.Jpeg);
g.Dispose();
b.Dispose();
}

how can I solve this?

Best wishes,


-
When in doubt, push a pawn!
-
GeneralRe: GDI+ question Pin
Heath Stewart16-Oct-03 8:41
protectorHeath Stewart16-Oct-03 8:41 
GeneralRe: GDI+ question Pin
sacoskun18-Oct-03 20:23
sacoskun18-Oct-03 20:23 
QuestionIs it possible to catch SystemEvent in Windows service? Pin
EnkelIk16-Oct-03 5:09
EnkelIk16-Oct-03 5:09 
AnswerRe: Is it possible to catch SystemEvent in Windows service? Pin
ankita patel16-Oct-03 12:22
ankita patel16-Oct-03 12:22 
GeneralC# -> Remoting and MarshalByValue Pin
Alsvha16-Oct-03 3:36
Alsvha16-Oct-03 3:36 
GeneralRe: C# -> Remoting and MarshalByValue Pin
Guillermo Rivero16-Oct-03 7:59
Guillermo Rivero16-Oct-03 7:59 
GeneralRe: C# -> Remoting and MarshalByValue Pin
Alsvha16-Oct-03 19:12
Alsvha16-Oct-03 19:12 
GeneralRe: C# -> Remoting and MarshalByValue Pin
Guillermo Rivero17-Oct-03 3:24
Guillermo Rivero17-Oct-03 3:24 
Generalapp.config / web.config Pin
Colin Angus Mackay16-Oct-03 2:36
Colin Angus Mackay16-Oct-03 2:36 
GeneralRe: app.config / web.config Pin
Ranjan Banerji16-Oct-03 4:23
Ranjan Banerji16-Oct-03 4:23 
GeneralListviews - Accessing SelectedItemArray Pin
MrEyes16-Oct-03 0:38
MrEyes16-Oct-03 0:38 
GeneralRe: Listviews - Accessing SelectedItemArray Pin
Mike Dimmick16-Oct-03 5:24
Mike Dimmick16-Oct-03 5:24 
GeneralRe: Listviews - Accessing SelectedItemArray Pin
Darryl Borden17-Oct-03 3:32
Darryl Borden17-Oct-03 3:32 
General2 different programing languages in one piece of code Pin
zukhanye15-Oct-03 23:10
zukhanye15-Oct-03 23:10 
GeneralRe: 2 different programing languages in one piece of code Pin
Heath Stewart16-Oct-03 9:04
protectorHeath Stewart16-Oct-03 9:04 
GeneralProblem with Mdi forms Pin
CristianRicciolo15-Oct-03 23:05
CristianRicciolo15-Oct-03 23:05 
GeneralUsing custom cursors on a form. Pin
Randhir Sinha15-Oct-03 21:41
Randhir Sinha15-Oct-03 21:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.