Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
GeneralgetByte Pin
Anonymous22-Apr-05 10:10
Anonymous22-Apr-05 10:10 
GeneralRe: getByte Pin
Le centriste25-Apr-05 4:37
Le centriste25-Apr-05 4:37 
GeneralSaving image Pin
wetdog50022-Apr-05 9:23
wetdog50022-Apr-05 9:23 
GeneralRe: Saving image Pin
Polis Pilavas22-Apr-05 9:46
Polis Pilavas22-Apr-05 9:46 
GeneralRe: Saving image Pin
wetdog50022-Apr-05 9:54
wetdog50022-Apr-05 9:54 
GeneralRe: Saving image Pin
Polis Pilavas22-Apr-05 9:58
Polis Pilavas22-Apr-05 9:58 
GeneralRe: Saving image Pin
wetdog50022-Apr-05 10:09
wetdog50022-Apr-05 10:09 
GeneralRe: Saving image Pin
Polis Pilavas22-Apr-05 10:21
Polis Pilavas22-Apr-05 10:21 
Well, that's up to you.

I think that you would want your users to be able to specify the path to a bitmapt for themselves by browsing for a specific file or typing down the filename path for themselves. It wouldn't really made much sense to just specify a fixed filename path in your code right?

A simple example:
You could drop two textboxes and a button on your form. The users would then type a path to a bitmap in the first textbox, the new path to which the bitmap will be copied in the second textbox (if it does exists under that path), and finally press the button to actually copy the bitmap.

On the button click event you could have something like this:

// First get the bitmap's original path<br />
Bitmap myBitmap = new Bitmap(this.textbox1.text);<br />
<br />
// Copy the bitmap to the new path<br />
myBitmap.Save(this.textbox2.text);


A small tip:
Btw, you would have to provide some checkups. E.g. make sure that the path names the user provided are valid before attempting to load a bitmap. Or, make sure that the user HAS provided paths for both textboxes.

Regards,
Polis

Can you practice what you teach?
GeneralRe: Saving image Pin
wetdog50022-Apr-05 10:30
wetdog50022-Apr-05 10:30 
GeneralRe: Saving image Pin
Polis Pilavas22-Apr-05 10:40
Polis Pilavas22-Apr-05 10:40 
GeneralRe: Saving image Pin
wetdog50022-Apr-05 10:51
wetdog50022-Apr-05 10:51 
GeneralRe: Saving image Pin
Polis Pilavas22-Apr-05 10:53
Polis Pilavas22-Apr-05 10:53 
GeneralRe: Saving image Pin
jinzhecheng23-Apr-05 9:00
jinzhecheng23-Apr-05 9:00 
GeneralCool: MessageBox.Show(3.1415927.ToString()); Pin
Member 9622-Apr-05 8:04
Member 9622-Apr-05 8:04 
GeneralRe: Cool: MessageBox.Show(3.1415927.ToString()); Pin
turbochimp22-Apr-05 8:28
turbochimp22-Apr-05 8:28 
GeneralRe: Cool: MessageBox.Show(3.1415927.ToString()); Pin
DavidNohejl22-Apr-05 9:18
DavidNohejl22-Apr-05 9:18 
GeneralRe: Cool: MessageBox.Show(3.1415927.ToString()); Pin
turbochimp22-Apr-05 9:38
turbochimp22-Apr-05 9:38 
GeneralRe: Cool: MessageBox.Show(3.1415927.ToString()); Pin
DavidNohejl22-Apr-05 9:44
DavidNohejl22-Apr-05 9:44 
Generalcombox in property grid Pin
jinzhecheng22-Apr-05 7:00
jinzhecheng22-Apr-05 7:00 
Generalwindow service Pin
hareluya22-Apr-05 5:58
hareluya22-Apr-05 5:58 
GeneralRe: window service Pin
John Fisher22-Apr-05 8:00
John Fisher22-Apr-05 8:00 
GeneralIs it worth to download VS2005 Express Beta2 Pin
Anonymous22-Apr-05 5:12
Anonymous22-Apr-05 5:12 
GeneralRe: Is it worth to download VS2005 Express Beta2 Pin
Carl Mercier22-Apr-05 9:11
Carl Mercier22-Apr-05 9:11 
QuestionA question no one has asked ??? Pin
LongRange.Shooter22-Apr-05 5:08
LongRange.Shooter22-Apr-05 5:08 
AnswerRe: A question no one has asked ??? Pin
Dave Kreskowiak22-Apr-05 5:36
mveDave Kreskowiak22-Apr-05 5:36 

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.