6 1 SplashenC#

También podría gustarte

Está en la página 1de 6

Elementos a Definir : Splash, pictureBox, Label, ProgressBar, Timer, MenuStrip, MessageBox,

diferencia entre this.close();Application.Exit();

Elementos a usar: 1 pictureBox, 3 Label, 1 ProgressBar, 1 Timer, 2 Forms

Form del Splash

Splash en C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace splash
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

int N=0;
private void Form1_Load(object sender, EventArgs e)
{
//Iniciar Timer
timer1.Start();
}

private void timer1_Tick(object sender, EventArgs e)


{
//METODO TICK DEL TIMER A 100 MILISEGUNDOS = 0.2 SEGUNDOS

N = N + 1; // CONTADOR
label3.Text = N.ToString();
progressBar1.Value = N; // VALOR DEL PROGRESSBAR

if (N == 100) // EL VALOR MAXIMO DEL PROGRESSBAR ES DE 100


{
timer1.Stop(); // DETIENE EL TIMER PARA QUE SE DETENGA EL
CONTADOR
this.Hide();
//LLAMA AL FORM2
FrmMenu frm2 = new FrmMenu ();
frm2.ShowDialog();
}

}
El codigo de cada opcion es
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WAppSplash
{
public partial class FrmPRINCIPAL : Form
{
public FrmPRINCIPAL()
{
InitializeComponent();
}

private void salirToolStripMenuItem_Click(object sender, EventArgs


e)
{

if (MessageBox.Show("Esta seguro desea salir?", "Aviso",


MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{
Application.Exit();
}
}

private void acercaDeToolStripMenuItem_Click(object sender,


EventArgs e)
{
FrmACERCADE frm3 = new FrmACERCADE();
frm3.ShowDialog();
}

private void estudiantesToolStripMenuItem1_Click(object sender,


EventArgs e)
{
FrmEstudiante form5 = new FrmEstudiante();
form5.ShowDialog();
}
}

}
Form estudiantes

Codigo form estudiantes

Conectar menu data, create new datasource, buscar el query de Sql y crear
la base de datos con las tablas, copiar el server name o nombre del
servidor para hacer la conexión y dar next hasta que escojamos las tablas y
luego finalizar.

Tendremos que ir nuevamente a data y escoger la opcion de show data source


para visualizar la conexión ya sea en un gridview o en details.

TAREA (INVESTIGAR Y DEFINIR EN SQL SERVER):

1- SQL
2- SERVERNAME

3- QUERY

4- COMANDO CREATE DATABASE

5- COMANDO USE

6- COMANDO CREATE TABLE


7- SELECT * FROM

8- INSERT-INTO-VALUES

9- DATASOURCE, DATASET.

10- TIPOS DE DATOS DEL SQL (int, NUMERIC,MONEY, VARCHAR, NVARCHAR ,


NVARCHAR(MAX), CHAR, ENTRE OTROS).

También podría gustarte