Wednesday, July 22, 2009

Holding Pinky Countdown

Creating a UserControl with Visual C # 2005

Hi all,
I will make a simple example of how to create a UserControl, and that the same control we will use for subsequent years as needed .

What is a UserControl?
A UserControl is just a common class and whose extension . Cs , which also provides references to work with classes in the System.Windows.Forms namespace , unlike Class Library.

What is the point and why to use UserControl?
The UserControl provides the ability to create controls that can be used in several places within an application.

For our example, let's create an application in Visual Studio.NET 2005, for this select Visual C # and the name of our project (Project) will WindowsApplication and the solution (solution) will be called UserControl .

After you enter data, respectively, press the button OK , and acontinuaciĆ³n our Solution Explorer window (Solution Explorer), would be as follows:

To organize our files we will create a folder with the name UGC, and this folder will give a right click which will display a pop-up window, select the option Add / User Control ... and displays the Add New Item window

To name our UserControl, we will click the Name box and give the name of customDataGridView and then press the button Add , and Explorer will display our solutions (Solution Explorer) as follows:

below to create a WinForm UserControl, design our control and we will use 4 controls: DataGridView, Panel, Label and TextBox.

Control "DataGridView"
  • Name: dataGridView1

  • BackgroundColor:

  • Control Dock: Fill


Control "Panel"
  • Name: panel1

  • Dock: Bottom


Control "Label"
  • Name: label1

  • Anchor: Bottom

  • Name: txtNroReg

Anchor: Bottom asked about the announcement last week that Google
develop an operating system (called Chrome) for the netbook market.
But then, Ballmer threw his jabs against Google, with whom Microsoft is embroiled in a growing struggle in some of the key battlefronts in the sector, given the nearly 6,000 people attending the conference in the U.S. city of New Orleans .
  • "Chrome is very interesting. It will not exist until within a year and a half, but they are announcing now," he said with a look of disbelief contained.

  • Ballmer also said that Google's strategy of having two operating systems (Besides the announced Chrome, the web browser already has in the Android market for mobile phones) will not work.
  • "You do not need two operating systems, Microsoft said, adding that he knows because he tried for years with Windows 95 and Windows NT.
  • addition, according to data from Microsoft, users spend 50% of their time in front of a computer without using Internet browsers, so that the Redmond company, Google's strategy for netbooks is not successful.

  • "Windows is the operating system properly," he said.

  • Source: Trade


0 comments:

Post a Comment