locked
WPF How to execute a * .exe with a button in a main window, whose path is in a TextBox of a second window, please help me. RRS feed

  • Question

  • Hi, I'm still a newbie. I have my project, in which I have 2 windows, a Main Window (Launcher.xaml) and another Second Window (Configuration.xaml). In the Main Window I have 2 buttons; a button that executes an * .exe (start game), whose path or address is in a TextBox in the second window. And the second Button calls the second window.

    In the second window I have a TextBox and 2 Buttons, One is the one that calls the "OpenFileDialog" that when clicked, sends me a search dialog for the * .exe file (game.exe) and when I choose that program to execute, this write the address or path in the TextBox something like this; "D: \ folder \ game.exe". The following button saves the direction or route of the game to be able to execute it in the main window.
    Well my question is how I can make the button of the main window (Start Game) execute the game whose address or path is in the TextBox of the second window, I would be very grateful if you could help me with it, please. Or some other alternative, I am already very grateful for it and its help.

    I attach an image of my project:

    https://i.pinimg.com/originals/fe/73/71/fe7371cc7ef94f05d91d606118974689.jpg

    I also attach my project file:

    https://drive.google.com/file/d/1Yknpp5eL2qMbyHaHOSR_Cmmfho4pK7aB/view?usp=sharing

    Sorry for the inconvenience I really need your help. Thank you so much...
    • Moved by CoolDadTx Monday, August 17, 2020 2:04 PM WPF related
    • Edited by JackPelon Tuesday, August 18, 2020 6:25 AM
    Monday, August 17, 2020 3:48 AM

All replies