-1

I have a problem, I already have webbrowser in c# app, I want to send url from another app, and open my c# app and url what I sent from another application.

Any ideas, tutorials, anything. Thanks

theduck
  • 2,589
  • 13
  • 17
  • 23
Yoe
  • 7
  • 1
  • 5

3 Answers3

1

So based on what I understand from your question, you want to pass URL by app1 and open app2 with that url in app2(webbrowser control).

You can use Commandline Arguments to pass data between process,

Refer this stack overflow link command line arguments to winform applications

JDev
  • 78
  • 5
  • I would like to send a url from SAP, and then using my Application open url from SAP. – Yoe Nov 29 '19 at 16:24
1

You could use Process.Start to start the process:

System.Diagnostics.Process.Start("path/to/browser.exe", "https://sampleurl.org");

And in your application, depending if it is wpf, winforms or something else read the arg (there are plenty of questions how to do it on stackoverflow)

lorenzw
  • 366
  • 1
  • 10
  • Thanks, I did not say that another application is net application – Yoe Nov 29 '19 at 21:27
  • I want to send url from SAP System. – Yoe Nov 29 '19 at 21:28
  • Im sorry, i am not fit in sap/abap. If you can invoka a cmd command like: "path/to/exe browserurl" you could still access it with args in Main or e.Args in your startup event. – lorenzw Nov 29 '19 at 22:02
0

You could use Process.Start to start the process:

Process.Start("path/to/browser.exe", "https://sampleurl.org");

And in your c# program access it in the main

lorenzw
  • 366
  • 1
  • 10