TextBox and ListBox : TextBox « GUI Windows Form « C# / C Sharp

C# / C Sharp
1. 2D Graphics
2. Class Interface
3. Collections Data Structure
4. Components
5. Data Types
6. Database ADO.net
7. Design Patterns
8. Development Class
9. Event
10. File Stream
11. Generics
12. GUI Windows Form
13. Language Basics
14. LINQ
15. Network
16. Office
17. Reflection
18. Regular Expressions
19. Security
20. Services Event
21. Thread
22. Web Services
23. Windows
24. XML
25. XML LINQ
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
C# / C Sharp » GUI Windows Form » TextBoxScreenshots 
TextBox and ListBox
TextBox and ListBox


using System;
using System.Drawing;
using System.Windows.Forms;


public class WindowSample : Form
{
   private TextBox data;
   private ListBox results;

   public WindowSample()
   {
      Text = "Sample Window Program";
      Size = new Size(400380);

      Label label1 = new Label();
      label1.Parent = this;
      label1.Text = "Enter text string:";
      label1.AutoSize = true;
      label1.Location = new Point(1010);

      data = new TextBox();
      data.Parent = this;
      data.Size = new Size(200* Font.Height);
      data.Location = new Point(1035);

      results = new ListBox();
      results.Parent = this;
      results.Location = new Point(1065);
      results.Size = new Size(35020 * Font.Height);

      Button checkit = new Button();
      checkit.Parent = this;
      checkit.Text = "test";
      checkit.Location = new Point(235,32);
      checkit.Size = new Size(* Font.Height, * Font.Height);
      checkit.Click += new EventHandler(ButtonOnClick);
   }

   void ButtonOnClick(object obj, EventArgs ea)
   {
      results.Items.Add(data.Text);
      data.Clear();
   }

   public static void Main()
   {
      Application.Run(new WindowSample());
   }
}
           
       
Related examples in the same category
1. Add ScrollBars to TextBox
2. new TextBox(), Localtion, Name, TabIndex, Text
3. TextBox locationTextBox location
4. Keyboard event and TextBox
5. Get value from TextBox
6. Text Changed eventText Changed event
7. A simple text editorA simple text editor
8. Convert TextBox input to double valueConvert TextBox input to double value
9. All cap text textboxAll cap text textbox
10. Data CheckerData Checker
11. User EventsUser Events
12. TextBox and button on formTextBox and button on form
13. Label, TextBox and ButtonLabel, TextBox and Button
14. TextBox DemoTextBox Demo
15. Simple Editor based on TextBox
w__w__w___.j_a_v___a2___s.__co__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.