Last active
February 27, 2018 13:12
-
-
Save Fhernd/78026265d9b9dc6a2e920fce296eed2f to your computer and use it in GitHub Desktop.
Guardar configuración de formularios de una aplicación en C#.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel; | |
using System.Windows.Forms; | |
using R706GuardarConfiguracion.Properties; | |
namespace R706GuardarConfiguracion | |
{ | |
public partial class Principal : Form | |
{ | |
public Principal() | |
{ | |
InitializeComponent(); | |
} | |
private void btnCambiarConfiguracion_Click(object sender, EventArgs e) | |
{ | |
Button btnPresionado = sender as Button; | |
if (btnPresionado != null) | |
{ | |
txtCampoTexto.BackColor = btnPresionado.BackColor; | |
Settings.Default.ColorTexto = txtCampoTexto.BackColor; | |
} | |
} | |
protected override void OnClosing(CancelEventArgs evt) | |
{ | |
base.OnClosing(evt); | |
Settings.Default.UbicacionVentana = this.Location; | |
Settings.Default.Save(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment