Click here to Skip to main content
15,910,083 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do you make buttons with icons? Pin
Don_s26-Mar-03 21:50
Don_s26-Mar-03 21:50 
GeneralSend Hex file to CommPort Pin
Member Salamon26-Mar-03 12:41
Member Salamon26-Mar-03 12:41 
GeneralMessageBox's Pin
jtmtv1826-Mar-03 10:07
jtmtv1826-Mar-03 10:07 
GeneralRe: MessageBox's Pin
Le centriste26-Mar-03 11:05
Le centriste26-Mar-03 11:05 
GeneralRe: MessageBox's Pin
jtmtv1826-Mar-03 12:34
jtmtv1826-Mar-03 12:34 
GeneralRe: MessageBox's Pin
Nick Seng26-Mar-03 16:57
Nick Seng26-Mar-03 16:57 
GeneralBitmaps and Graphics Pin
Jon Newman26-Mar-03 8:06
Jon Newman26-Mar-03 8:06 
GeneralRe: Bitmaps and Graphics Pin
Nathan Blomquist26-Mar-03 8:16
Nathan Blomquist26-Mar-03 8:16 
Jonny Newman wrote:
Now, I wanna add some text to it and save the added text to the bitmap itself for later use.

By "save it for later use", do you mean physically save it back to disk in the file or just modify it for late use in the currently running instance of your program? I do not think you can modify a resource and then save it back into the executable or DLL on the fly. But I suppose I could be wrong, it has happened before Big Grin | :-D

If you only wish to modify for use during the current instance and lose all changes when you shut your app down, you can use the Graphics class and its paint methods.

Example:

// create bitmap
Bitmap bit = new Bitmap(this.GetType(),"bitmap.bmp");

// create graphics object to draw on
using(Graphics g = Graphics.FromImage(bit))
{
    // draw your string, with some font, some brush, at some pointf
    g.DrawString("Some String Here",myFont,myBrush,myPointF);
}

// bit now contains a bitmap with your string on it...

Hope this helps,
Nathan

---------------------------
Hmmm... what's a signature?
GeneralRe: Bitmaps and Graphics Pin
Jon Newman26-Mar-03 8:23
Jon Newman26-Mar-03 8:23 
GeneralRe: Bitmaps and Graphics Pin
Jon Newman26-Mar-03 8:27
Jon Newman26-Mar-03 8:27 
GeneralBuild Properties problem Pin
Le centriste26-Mar-03 5:44
Le centriste26-Mar-03 5:44 
GeneralRe: Build Properties problem Pin
Thomas Freudenberg8-Apr-03 14:42
Thomas Freudenberg8-Apr-03 14:42 
QuestionPID of current process? Pin
se99ts26-Mar-03 5:13
se99ts26-Mar-03 5:13 
AnswerRe: PID of current process? Pin
Stephane Rodriguez.26-Mar-03 5:22
Stephane Rodriguez.26-Mar-03 5:22 
GeneralRe: PID of current process? Pin
se99ts26-Mar-03 5:25
se99ts26-Mar-03 5:25 
GeneralRe: PID of current process? Pin
Stephane Rodriguez.26-Mar-03 6:10
Stephane Rodriguez.26-Mar-03 6:10 
GeneralRe: PID of current process? Pin
se99ts26-Mar-03 6:13
se99ts26-Mar-03 6:13 
GeneralBinding a Repeater with a array of Struct Pin
mablao26-Mar-03 3:22
mablao26-Mar-03 3:22 
QuestionListBox DataBinding, ValueMember? Pin
STW26-Mar-03 3:18
STW26-Mar-03 3:18 
AnswerRe: ListBox DataBinding, ValueMember? Pin
VoidMainVoid30-Mar-03 15:52
VoidMainVoid30-Mar-03 15:52 
GeneralRe: ListBox DataBinding, ValueMember? Pin
STW30-Mar-03 21:43
STW30-Mar-03 21:43 
GeneralReference to runtime generate assembly Pin
alper26-Mar-03 1:27
alper26-Mar-03 1:27 
GeneralIntellisense and multi file assembly Pin
VizOne25-Mar-03 23:32
VizOne25-Mar-03 23:32 
GeneralRe: Intellisense and multi file assembly Pin
S O S26-Mar-03 2:32
S O S26-Mar-03 2:32 
GeneralRe: Intellisense and multi file assembly Pin
VizOne26-Mar-03 8:40
VizOne26-Mar-03 8:40 

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.