• λ我爱Aspx >> Asp.Net >> 用C#.NET实现拖放操作
  • 用C#.NET实现拖放操作

  • :aspxer  Դ:5iaspx  :2007-8-1 13:15:14  ؼ:c#,.net
  • this.ClientSize = new System.Drawing.Size(408, 333);

    this.Controls.Add(this.listBox1);

    this.Controls.Add(this.listBox2);

    this.Name = "Form1";

    this.Text = "Form1";

    this.Load += new System.EventHandler(this.Form1_Load);

    this.ResumeLayout(false);

    }

    #endregion

    /// <summary>

    /// 应用程序的主入口点。

    /// </summary>

    [STAThread]

    static void Main()

    {

    Application.Run(new Form1());

    }

    private void Form1_Load(object sender, System.EventArgs e)

    {

    this.listBox1.AllowDrop = true;

    this.listBox2.AllowDrop = true;

    this.listBox1.Items.Add("a");

    this.listBox1.Items.Add("b");

    this.listBox1.Items.Add("c");

    }

    private void listBox1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)

    {

    this.listBox1.DoDragDrop(this.listBox1.Items[this.listBox1.SelectedIndex],DragDropEffects.Move);

    Ҷƪл˵?
  • һƪ用iframe解决下拉框与层之冲突
    һƪ一個Ajax.NET的查詢實例