C# Kod ile buton oluşturma

Client

Kullanıcı
Katılım
30 Nis 2022
Mesajlar
22
Tepkime puanı
1
Puanları
3
Form1 yüklendiğinde belirtilen boyutta , belirtilen koordinata buton oluşturulur.

C#:
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 kodla_olusturulan_butona_islem_yaptırma
 
{
 
public partial class Form1 : Form
 
{
 
public Form1()
 
{
 
InitializeComponent();
 
}
 
private void Form1_Load(object sender, EventArgs e)
 
{
 
Button dugme = new Button();
 
dugme.Top = 50;
 
dugme.Left = 70;
 
dugme.Width = 100;
 
dugme.Text = "Buton1";
 
this.Controls.Add(dugme);
 
}
 
}
 
}
 

Yorum yapmak için bir hesap oluşturun veya giriş yapın

Yeni bir konu oluşturabilmek veya konulara cevap verebilmek için sitemize üye olmanız gerekmektedir

Hesap oluştur

Forum sitemizde bir hesap oluşturun. Bu işlem çok kolay!

Giriş yap

Zaten bir hesabınız var mı? Giriş yapın.

Konuyu toplam 1 üye okuyor. (0 Kayıtlı üye ve 1 Misafir)

Üst