Tags-Etiketler
    
        Bu kısımda sitemizde etiketlenmiş makaleleri toplu olarak bulabilirsiniz...
     
                      
                        
                                             
                        
                    
                                
                                    
                                        | [ buton ] / 
                                               Makaleler-Article(s) 
 buton ile ilgili toplam 4 makale bulundu ! (A total of 4 article(s) about buton was(were) found in all of articles!)
 
 
 | Article | 
|---|
 | GridView da Seçili Satırda Onay Butonunun Çıkması Merhaba arkadaşlar bu makalemizde mouse ile satır seçimi yapıldığında, seçili satırın sağında ki sütunda onay butonunun oluşmasını sağlayacağız.
 |  | Çalışma Anında Button Oluşturup Görev AtamakBu örnekte buton oluşturup, oluşturulan butona görev atayacağız. Aşağıdaki şekilleri inceleyin.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        Button buton = new Button();
        public Form1()
        {
            InitializeComponent();
            this.buton.Click += new System.EventHandler(this.buton_Click);
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            
            buton.Text = "Çalışma Anında Buton Oluşturma " + System.DateTime.Now;
            buton.Location = new Point(10, 10); 
            buton.Size = new System.Drawing.Size(250, 25);
            buton.Visible = true;
            Controls.Add(buton);
            
           
        }
        private void buton_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Çalışma anında oluşturulan" + System.Environment.NewLine + "Butona görev atandı...");
        }
    }
}
//Bir sonraki makalede görüşmek üzere. Bahadır ŞAHİN
 |  | Çalışma Anında Oluşturulan Button a Görev AtamakBu makalede çalışma anında oluşturduğumuz button a tıkladığımızda, mesaj yazdıracağız. Aşağıdaki şekli inceleyin.
   private void Form1_Load(object sender, EventArgs e)
        {
            Button yenibuton = new Button(); 
            yenibuton.Size=new System.Drawing.Size(100, 30);
            yenibuton.Location = new Point(10, 10);
            yenibuton.Text = "&Tıkla";
            this.AcceptButton = yenibuton;
            this.Controls.Add(yenibuton);
            yenibuton.Click += new System.EventHandler(yenibuton_Click);
        }
        private void yenibuton_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Çalışma anında oluşturduğunuz butona tıkladınız... ");
        }
//Bir sonraki makalede buluşmak üzere. Bahadır ŞAHİN
 |  | Çalışma Anında Buttonu Hareket EttirmekBu örnekte button un keydown yordamına yazılan küçük bir kod parçasıyla butonu sağa,sola, yukarı, aşağı hareket ettirebiliriz.
Public Class Form1
    Dim a As Integer = 10
    Dim b As Integer = 10
    Private Sub Button1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Button1.KeyDown
        If e.KeyValue = Keys.W Then
            a = a - 4
            Button1.Top = a
        ElseIf e.KeyValue = Keys.A Then
            b = b - 4
            Button1.Left = b
        ElseIf e.KeyValue = Keys.S Then
            a = a + 4
            Button1.Top = a
        ElseIf e.KeyValue = Keys.D Then
            b = b + 4
            Button1.Left = b
        End If
    End Sub
End Class
Bir sonraki makalede görüşmek üzere. Bahadır ŞAHİN
 | 
 
 | 
                                
                            
                                                
                        
    
   
  
    
   
  
		 
		
        
                Sitede yayınlanan makaleleri 
        Blog sitemizden de takip edebilirsiniz.
        Sitemizdeki makaleleri RSS olarak takip edebilirsiniz.