Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Help 

C# Opening a Resource File

Hello, I am getting the following error

Code
Argument 1: cannot convert from 'byte[]' to 'string[]'

and the code causing that error is

Code
Process.Start(Properties.Resources.telephone);

Any and all help to resolve this issue will be much appreciated
Properties.Resources.xxx is embedded resources you stored in your app.
-string, images, etc

the process.start cant start something that is not a process(application) ex: chrome, notepad.

here is an example:
Code
Process.Start("cmd.exe");
Process.Start("notepad.exe");
its basic.

better way:
Code
foreach(var p in Process.GetProcessesByName("chrome"))
{//do your logic}
foreach(var p in Process.GetProcesses)
{//do your logic}
and so on

to send data to console to console on diff app you can use Process.StartInfo and adding arguments(args) so the console that gonna run from the process call with receive string data in
Main(args)

Same logic to pass data from a winform app the start console app.

Also process class can use eventhandler to receive information on process closing.

Useful class when used correctly!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by GrootyAug 18, 2024 06:15 PM 1 201 Aug 18, 2024 06:15 PM
Last Post: Lookdadon
[.NET] by SIM-3602297Feb 19, 2020 09:48 PM 2 192 Feb 19, 2020 09:48 PM
Last Post: gigajew
[C] by knownasknownDec 8, 2018 12:59 PM 8 235 Dec 8, 2018 12:59 PM
Last Post: realsunjester