PC Review


Reply
Thread Tools Rate Thread

call external program

 
 
=?Utf-8?B?ZHJhZ29vbg==?=
Guest
Posts: n/a
 
      15th Mar 2005
how can i start this program from my form ?

rundll32.exe c:\windows\system32\shimgvw.dll,ImageView_Fullscreen image.tif ?

this is Windows Pictures and Fax Viewer from XP and I want to call it from
my app to displat an image (I need it, because it can handle multiple pages
tiffs)

i also have made use of a var sysFolder =
Environment.GetFolderPath(Environment.SpecialFolder.System); to replace
'c:\windows\system32'

i can't even start the WPFV empty (w/o an image load into it)
 
Reply With Quote
 
 
 
 
=?Utf-8?B?ZHJhZ29vbg==?=
Guest
Posts: n/a
 
      15th Mar 2005
here is a piece of code that normally would work

string curpath = System.IO.Directory.GetCurrentDirectory();
string sysFolder =
Environment.GetFolderPath(Environment.SpecialFolder.System);
System.IO.Directory.SetCurrentDirectory(sysFolder);
System.Diagnostics.Process.Start("rundll32.exe " + sysFolder
+"\\shimgvw.dll,ImageView_Fullscreen c:\\modi\\starlac.tif");
System.IO.Directory.SetCurrentDirectory(curpath);

i'm changing to the system directory before executing the command and still
nothing hapens

"dragoon" wrote:

> how can i start this program from my form ?
>
> rundll32.exe c:\windows\system32\shimgvw.dll,ImageView_Fullscreen image.tif ?
>
> this is Windows Pictures and Fax Viewer from XP and I want to call it from
> my app to displat an image (I need it, because it can handle multiple pages
> tiffs)
>
> i also have made use of a var sysFolder =
> Environment.GetFolderPath(Environment.SpecialFolder.System); to replace
> 'c:\windows\system32'
>
> i can't even start the WPFV empty (w/o an image load into it)

 
Reply With Quote
 
=?UTF-8?B?TWFyY2luIEdyesSZYnNraQ==?=
Guest
Posts: n/a
 
      15th Mar 2005
Hi,

Did you try to use:

public static Process Start(
string fileName,
string arguments
);

fileName="rundll32.exe";
arguments=sysFolder + "\\shimgvw.dll,ImageView_Fullscreen
c:\\modi\\starlac.tif";

HTH
Marcin

> here is a piece of code that normally would work
>
> string curpath = System.IO.Directory.GetCurrentDirectory();
> string sysFolder =
> Environment.GetFolderPath(Environment.SpecialFolder.System);
> System.IO.Directory.SetCurrentDirectory(sysFolder);
> System.Diagnostics.Process.Start("rundll32.exe " + sysFolder
> +"\\shimgvw.dll,ImageView_Fullscreen c:\\modi\\starlac.tif");
> System.IO.Directory.SetCurrentDirectory(curpath);
>
> i'm changing to the system directory before executing the command and still
> nothing hapens
>
> "dragoon" wrote:
>
>
>>how can i start this program from my form ?
>>
>>rundll32.exe c:\windows\system32\shimgvw.dll,ImageView_Fullscreen image.tif ?
>>
>>this is Windows Pictures and Fax Viewer from XP and I want to call it from
>>my app to displat an image (I need it, because it can handle multiple pages
>>tiffs)
>>
>>i also have made use of a var sysFolder =
>>Environment.GetFolderPath(Environment.SpecialFolder.System); to replace
>>'c:\windows\system32'
>>
>>i can't even start the WPFV empty (w/o an image load into it)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call external objects from external program Marco Microsoft Access Form Coding 0 10th Mar 2009 02:06 PM
Call external program in Excel Macro =?Utf-8?B?SXZhbg==?= Microsoft Excel Programming 3 23rd Jan 2006 10:56 AM
Smart Device Application Call External Program (Shell) Jason Gyetko Microsoft Dot NET 0 1st Jun 2005 09:24 PM
Unable to call external program/dll pipo Microsoft Excel Programming 1 30th May 2005 08:11 AM
Call External Program Tim Sorenson Microsoft VB .NET 3 21st Apr 2004 04:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:02 PM.