Hello Stack Overflow community,
I have taken up the project of making an installer/launcher for a game I am working on, and I have currently run into an issue, I want the installer to open in the center of the screen resolution, with the base UI, which looks like:
The Label in the center named "MainText" is preconfigured to say "Configuring", there is also a hidden label in the corner named "label1" for debugging purposes.
The code I currently have inside of the MainForm.cs so far is below, the "programpath" refers to current directory in which the application is inside of.
public MainForm()
{
//Open Window
InitializeComponent();
//placeholder song
System.Media.SoundPlayer player = new System.Media.SoundPlayer(programpath+"\\GTA 4 Loading Screen Normalized No intro.wav");
player.PlayLooping();
//newLaunch();
}
void newLaunch(){
File.Create(programpath+"\\FirstLaunch.lic");
MainText.Visible=true;
MainText.Text="Configuring Machine....\nInstalling DirectX";
Process.Start(programpath+"\\dxwebsetup.exe");
label1.Text=programpath+"\\dxwebsetup.exe";
}
However, if I uncomment "newLaunch()", the dxwebsetup application opens, then the actual UI opens with the MainText stating "Configuring Machine....Installing DirectX", and label1 saying the location of the installer.
How do I make the UI for the application itself appear then start running the code after....similar to an actual installer, however still being completely autonomous, and installing everything on it's own.