Visual Studio 2005 Tutorial Gui

  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Visual Studio 2005 Tutorial Gui as PDF for free.

More details

  • Words: 329
  • Pages: 6
Working with windows forms controls Create a login page with the login name “sa” and the password is “call center”. And it should check three time after that automatically close the page. Step:1.Insert the two label,two text box and one button 2.Drag the “table layout plan”

3.Set the PASSWORD CHAR property of the password textbox 4.Set the ANCHOR property of all controls 5.Set the COLOUMNSPAN property of the Login button for show the button in center in the table 6.Set the visible property of the lblMessage control FALSE. 1

7.Adding code to validate the user input. First declare the variable at class level. Int ctr;

8.For that write coding on button click event

2

Perform Drag and Drop Operation Step:1.Insert one text box and write coding on DRAG ENTER event… private void textBox1_DragEnter(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.Text)) e.Effect = DragDropEffects.Copy; else e.Effect = DragDropEffects.None; }

2.Again on first text box write coding on its DRAG DROP event…. private void textBox1_DragDrop(object sender, DragEventArgs e) { textBox1.Text = e.Data.GetData(DataFormats.Text).ToString(); } Now this option allow you to drag any item from notepad and drop it into text box.

3

Drag and Drop (3.49)

Step:1.Insert two label , a text box , a tree view and a list box 2.Set the ALLOW DROP property of the list box control to true 3.Make the parent and child node of tree view

4.Then add code to perform the Drag and drop operation 5.Write coding on TEXT BOX MOUSE DOWN EVENT private void textBox1_MouseDown(object sender, MouseEventArgs e) { 4

textBox1.DoDragDrop(textBox1.Text, DragDropEffects.Move); }

6.Write coding on the tree view ITEM DRAG EVENT private void treeView1_ItemDrag(object sender, ItemDragEventArgs e) { TreeNode selecteditem = (TreeNode)e.Item; treeView1.DoDragDrop(selecteditem.Text, DragDropEffects.Move | DragDropEffects.Copy); }

7.Write coding on list box DRAG ENTER event private void listBox1_DragEnter(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.Text)) e.Effect = DragDropEffects.Move; }

8.Write coding on list box DRAG DROP EVENT

5

private void listBox1_DragDrop(object sender, DragEventArgs e) { listBox1.Items.Add(e.Data.GetData(DataF ormats.Text).ToString()); e.Effect = DragDropEffects.Move; }

9.Implement the application

6

Related Documents

Visual Studio
November 2019 24
Visual Studio
November 2019 19
Visual Studio
November 2019 13
Visual Studio
November 2019 14