9 November 2025 Sunday 10:46:52


C# ile İdeal Kilo ölçme Programı

C# ile İdeal Kilo ölçme Programı

Merhaba arkadaşlar Windows Form uygulaması ile ideal Kilo ölçme programı yapılımı yapacağız. Programı yapmadan önce Form penceresi içerisine 1 adet buton 2 adet textbox 3 adet Label ve 4 farklı pictureBox kullanımı sağlayacağız.

Tasarım aşağıdaki gibidir.

using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;

namespace Deneme_Proje
{
    public partial class idealKilo : DevExpress.XtraEditors.XtraForm
    {
        public idealKilo()
        {
            InitializeComponent();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            pictureBox1.Visible = false;
            pictureBox2.Visible = false;
            pictureBox3.Visible = false;
            pictureBox4.Visible = false;
           
            double kilo, boy, vik;
            kilo = Convert.ToDouble(txtKilo.Text);
            boy = Convert.ToDouble(txtBoy.Text);
            vik = kilo / (boy * boy);

            if (vik <= 18.5)
            {
                labelControl3.Text = "ZAYIF";
                pictureBox1.Visible = true;
            }
            if (vik > 18.5 && vik <= 24.9)
            {
                labelControl3.Text = "İDEAL";
                pictureBox2.Visible = true;
            }
            if (vik > 24.9 && vik <= 29.9)
            {
                labelControl3.Text = "ŞİŞMAN";
                pictureBox3.Visible = true;
            }
            if (vik > 29.9 && vik <= 34.9)
            {
                labelControl3.Text = "OBEZ";
                pictureBox4.Visible = true;
            }
            
        }
    }
}

 

 

 

 

 

 

 

 

 


 

img

ibrahim ÖZKAN