Click here to Skip to main content
16,006,378 members
Home / Discussions / C#
   

C#

 
GeneralA dash in an sql query Pin
Yevgeny Efter28-Mar-08 23:36
Yevgeny Efter28-Mar-08 23:36 
GeneralRe: A dash in an sql query Pin
Gareth H29-Mar-08 0:37
Gareth H29-Mar-08 0:37 
GeneralRe: A dash in an sql query Pin
Colin Angus Mackay29-Mar-08 1:00
Colin Angus Mackay29-Mar-08 1:00 
GeneralRe: A dash in an sql query Pin
Yevgeny Efter29-Mar-08 1:23
Yevgeny Efter29-Mar-08 1:23 
GeneralSave file Dialog Pin
D i x y28-Mar-08 22:22
D i x y28-Mar-08 22:22 
GeneralRe: Save file Dialog Pin
Luc Pattyn28-Mar-08 23:17
sitebuilderLuc Pattyn28-Mar-08 23:17 
General[Message Deleted] Pin
D i x y28-Mar-08 23:20
D i x y28-Mar-08 23:20 
GeneralRe: Save file Dialog Pin
Luc Pattyn28-Mar-08 23:34
sitebuilderLuc Pattyn28-Mar-08 23:34 
Hi,

you failed to state what the problem is.

I do have some suggestions for you:

1. ShowDialog() returns a DialogResult, you should check it, and do nothing
when the user cancels.

2. SaveFileDialog class has a public Dispose method, you MUST call it when done;
one way of doing it correctly is with a using statement.

3. OpenFile() returns a stream, which you don't really need. Better use FileName
instead.

4.
Typically file extensions use lower-case, so ".Jpeg" is a bit peculiar. Also
a lot of JPEG files use ".jpg"

5.
You always save in JPEG format, but also accept ".bmp" and ".gif" extensions;
it does not look like a good idea to store a JPEG format in those.

6.
when folder is a string, folder.ToString() does not make sense, just use folder.

7.
Your folder strategy is weird: you come up with a folder value for each image;
if your program runs fast enough two or more images will end up in the same
folder, but when your PC is loaded somehow, they all may use different folders...
You may want to read my timers article.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


GeneralRe: Save file Dialog Pin
D i x y28-Mar-08 23:45
D i x y28-Mar-08 23:45 
GeneralRe: Save file Dialog Pin
Luc Pattyn29-Mar-08 0:21
sitebuilderLuc Pattyn29-Mar-08 0:21 
GeneralRe: Save file Dialog Pin
D i x y29-Mar-08 0:26
D i x y29-Mar-08 0:26 
GeneralRe: Save file Dialog Pin
pmarfleet28-Mar-08 23:17
pmarfleet28-Mar-08 23:17 
Generalprinting selected pages... Pin
Xmen Real 28-Mar-08 21:31
professional Xmen Real 28-Mar-08 21:31 
GeneralRe: printing selected pages... Pin
Luc Pattyn28-Mar-08 23:21
sitebuilderLuc Pattyn28-Mar-08 23:21 
GeneralRe: printing selected pages... Pin
Xmen Real 29-Mar-08 2:14
professional Xmen Real 29-Mar-08 2:14 
Generalwindows app query Pin
manish.singhal28-Mar-08 20:28
manish.singhal28-Mar-08 20:28 
GeneralRe: windows app query Pin
Abhijit Jana28-Mar-08 20:36
professionalAbhijit Jana28-Mar-08 20:36 
GeneralRe: windows app query Pin
manish.singhal28-Mar-08 23:09
manish.singhal28-Mar-08 23:09 
GeneralArray null on Cloning Pin
N a v a n e e t h28-Mar-08 20:03
N a v a n e e t h28-Mar-08 20:03 
GeneralRe: Array null on Cloning Pin
Xmen Real 28-Mar-08 21:12
professional Xmen Real 28-Mar-08 21:12 
GeneralRe: Array null on Cloning Pin
N a v a n e e t h29-Mar-08 2:16
N a v a n e e t h29-Mar-08 2:16 
GeneralRe: Array null on Cloning Pin
Xmen Real 29-Mar-08 2:20
professional Xmen Real 29-Mar-08 2:20 
GeneralRe: Array null on Cloning Pin
Guffa29-Mar-08 5:02
Guffa29-Mar-08 5:02 
GeneralRe: Array null on Cloning Pin
N a v a n e e t h30-Mar-08 19:21
N a v a n e e t h30-Mar-08 19:21 
QuestionHelp regarding CSS Pin
mrcsn28-Mar-08 18:56
mrcsn28-Mar-08 18:56 

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.