Ascenseur au mauvais etage

gzitoun Messages postés 61 Date d'inscription lundi 18 juin 2007 Statut Membre Dernière intervention 10 décembre 2009 - 21 déc. 2007 à 10:20
gzitoun Messages postés 61 Date d'inscription lundi 18 juin 2007 Statut Membre Dernière intervention 10 décembre 2009 - 3 janv. 2008 à 09:06
Bonjour!

J ai un un petit souci d'ascenseur sur l'une de mes forms...

En effet, celui-ci est en bas du form au lieu d en haut comme  habituellement.

J ai essaye de rajouter this.AutoScrollPosition.Offset(0, 0); dans le load mais ca ne marche pas non plus (l ascenseur monte une fraction de seconde puis redescend).

Quelqu'un aurait il une idee?

Merci!

2 réponses

cs_Stephane33 Messages postés 630 Date d'inscription samedi 15 février 2003 Statut Modérateur Dernière intervention 9 octobre 2011 1
22 déc. 2007 à 11:17
Tu n'as pas un contrôle en bas de ta form qui aurait le focus par hasard ?

Le savoir n'est que le filtre de l'experience
0
gzitoun Messages postés 61 Date d'inscription lundi 18 juin 2007 Statut Membre Dernière intervention 10 décembre 2009
3 janv. 2008 à 09:06
Bonjour,

je n ai pas trouve de composant ayant le focus...

Voici le designer.cs (mes excuses pour la longueur de celui-ci ), si quelqu un a le temps et la gentillesse d y jeter un oeil:

namespace ABIOS
{
    partial class Ecran5Suite
    {
        /// <summary>
        /// Variable nécessaire au concepteur.
        /// </summary>
        private System.ComponentModel.IContainer components = null;


        /// <summary>
        /// Nettoyage des ressources utilisées.
        /// </summary>
        /// true si les ressources managées doivent être supprimées ; sinon, false.

        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }


        #region Code généré par le Concepteur Windows Form


        /// <summary>
        /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
        /// le contenu de cette méthode avec l'éditeur de code.
        /// </summary>
        private void InitializeComponent()
        {
            this.labelExtInt = new System.Windows.Forms.Label();
            this.labelTabInterRemplie = new System.Windows.Forms.Label();
            this.labelSession_typeContrat = new System.Windows.Forms.Label();
            this.labelLocalisation = new System.Windows.Forms.Label();
            this.comboBoxType_r = new System.Windows.Forms.ComboBox();
            this.label12 = new System.Windows.Forms.Label();
            this.label11 = new System.Windows.Forms.Label();
            this.labelClient = new System.Windows.Forms.Label();
            this.labelSession = new System.Windows.Forms.Label();
            this.textBoxNum_Lot_r = new System.Windows.Forms.TextBox();
            this.radioButtonReap = new System.Windows.Forms.RadioButton();
            this.labelId_appat_gen = new System.Windows.Forms.Label();
            this.textBoxConsA = new System.Windows.Forms.TextBox();
            this.comboBoxConsA = new System.Windows.Forms.ComboBox();
            this.label4 = new System.Windows.Forms.Label();
            this.radioButtonChg_mat = new System.Windows.Forms.RadioButton();
            this.radioButtonDevis_remis = new System.Windows.Forms.RadioButton();
            this.Precedent = new System.Windows.Forms.Button();
            this.button1 = new System.Windows.Forms.Button();
            this.label15 = new System.Windows.Forms.Label();
            this.label7 = new System.Windows.Forms.Label();
            this.mainMenu1 = new System.Windows.Forms.MainMenu();
            this.radioButtonAjout_appat = new System.Windows.Forms.RadioButton();
            this.textBoxNum_Lot_c = new System.Windows.Forms.TextBox();
            this.comboBoxType_c = new System.Windows.Forms.ComboBox();
            this.label13 = new System.Windows.Forms.Label();
            this.panel1 = new System.Windows.Forms.Panel();
            this.label14 = new System.Windows.Forms.Label();
            this.radioButtonTotal = new System.Windows.Forms.RadioButton();
            this.radioButtonFaible = new System.Windows.Forms.RadioButton();
            this.radioButtonAucune = new System.Windows.Forms.RadioButton();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
            //
            // labelExtInt
            //
            this.labelExtInt.Location = new System.Drawing.Point(202, 1);
            this.labelExtInt.Name = "labelExtInt";
            this.labelExtInt.Size = new System.Drawing.Size(21, 10);
            this.labelExtInt.Visible = false;
            //
            // labelTabInterRemplie
            //
            this.labelTabInterRemplie.Location = new System.Drawing.Point(122, 1);
            this.labelTabInterRemplie.Name = "labelTabInterRemplie";
            this.labelTabInterRemplie.Size = new System.Drawing.Size(13, 10);
            this.labelTabInterRemplie.Visible = false;
            //
            // labelSession_typeContrat
            //
            this.labelSession_typeContrat.Location = new System.Drawing.Point(35, 1);
            this.labelSession_typeContrat.Name = "labelSession_typeContrat";
            this.labelSession_typeContrat.Size = new System.Drawing.Size(13, 10);
            this.labelSession_typeContrat.Visible = false;
            //
            // labelLocalisation
            //
            this.labelLocalisation.Location = new System.Drawing.Point(152, 1);
            this.labelLocalisation.Name = "labelLocalisation";
            this.labelLocalisation.Size = new System.Drawing.Size(29, 10);
            this.labelLocalisation.Visible = false;
            //
            // comboBoxType_r
            //
            this.comboBoxType_r.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
            this.comboBoxType_r.Location = new System.Drawing.Point(81, 29);
            this.comboBoxType_r.Name = "comboBoxType_r";
            this.comboBoxType_r.Size = new System.Drawing.Size(100, 22);
            this.comboBoxType_r.TabIndex = 163;
            //
            // label12
            //
            this.label12.Location = new System.Drawing.Point(34, 54);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(100, 20);
            this.label12.Text = "n°lot:";
            //
            // label11
            //
            this.label11.Location = new System.Drawing.Point(34, 29);
            this.label11.Name = "label11";
            this.label11.Size = new System.Drawing.Size(41, 20);
            this.label11.Text = "Type:";
            //
            // labelClient
            //
            this.labelClient.Location = new System.Drawing.Point(75, 1);
            this.labelClient.Name = "labelClient";
            this.labelClient.Size = new System.Drawing.Size(19, 10);
            this.labelClient.Visible = false;
            //
            // labelSession
            //
            this.labelSession.Location = new System.Drawing.Point(1, 1);
            this.labelSession.Name = "labelSession";
            this.labelSession.Size = new System.Drawing.Size(25, 10);
            this.labelSession.Visible = false;
            //
            // textBoxNum_Lot_r
            //
            this.textBoxNum_Lot_r.Location = new System.Drawing.Point(81, 57);
            this.textBoxNum_Lot_r.Name = "textBoxNum_Lot_r";
            this.textBoxNum_Lot_r.Size = new System.Drawing.Size(100, 21);
            this.textBoxNum_Lot_r.TabIndex = 164;
            //
            // radioButtonReap
            //
            this.radioButtonReap.Location = new System.Drawing.Point(16, 6);
            this.radioButtonReap.Name = "radioButtonReap";
            this.radioButtonReap.Size = new System.Drawing.Size(100, 20);
            this.radioButtonReap.TabIndex = 162;
            this.radioButtonReap.Text = "Réappâtage";
            //
            // labelId_appat_gen
            //
            this.labelId_appat_gen.Location = new System.Drawing.Point(54, 1);
            this.labelId_appat_gen.Name = "labelId_appat_gen";
            this.labelId_appat_gen.Size = new System.Drawing.Size(11, 10);
            this.labelId_appat_gen.Visible = false;
            //
            // textBoxConsA
            //
            this.textBoxConsA.Location = new System.Drawing.Point(62, 382);
            this.textBoxConsA.Name = "textBoxConsA";
            this.textBoxConsA.Size = new System.Drawing.Size(149, 21);
            this.textBoxConsA.TabIndex = 243;
            //
            // comboBoxConsA
            //
            this.comboBoxConsA.Location = new System.Drawing.Point(62, 354);
            this.comboBoxConsA.Name = "comboBoxConsA";
            this.comboBoxConsA.Size = new System.Drawing.Size(149, 22);
            this.comboBoxConsA.TabIndex = 242;
            //
            // label4
            //
            this.label4.Location = new System.Drawing.Point(6, 354);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(50, 20);
            this.label4.Text = "Conseil:";
            //
            // radioButtonChg_mat
            //
            this.radioButtonChg_mat.Location = new System.Drawing.Point(16, 84);
            this.radioButtonChg_mat.Name = "radioButtonChg_mat";
            this.radioButtonChg_mat.Size = new System.Drawing.Size(188, 28);
            this.radioButtonChg_mat.TabIndex = 165;
            this.radioButtonChg_mat.Text = "Changement de matières act.";
            //
            // radioButtonDevis_remis
            //
            this.radioButtonDevis_remis.Location = new System.Drawing.Point(16, 199);
            this.radioButtonDevis_remis.Name = "radioButtonDevis_remis";
            this.radioButtonDevis_remis.Size = new System.Drawing.Size(188, 22);
            this.radioButtonDevis_remis.TabIndex = 169;
            this.radioButtonDevis_remis.Text = "Devis remis pour ajout appât\r\n";
            //
            // Precedent
            //
            this.Precedent.Location = new System.Drawing.Point(94, 454);
            this.Precedent.Name = "Precedent";
            this.Precedent.Size = new System.Drawing.Size(72, 20);
            this.Precedent.TabIndex = 238;
            this.Precedent.Text = "Précédent";
            this.Precedent.Click += new System.EventHandler(this.Precedent_Click);
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(136, 419);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(39, 20);
            this.button1.TabIndex = 237;
            this.button1.Text = "OK";
            this.button1.Click += new System.EventHandler(this.button1_Click);
            //
            // label15
            //
            this.label15.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
            this.label15.Location = new System.Drawing.Point(6, 419);
            this.label15.Name = "label15";
            this.label15.Size = new System.Drawing.Size(124, 20);
            this.label15.Text = "Fin des remarques:\r\n";
            //
            // label7
            //
            this.label7.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
            this.label7.Location = new System.Drawing.Point(-1, 17);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(105, 20);
            this.label7.Text = "Consommation:";
            //
            // radioButtonAjout_appat
            //
            this.radioButtonAjout_appat.Location = new System.Drawing.Point(16, 173);
            this.radioButtonAjout_appat.Name = "radioButtonAjout_appat";
            this.radioButtonAjout_appat.Size = new System.Drawing.Size(100, 20);
            this.radioButtonAjout_appat.TabIndex = 168;
            this.radioButtonAjout_appat.Text = "Ajout appât";
            //
            // textBoxNum_Lot_c
            //
            this.textBoxNum_Lot_c.Location = new System.Drawing.Point(81, 146);
            this.textBoxNum_Lot_c.Name = "textBoxNum_Lot_c";
            this.textBoxNum_Lot_c.Size = new System.Drawing.Size(100, 21);
            this.textBoxNum_Lot_c.TabIndex = 167;
            //
            // comboBoxType_c
            //
            this.comboBoxType_c.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
            this.comboBoxType_c.Location = new System.Drawing.Point(81, 118);
            this.comboBoxType_c.Name = "comboBoxType_c";
            this.comboBoxType_c.Size = new System.Drawing.Size(100, 22);
            this.comboBoxType_c.TabIndex = 166;
            //
            // label13
            //
            this.label13.Location = new System.Drawing.Point(34, 146);
            this.label13.Name = "label13";
            this.label13.Size = new System.Drawing.Size(41, 20);
            this.label13.Text = "n°lot:";
            //
            // panel1
            //
            this.panel1.Controls.Add(this.radioButtonDevis_remis);
            this.panel1.Controls.Add(this.radioButtonAjout_appat);
            this.panel1.Controls.Add(this.textBoxNum_Lot_c);
            this.panel1.Controls.Add(this.comboBoxType_c);
            this.panel1.Controls.Add(this.label13);
            this.panel1.Controls.Add(this.label14);
            this.panel1.Controls.Add(this.radioButtonChg_mat);
            this.panel1.Controls.Add(this.textBoxNum_Lot_r);
            this.panel1.Controls.Add(this.comboBoxType_r);
            this.panel1.Controls.Add(this.label12);
            this.panel1.Controls.Add(this.label11);
            this.panel1.Controls.Add(this.radioButtonReap);
            this.panel1.Enabled = false;
            this.panel1.Location = new System.Drawing.Point(16, 122);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(207, 226);
            //
            // label14
            //
            this.label14.Location = new System.Drawing.Point(34, 118);
            this.label14.Name = "label14";
            this.label14.Size = new System.Drawing.Size(41, 20);
            this.label14.Text = "Type:";
            //
            // radioButtonTotal
            //
            this.radioButtonTotal.Location = new System.Drawing.Point(16, 96);
            this.radioButtonTotal.Name = "radioButtonTotal";
            this.radioButtonTotal.Size = new System.Drawing.Size(111, 20);
            this.radioButtonTotal.TabIndex = 241;
            this.radioButtonTotal.Text = "Totale (rouge)";
            this.radioButtonTotal.Click += new System.EventHandler(this.radioButtonTotal_Click);
            //
            // radioButtonFaible
            //
            this.radioButtonFaible.Location = new System.Drawing.Point(16, 72);
            this.radioButtonFaible.Name = "radioButtonFaible";
            this.radioButtonFaible.Size = new System.Drawing.Size(111, 20);
            this.radioButtonFaible.TabIndex = 240;
            this.radioButtonFaible.Text = "Faible (orange)";
            this.radioButtonFaible.Click += new System.EventHandler(this.radioButtonFaible_Click);
            //
            // radioButtonAucune
            //
            this.radioButtonAucune.Location = new System.Drawing.Point(16, 46);
            this.radioButtonAucune.Name = "radioButtonAucune";
            this.radioButtonAucune.Size = new System.Drawing.Size(100, 20);
            this.radioButtonAucune.TabIndex = 239;
            this.radioButtonAucune.Text = "Aucune (vert)";
            this.radioButtonAucune.Click += new System.EventHandler(this.radioButtonAucune_Click);
            //
            // Ecran5Suite
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.AutoScroll = true;
            this.AutoValidate = System.Windows.Forms.AutoValidate.EnablePreventFocusChange;
            this.ClientSize = new System.Drawing.Size(240, 268);
            this.Controls.Add(this.labelExtInt);
            this.Controls.Add(this.labelTabInterRemplie);
            this.Controls.Add(this.labelSession_typeContrat);
            this.Controls.Add(this.labelLocalisation);
            this.Controls.Add(this.labelClient);
            this.Controls.Add(this.labelSession);
            this.Controls.Add(this.labelId_appat_gen);
            this.Controls.Add(this.textBoxConsA);
            this.Controls.Add(this.comboBoxConsA);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.Precedent);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.label15);
            this.Controls.Add(this.label7);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.radioButtonTotal);
            this.Controls.Add(this.radioButtonFaible);
            this.Controls.Add(this.radioButtonAucune);
            this.KeyPreview = true;
            this.Menu = this.mainMenu1;
            this.Name = "Ecran5Suite";
            this.Text = "PROPRIETES (SUITE)";
            this.Load += new System.EventHandler(this.Ecran5Suite_Load);
            this.panel1.ResumeLayout(false);
            this.ResumeLayout(false);


        }


        #endregion


        public System.Windows.Forms.Label labelExtInt;
        public System.Windows.Forms.Label labelTabInterRemplie;
        public System.Windows.Forms.Label labelSession_typeContrat;
        public System.Windows.Forms.Label labelLocalisation;
        private System.Windows.Forms.ComboBox comboBoxType_r;
        private System.Windows.Forms.Label label12;
        private System.Windows.Forms.Label label11;
        public System.Windows.Forms.Label labelClient;
        public System.Windows.Forms.Label labelSession;
        private System.Windows.Forms.TextBox textBoxNum_Lot_r;
        private System.Windows.Forms.RadioButton radioButtonReap;
        public System.Windows.Forms.Label labelId_appat_gen;
        private System.Windows.Forms.TextBox textBoxConsA;
        private System.Windows.Forms.ComboBox comboBoxConsA;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.RadioButton radioButtonChg_mat;
        private System.Windows.Forms.RadioButton radioButtonDevis_remis;
        private System.Windows.Forms.Button Precedent;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Label label15;
        private System.Windows.Forms.Label label7;
        private System.Windows.Forms.MainMenu mainMenu1;
        private System.Windows.Forms.RadioButton radioButtonAjout_appat;
        private System.Windows.Forms.TextBox textBoxNum_Lot_c;
        private System.Windows.Forms.ComboBox comboBoxType_c;
        private System.Windows.Forms.Label label13;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.Label label14;
        private System.Windows.Forms.RadioButton radioButtonTotal;
        private System.Windows.Forms.RadioButton radioButtonFaible;
        private System.Windows.Forms.RadioButton radioButtonAucune;


    }
}

Merci beaucoup
0
Rejoignez-nous