Hi,
I am a programmer in the first year in EPITA, an IT school in France, so excuse me if I express myself badly. I will try to be.
I have got some troubles with my programming code, all is in C#.
Well, Here are the steps for creating my project :
Create a new C# WinForm project (Name : SETUP)
Setting the new name of my WinForm : WinFormInitialization
Double Click on all controls to create and define all events of them in the code.
Open an another C# WinForm project - Select all controls of my windows and copy
Paste in my new project (SETUP -> in the WinForm WinFormInitialization).
Close my another project
I Custom WinFormInitialization adding an icon and setting the text of the windows.
0 errors, 0 advertising, 0 messages.
Launch of the windowsForm : All it's okay, all respond BUT program doesn't want to update my first code lines.
This progam has worked as well, without problems. All lines was read. But in this project no.
This is the begining of the program in : Form1.cs
And idea ? Where is the problem ? I am sure, since I did a copy and paste that is the reason that doesn't work. But where in the lines code I have to rectify it ?
Thanks
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; /// Okay, that is the using for the system /// namespace SETUP { public partial class WinFormInitialization : Form { /// <summary> //////////////////////////////////////////////////////////////////////////////////////// ////// Since here, the code is not executed, the program doesn't read those lines //////
////// I try to put a { MessageBox.Show("ok") } but when normally I write lines codes, if I do MessageBox. , I have got a list which is held, but nothing //////////////////////////////////////////////////////////////////////////////////////// int Language = 0; int ScreenWidth = Screen.PrimaryScreen.Bounds.Width; int ScreenHeight = Screen.PrimaryScreen.Bounds.Height; int SoundMusic = 50; int SoundSpecialEffects = 50; bool RegisterThoseOptionsInTheComputer = true; /////////////////////////////////////////////////////////////////////////////////////// ////// Until here, the code is not executed, the program doesn't read those lines ///// /////////////////////////////////////////////////////////////////////////////////////// /// <summary> public WinFormInitialization() { InitializeComponent(); /// <summary> //////////////////////////////////////////////////////////////////////// ////// Here, lines are executed and work normally ////////////////////// //////////////////////////////////////////////////////////////////////// ComboBoxLanguage.SelectedIndex = Language; ScreenWidth = PreviewScreenGame.BackgroundImage.Width; ScreenHeight = PreviewScreenGame.BackgroundImage.Height; SpinNumericButtonsWidth.Value = ScreenWidth * 10; SpinNumericButtonsHeight.Value = ScreenHeight * 10; RefreshVolumeSoundMusic(TrackBarMusic.Value); RefreshVolumeSoundSpecialEffects(TrackBarSpecialEffects.Value); PrintPreviewOfThePreviewBackScreenUser(); //////////////////////////////////////////////////////////////////////// ////// Fin de l'inititialisation des variables du WindowsForm ////////// //////////////////////////////////////////////////////////////////////// /// <summary> }
/// And go on for all the next of the program with all private void and functions and events functions
}
}