Click here to Skip to main content
15,909,324 members
Home / Discussions / C#
   

C#

 
AnswerRe: unhandeled exception occure when form is open , running from exe in c#. Pin
dan!sh 17-Jun-08 22:37
professional dan!sh 17-Jun-08 22:37 
GeneralRe: unhandeled exception occure when form is open , running from exe in c#. Pin
nomi17-Jun-08 22:53
nomi17-Jun-08 22:53 
QuestionRegarding ActiveX Pin
Member 477486817-Jun-08 21:30
Member 477486817-Jun-08 21:30 
QuestionDisplay image on Bitmap Pin
asma_panjabi17-Jun-08 20:28
asma_panjabi17-Jun-08 20:28 
AnswerRe: Display image on Bitmap Pin
N a v a n e e t h17-Jun-08 21:28
N a v a n e e t h17-Jun-08 21:28 
GeneralRe: Display image on Bitmap Pin
asma_panjabi17-Jun-08 21:32
asma_panjabi17-Jun-08 21:32 
AnswerRe: Display image on Bitmap Pin
asma_panjabi17-Jun-08 23:54
asma_panjabi17-Jun-08 23:54 
AnswerRe: Display image on Bitmap Pin
Anthony Mushrow18-Jun-08 0:13
professionalAnthony Mushrow18-Jun-08 0:13 
asma_panjabi wrote:

string filename = openFileDialog1.FileName.Substring(openFileDialog1.FileName.LastIndexOf("\\") + 1);
File.Copy(openFileDialog1.FileName, Application.StartupPath + "\\Temp\\" + filename, true);
string fname = Application.StartupPath + "\\Temp\\" + filename;


Whats all this part about? Why not just use the path that the OpenFileDialog gets?

Also, why do you have a Graphics grphs = CreateGraphics(); it doesn't get used in the code you posted and idealy you shouldn't be using it anyway. If you want to draw to your form you should do it in the OnPaint event.
I mean, that Graphics object could be the thing causing your problems, try moving it out of the try block and see what happens.

My current favourite word is: I'm starting to run out of fav. words!
-SK Genius

Game Programming articles start -here[^]-

GeneralRe: Display image on Bitmap Pin
asma_panjabi18-Jun-08 0:33
asma_panjabi18-Jun-08 0:33 
AnswerRe: Display image on Bitmap Pin
asma_panjabi18-Jun-08 3:32
asma_panjabi18-Jun-08 3:32 
QuestionIs it possible to change order of nodes in treeview? Pin
chakran17-Jun-08 19:34
chakran17-Jun-08 19:34 
AnswerRe: Is it possible to change order of nodes in treeview? Pin
Joe Woodbury17-Jun-08 19:47
professionalJoe Woodbury17-Jun-08 19:47 
AnswerRe: Is it possible to change order of nodes in treeview? Pin
Corinna John17-Jun-08 21:58
Corinna John17-Jun-08 21:58 
QuestionGood Day!! Pin
maRk_maGic17-Jun-08 19:22
maRk_maGic17-Jun-08 19:22 
AnswerRe: Good Day!! Pin
Rajesh R Subramanian17-Jun-08 19:31
professionalRajesh R Subramanian17-Jun-08 19:31 
AnswerRe: Good Day!! Pin
MarkB77717-Jun-08 20:32
MarkB77717-Jun-08 20:32 
AnswerRe: Good Day!! Pin
Ashfield17-Jun-08 21:09
Ashfield17-Jun-08 21:09 
AnswerGood Day, Wrong Forum, Bad Question! Pin
CPallini17-Jun-08 21:18
mveCPallini17-Jun-08 21:18 
AnswerRe: Good Day!! Pin
Paul Conrad20-Jun-08 11:08
professionalPaul Conrad20-Jun-08 11:08 
QuestionPermisions in windows vista Pin
arslanjatt17-Jun-08 18:53
arslanjatt17-Jun-08 18:53 
AnswerRe: Permisions in windows vista Pin
Travis D. Mathison17-Jun-08 21:46
Travis D. Mathison17-Jun-08 21:46 
AnswerRe: Permisions in windows vista Pin
John_Adams17-Jun-08 22:40
John_Adams17-Jun-08 22:40 
QuestionConvert this VB code to C# Pin
grewin17-Jun-08 17:02
grewin17-Jun-08 17:02 
AnswerRe: Convert this VB code to C# Pin
Christian Graus17-Jun-08 17:31
protectorChristian Graus17-Jun-08 17:31 
AnswerRe: Convert this VB code to C# Pin
Travis D. Mathison17-Jun-08 22:18
Travis D. Mathison17-Jun-08 22:18 

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.