[Windows] kak inscinirovat' otkritie fayla ...

9173306234

defaultnim prilogeniem dlya dannogo tipa failov. dopustim notepad dlya *.txt faylov, Visul Studio dlya *.cs i t.d.

9173306234

lezt' kagdiy raz v reestr dlya opredeleniya commandnoy stroki dlya kagdogo rashireniya - ne true

Elina74

Если из командной строки, то
start имяфайла
Если надо запрогать, то ShellExecute или CreateProcess, первый вариант проще.

9173306234

spasibo. a na .net est' sposob ?

Elina74

Я на дотнет ничего не писал, но может быть это то:
Process marshal by reference, disposable
System.Diagnostics (system.dll) class
To launch a process without customizing its StartInfo, simply call the one-string or two-string argument form of the static Start( ) method. The first string argument is the name of the program, batch file, or document to start, and the optional second argument contains any command-line arguments.
---
public static Process Start(string fileName);

9173306234

public static Process Start(string fileName);
spasibo! ono i est'
Оставить комментарий
Имя или ник:
Комментарий: