Academic Tutorials



English | French | Portugese | Dutch | Italian
Google

on-line

Haupt Quellenprogramme E-B�cher Downloads Mit uns in Verbindung treten �ber uns

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
HLML
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
CVS
Python
Apple Script
PL/SQL Tutorial
SQL Server
PHP
.NET (dotnet)
Microsoft.Net
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
VC++
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Matlab
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Graphics
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
SEO
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Eclipse
J2ME
JBOSS
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Cobol
Assembly Language
Mainframe
Forth Programming
Lisp Programming
Pascal
Delphi
Fortran
OOPs
Data Warehousing
CGI Programming
Emacs Tutorial
Gnome
ILU
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Oracle
MySQL
Operating System
BSD
Symbian
Unix
Internet
IP-Masquerading
IPC
MIDI
Software Testing
Testing
Firewalls
SAP Module
ERP
ABAP
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Netweaver
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Accounting
Financial Accounting
Managerial Accounting


Arbeiten mit Controls

Previous Next




Die Steuereigenschaften

Bevor Sie ein Fallverfahren f�r Steuerung zur Antwort zum Eingang eines Benutzers schreiben, mu�t du bestimmte Eigenschaften einstellen, damit damit die Steuerung sein Aussehen und wie es mit dem Fallverfahren funktioniert und dich kann die Eigenschaften der Kontrollen im Eigenschaften Fenster oder an der Laufzeit auch einstellen feststellt.

�ber Abbildung ist ein typisches Eigenschaften Fenster f�r eine Form. Du kannst den Formuntertitel zu jedem m�glichem Namen umbenennen, da� du gut und im Eigenschaften Fenster magst, das Einzelteil erscheinst am Oberteil bist der Gegenstand, der z.Z. vorgew�hlt wird (in der Abbildung oben, ist der vorgew�hlte Gegenstand Form1). Am unteren Teil stellen die Einzelteile, die in der linken Spalte verzeichnet werden, die Namen der verschiedenen Eigenschaften dar, die mit dem vorgew�hlten Gegenstand verbunden sind, w�hrend die Einzelteile, die in der rechten Spalte verzeichnet werden, die Zust�nde der Eigenschaften darstellen und Eigenschaften, indem man die Einzelteile in der rechten Spalte, eingestellt werden k�nnen hervorhebt �ndern sie dann, indem man die vorhandenen Wahlen schreibt oder vorw�hlt. Z.B. zwecks den Untertitel, den gerechten H�hepunkt Form1 unter dem Namen Untertitel �ndern und ihn zu den anderen Namen �ndern. Du kannst auch versuchen, das Aussehen der Form zu �ndern, indem Sie sie auf Ebene oder 3D einstellen. Andere Sachen, die du tun kannst, sind, seinen Hintergrund zu �ndern und Vordergrundfarbe, die Schriftkegelart und die Schriftkegelgr��e zu �ndern, zu erm�glichen oder zu sperren setzen herab und maximieren Tasten und etc.

Du kannst die Eigenschaften an der Laufzeit auch �ndern verleihst spezielle Wirksamkeiten wie �nderung der Farbe, des Animationeffektes und der Form und so weiter. Z.B. �ndert der folgende Code die Formfarbe zum hexadezimalen System des Rotes, jedesmal wenn die Form wird geladen und DES VB Gebrauches, um die Farbe darzustellen. Du kannst die Farbe Codes in den Eigenschaften Fenstern �berpr�fen, die oben unter BackColor und ForeColor gezeigt werden.

Private Sub Form_Load()
Form1.Show
Form1.BackColor = &H000000FF&
End Sub



Behandlung einige der allgemeinen Kontrollen
1.The Text Box

The text box is the standard control that is used to receive input from the user and also to display the output. It can handle string (text) and numeric data but not pictures or images.
String in a text box can be converted to a numeric data by using the function Val(text) and the following example illustrates a simple program that processes the inputs from the user.

In diesem Programm werden zwei Textk�sten in die Form zusammen mit einigen Aufklebern eingesetzt und die zwei Textk�sten werden benutzt, um Eing�nge vom Benutzer anzunehmen und einer der Aufkleber wird benutzt, um die Summe von zwei Zahlen anzuzeigen, die in die zwei Textk�sten eingetragen sind. Au�erdem mit dem Plusoperator wird eine Befehl Taste auch programmiert, um die Summe der zwei Zahlen zu errechnen.

Private Sub Command1_Click()

�To add the values in text box 1 and text box 2
Sum = Val(Text1.Text) + Val(Text2.Text)
�To display the answer on label 1
Label1.Caption = Sum

End Sub



2.The Label

The label is a very useful control for Visual Basic, as it is not only used to provide instructions and guides to the users, it can also be used to display outputs and one of its most important properties is Caption. Using the syntax label.Caption, it can display numeric and text data . You can change its caption in the properties window and also at the runtime.




3.The Command Button

The command button is a very important control as it is used to execute commands and it displays an illusion that the button is pressed when the user click on it. The most common event associated with the command button is the Click event, and the syntax for the procedure is as follows:

Private Sub Command1_Click ()

Statements

End Sub



4.The Picture Box

The Picture Box is one of the controls that used to handle graphics and you can load a picture at design phase by clicking on the picture item in the properties window and select the picture from the selected folder. You can also load the picture at runtime using the LoadPicture method and for example,the statement will load the picture grape.gif into the picture box.

Picture1.Picture=LoadPicture ("C:\VB program\Images\grape.gif")



5.The Image Box

The Image Box is another control that handles images and pictures and it functions almost identically to the picture box. However, there is one major difference, the image in an Image Box is stretchable, which means it can be resized and this feature is not available in the Picture Box. Similar to the Picture Box,to load the picture it can also use the LoadPicture method. For example, the statement loads the picture grape.gif into image box.

Image1.Picture=LoadPicture ("C:\VB program\Images\grape.gif")



6.The List Box

The function of the List Box is to present a list of items where the user can select and click the items from the list. In order to add items to the list, we can use the AddItem method and for example, if you wish to add a number of items to list box 1, you can key in the following statements

Private Sub Form_Load ( )

List1.AddItem �Lesson1�
List1.AddItem �Lesson2�
List1.AddItem �Lesson3�
List1.AddItem �Lesson4�
End Sub

Anmerkung: Die Einzelteile im Liste Kasten k�nnen durch die ListIndex Eigenschaft gekennzeichnet werden und der Wert des ListIndex f�r das erste Einzelteil ist 0, hat das zweite Einzelteil ein ListIndex 1, und das zweite Einzelteil hat ein ListIndex 2 und so weiter




7.The Combo Box

The function of the Combo Box is also to present a list of items where the user can select and click the items from the list. However, the user needs to click on the small arrowhead on the right of the combo box to see the items which are presented in a drop-down list and in order to add items to the list, you can also use the AddItem method. For example, if you wish to add a number of items to Combo box 1, you can key statements as follows

Private Sub Form_Load ( )

Combo1.AddItem �Item1�
Combo1.AddItem �Item2�
Combo1.AddItem �Item3�
Combo1.AddItem �Item4�

End Sub



8.The Check Box

The Check Box control lets the user to unselect or select an option. When the Check Box is checked, its value is set to 1 and when it is unchecked, the value is set to 0 and you can include the statements Check1.Value=1 to mark the Check Box and Check1.Value=0 unmark the Check Box, and use them to initiate certain actions. For example, the program will change the background color of the form to red when the check box is unchecked and when the check box is checked it will change to blue. You will learn about the conditional statement If�.Then�.Elesif in later lesson and vbBlue and VbRed are color constants and BackColor is the background color property of the form.

Private Sub Check1_Click ()

If Check1.Value = 0 Then
Form1.BackColor = vbRed
ElseIf Check1.Value = 1 Then
Form1.BackColor = vbBlue
End If

End Sub



9.The Option Box

The Option Box control also lets the user select one of the choices. However, two or more Option Boxes must work together because as one of the Option Boxes is selected and the other Option Boxes will be unselected. In fact, only one Option Box can be selected at one time. When an option box is selected, its value is set to �True� and its value is set to �False� when it is unselected. In the following example, the shape control is placed in the form together with six Option Boxes and when the user clicks on different option boxes, different shapes will appear. The values of the shape control are 0, 1, and 2,3,4,5 which will make it appear as a rectangle,an oval shape, a square , a rounded rectangle and a rounded square respectively.

Private Sub Option1_Click ( )
Shape1.Shape = 0
End Sub

Private Sub Option2_Click()
Shape1.Shape = 1
End Sub

Private Sub Option3_Click()
Shape1.Shape = 2
End Sub

Private Sub Option4_Click()
Shape1.Shape = 3
End Sub

Private Sub Option5_Click()
Shape1.Shape = 4
End Sub

Private Sub Option6_Click()
Shape1.Shape = 5
End Sub



10.The Drive List Box

The Drive ListBox is used to display a list of drives available in your computer and when you place this control into the form and run the program, you will be able to select different drives from your computer as shown in the following figure.




11.The Directory List Box

The Directory List Box is used to display the list of folders or directories in a selected drive. You will be able to select different directories from a selected drive in your computer as shown in Figure below,when you place this control into the form and run the program,




12.The File List Box

The File List Box is used to display the list of files in a selected directory or folder and when you place this control into the form and run the program, you will be able to a list of files in a selected directory as shown in Figurebelow





Previous Next

Schl�sselw�rter: Arbeitend mit Kontrollen, Asp arbeiten arbeiten Nettokontrollen, vb Nettokontrollen, grundlegende sichtlichkontrollen, Sichtstudiokontrollen, grundlegende Nettosichtlichkontrollen, Fenster bilden Kontrollen, w�hrend Fenster mit der Steuerverkleidung Akte arbeiteten und mit dem Sichtstudio und mit Steuerung, die c# Kontrollen und arbeiten mit datagrid, Verst�rker- Kontrollen


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
HLML Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
PL/SQL Quiz
SQL Server Quiz
PHP Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
VC++ Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
JBOSS Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
OOPs Quiz
Data Warehousing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz
Database Quizes
Oracle Quiz
MySQL Quiz
Operating System Quizes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
MIDI Quiz
Software Testing Quizes
Testing Quiz
Firewalls Quiz
SAP Module Quizes
ERP Quiz
ABAP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizes
Corba Quiz
Networking Quiz
Microsoft Office Quizes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft Front Page Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizes
Financial Accounting Quiz
Managerial Accounting Quiz

Privacy Policy
Copyright � 2003-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved.