Click here to Skip to main content
16,007,163 members
Home / Discussions / C#
   

C#

 
GeneralSending contents of a text file via emails Pin
Un-Connected2-Mar-05 4:26
Un-Connected2-Mar-05 4:26 
GeneralRe: Sending contents of a text file via emails Pin
Esmo20002-Mar-05 5:47
Esmo20002-Mar-05 5:47 
QuestionHow to print form? Pin
redmat2-Mar-05 3:28
redmat2-Mar-05 3:28 
AnswerRe: How to print form? Pin
Judah Gabriel Himango2-Mar-05 4:10
sponsorJudah Gabriel Himango2-Mar-05 4:10 
GeneralRe: How to print form? Pin
redmat2-Mar-05 4:24
redmat2-Mar-05 4:24 
GeneralRe: How to print form? Pin
redmat3-Mar-05 2:41
redmat3-Mar-05 2:41 
GeneralProcess.Start("mailto:abc@yahoo.com") Pin
vchalla2-Mar-05 3:14
vchalla2-Mar-05 3:14 
GeneralRe: Process.Start("mailto:abc@yahoo.com") Pin
Judah Gabriel Himango2-Mar-05 4:04
sponsorJudah Gabriel Himango2-Mar-05 4:04 
Please see this recent MSDN article, in particular, scroll down 3/4ths of the way down the page and you'll see the exact problem you're describing:

Process::Start("http://www.microsoft.com");

Alas, if you try this at home, the same thing happens. The call throws a Win32Exception which yields an even more cryptic code in its NativeErrorCode property: ERROR_SXS_KEY_NOT_FOUND. The description for this error is "The requested lookup key was not found in any active activation context." Huh?

If you poke around the documentation for Process and read all the fine print, you'll discover that Process uses something called StartInfo in order to tell it how to start the process. One of the properties in StartInfo is UseShellExecute. By default, UseShellExecute equals True, which tells the Framework to launch the process using the shell, that is, ShellExecuteEx. Okay, so try setting it to False. But then, as the fine print explains, you can only start EXEs, not file names or URLs.


The article mentions some other options, such as using rundll32, to launch your URL.

Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Hallelujah! It's Ken Jennings!
Judah Himango


GeneralAdding custom buttons to MessageBox Pin
GazzaJ2-Mar-05 3:09
GazzaJ2-Mar-05 3:09 
GeneralRe: Adding custom buttons to MessageBox Pin
Judah Gabriel Himango2-Mar-05 4:16
sponsorJudah Gabriel Himango2-Mar-05 4:16 
GeneralRe: Adding custom buttons to MessageBox Pin
Dave Kreskowiak2-Mar-05 8:20
mveDave Kreskowiak2-Mar-05 8:20 
Generalan install wizard application Pin
mcgahanfl2-Mar-05 2:52
mcgahanfl2-Mar-05 2:52 
Generaltarget _blank Pin
ABBASI_RA2-Mar-05 2:37
ABBASI_RA2-Mar-05 2:37 
GeneralRe: target _blank Pin
Judah Gabriel Himango2-Mar-05 4:05
sponsorJudah Gabriel Himango2-Mar-05 4:05 
GeneralRe: target _blank Pin
ABBASI_RA2-Mar-05 5:18
ABBASI_RA2-Mar-05 5:18 
GeneralFusing two pixel Pin
Anonymous2-Mar-05 0:56
Anonymous2-Mar-05 0:56 
Generaladd a button on Save As dialogue tool bar Pin
MihaiChioariu2-Mar-05 0:41
MihaiChioariu2-Mar-05 0:41 
GeneralRe: add a button on Save As dialogue tool bar Pin
Andy Moore2-Mar-05 2:42
Andy Moore2-Mar-05 2:42 
Generaldebugging Exe Pin
montu33772-Mar-05 0:06
montu33772-Mar-05 0:06 
GeneralRe: debugging Exe Pin
Colin Angus Mackay2-Mar-05 0:22
Colin Angus Mackay2-Mar-05 0:22 
GeneralRe: debugging Exe Pin
leppie2-Mar-05 3:39
leppie2-Mar-05 3:39 
GeneralReboot a Remote Machine in .net Pin
realmontanakid1-Mar-05 23:53
realmontanakid1-Mar-05 23:53 
Generalchange webservice path Pin
WDI1-Mar-05 23:15
WDI1-Mar-05 23:15 
GeneralRe: change webservice path Pin
Kodanda Pani2-Mar-05 0:07
Kodanda Pani2-Mar-05 0:07 
GeneralImageStream from Resource... Pin
Norman-Timo1-Mar-05 22:13
Norman-Timo1-Mar-05 22:13 

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.