elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


  Mostrar Temas
Páginas: 1 [2]
11  Programación / .NET (C#, VB.NET, ASP) / no puedo desplegar todo :( en: 23 Febrero 2009, 02:41 am
saludos hola alguien sabe que tengo mal aki :huh: kiedo desplegar todos los dias de la semana en una texbox multiline y solo me desplega el lunes  :( alguien me puede ayudar gracias de antemano :

aki les dejo lo que ando haciendo :P

Código:
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;

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

        private void button1_Click(object sender, EventArgs e)
        {
            int cont;

            for(cont = 1;cont <8;cont ++)

         if(cont == 1)
         {
             textBox1.Text="lunes";
        }

       
           
               if (cont == 2)
               {
                    textBox1.Text="Martes";
               }

             
                   if (cont ==3)
                   {
                       textBox1.Text="Miercoles";
                   }




            }

 
         
         




               
           
    }
    }
12  Programación / .NET (C#, VB.NET, ASP) / problema con otro programa :P en: 21 Febrero 2009, 05:22 am
saludos :D bueno tengo un problema hice este programa para diferencia enter 2 numeros cual es el mayor  pero entre 3 no se que tengo que usar exactamente :-\ espero me puedan ayudar de nuevo  gracias :P

Código:
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;

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

        private void button1_Click(object sender, EventArgs e)
        {

            //variables
            int n1;
            int n2;
           
           

            //Asignacion de valores alas variables

            n1 = System.Int32.Parse(textBox1.Text);
            n2 = System.Int32.Parse(textBox2.Text);
         


            //condicion
            if (n1 > n2)
                textBox4.Text = n1.ToString();
            else     
               textBox4.Text = n2.ToString();
           


        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = "";
            textBox2.Text = "";
            textBox4.Text = "";
            textBox1.Focus();

        }
    }
}
13  Programación / .NET (C#, VB.NET, ASP) / [Solucionado] Ayuda con programa :P en: 20 Febrero 2009, 02:43 am
saludos atodos en el foro:P
me dejaron hacer un programa donde use un contador y condiciones para despegar todos los dias de la semana en visual lo estoy haciendo así pero no me sale no se que me falta espero me puedan ayudar ;D

Código:
public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int cont = 0;


            //despliega resultados



           
            if (cont == 1)
                textBox1.Text = "lunes";
            if (cont == 2)
                textBox1.Text = "Martes";
            if (cont == 3)
                textBox1.Text = "Miercoles";
            if (cont == 4)
                textBox1.Text = "Jueves";
            if (cont == 5)
                textBox1.Text = "Viernes";
            if (cont == 6)
                textBox1.Text = "Sabado";
            if (cont == 7)
                textBox1.Text = "Domingo";
           
           
           


        }




        }
    }

Páginas: 1 [2]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines