//Controles a cargarse en la toolbar private void cargarToolBarButtons() { //Creacion del boton para guardar la informacion del paciente Button btnGuardarPaciente = new Button() { BackColor = System.Drawing.Color.WhiteSmoke, Cursor = System.Windows.Forms.Cursors.Hand, FlatAppearance = { BorderSize = 0, CheckedBackColor = System.Drawing.SystemColors.ControlLight, MouseDownBackColor = System.Drawing.SystemColors.ControlLight, MouseOverBackColor = System.Drawing.Color.White }, Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))), Location = new System.Drawing.Point(203, 3), Size = new System.Drawing.Size(80, 24), Text = "Guardar", TextAlign = System.Drawing.ContentAlignment.MiddleCenter, UseVisualStyleBackColor = false, Name = "btnGuardarPaciente" }; //Creacion del boton Cancelar Button btnCancelarPaciente = new Button() { BackColor = System.Drawing.Color.WhiteSmoke, Cursor = System.Windows.Forms.Cursors.Hand, FlatAppearance = { BorderSize = 0, CheckedBackColor = System.Drawing.SystemColors.ControlLight, MouseDownBackColor = System.Drawing.SystemColors.ControlLight, MouseOverBackColor = System.Drawing.Color.White }, Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))), Location = new System.Drawing.Point(203, 3), Size = new System.Drawing.Size(80, 24), Text = "Cancelar", TextAlign = System.Drawing.ContentAlignment.MiddleCenter, UseVisualStyleBackColor = false, Name = "btnCancelarPaciente" }; //Eventos de los botones Guardar y Cancelar btnGuardarPaciente.Click += new System.EventHandler(this.GuardarPaciente_Click); btnCancelarPaciente.Click += new System.EventHandler(this.CancelarPaciente_Click); //Se agregan los controles a un arreglo para luego agregarlos a la toolbar Control[] controls = new Control[] { btnGuardarPaciente, btnCancelarPaciente }; frmMain.AddControlsTopbarOptions(controls); }