Şimdi Ara

Hatalı Kod Yardım

Daha Fazla
Bu Konudaki Kullanıcılar: Daha Az
1 Misafir - 1 Masaüstü
5 sn
1
Cevap
0
Favori
283
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
0 oy
Öne Çıkar
Sayfa: 1
Giriş
Mesaj
  • 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 Indirme_Sure_Hesaplama
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }

    private void timer1_Tick(object sender, EventArgs e)
    {

    }
    private void button1_Click(object sender, EventArgs e)
    {
    try
    {
    int boyut; int hiz; int kalansure;
    boyut = Convert.ToInt32(textBox1.Text);
    hiz = Convert.ToInt32(textBox2.Text);

    if (comboBox1.SelectedText == "Kb" && comboBox2.SelectedText == "Kbps")
    {

    if (boyut%hiz*60 == 0)
    {
    kalansure = boyut / hiz*60;
    label4.Text = Convert.ToString(kalansure);
    }
    else
    {
    kalansure = boyut / hiz*60;
    label4.Text = Convert.ToString(kalansure) + " dakika" + Convert.ToString(boyut % hiz) + " saniye";
    }




    }
    else { label4.Text = ""; }

    }
    catch (Exception hata)
    {
    if (hata.Message != "Input string was not in a correct format.")
    {
    MessageBox.Show(hata.Message);
    }
    }


    }
    }
    }





    Yukardaki kodu yazdım ama Button1 e bastığımda label4'de hiçbirşeyyazmıyor sorunu hala anlıyamadım.







  • 
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.