. VISUAL BASIC , .
, .
, ( ), .
, , .
.
:
1) Properties () .
2) :
[.]. =
: Text1.Text=
:
= [.].
: Fam= Text1.Text
:
Name () , .
Caption , .
Height () Width () .
Left ( ) ( ) - .
ScaleMode - Height, Width, Left Top. .
BorderStyle . , . :
0 - . . . . .
1 - . , , .
2 - . .
3 - . . . .
ControlBox - , , .
MaxButton . False , .
MinButton . False , .
Font .
ForeColor .
Icon .
WinwowState : , .
MDIChild MDI . , True. False.
|
|
:
Initialize .
Load - . , .
Aktivate , ( ).
GotFocus .
Deactivate , .
Unload - , .
Resize .
: Initialize, Load, Activate, GotFocus. Activate, GotFocus, Deactivate .
:
Form_[()]
. ( ) .
Project Properties, Project Properties Project .
, .
:
Load , . :
Load
Load . (). , , .
Show . :
. Show
. . , . vbModal.
: Student.Show vbModal
Hide , . , .
UnLoad . :
UnLoad
UnLoad . Me. : UnLoad Me.
.
. () .
VISUAL BASIC . .
, . , . , "" .
|
|
, .
: , , ,?()
. 7.20 .
VISAUL BASIC . Tools\Menu\Editor
() . (. .7.21).
:
;
.
, :
Caption ( , ).
Name , . .
. : mnu, , , - , - , .
Index , .
Shortcut .
HelpContextId , - .
Checked , . : True , False .
Enabled . False , ( , ).
Visible , .
WindowList MDI ( Window()).
:
() ( , ) ( );
().
. Click . VISUAL BASIC . (. 7.22). , Visible False. PopUpMenu .
. MouseUp ( ). . 7.23 . :
X, Y .
. . x, y . . 7.24.
7.26.
( ToolBar)
|
|
(intrinsic) . , , , VISUAL BASIC. Project\Components.
(CommandButton) , .
Click :
) ;
) Tab Enter.
:
Caption ( ). . , &.
, &, Alt+, .
Default - , . , , Default True. (default button). Enter, Click , ( Ok).
Cancel (cancel button). Click Esc ( Cancel).
Style . Standard, Caption. Graphical , Picture.
Desabled Picture Down Picture : , .
(Label) , . .
:
Caption - . 65528. :
Shift +{ | | | ¯};
Height Width;
Autosize WordWrap.
Autosize :
- False Caption;
- True Caption.
WordWrap. False, , . True, . .
: WordWrap, True AutoSize.
:
vbCrLf;
1) 13 ( ) 10 ( ).
BorderStyle - - .
Font , , .
|
|
ForeColor BackColor ;
Appearance : (1-3d) (0 Flat).
(TextBox)
, .
:
Change - . , . .
( ):
Private Sub txtNomGr_Change()
If Not IsNumeric(txtNomGr) Then
MsgBox
EndIf
End Sub
Validate . Validate , Causes Validation True.
( ):
Private Sub txtNomGr_Validate(Cancel_
As Boolean)
If Val(txtNomGr.Text)<100 Or _
Val(txtNomGr.Text)>9999 Then
MsgBox 100 9999
EndIf
End Sub
: Tab.
LostFocus - . , ( ). , , .
Validate, LostFocus.
GotFocus - . , .
:
Private Sub txtNomGr_LostFocus()
Stud.NomGr=txtNomGr.Text
End Sub
:
Text - .
Enabled , . False, .
Visible . False,
:
Private Sub Command1_Click()
Command1.Enabled = False
Command2.Visible = False
End Sub
ToolTipText .
PasswordChar , .
MaxLength , .
PasswordChar MaxLength .
:
MultiLine - .
ScrollBars - , (, ).
SelStart - .
SelLength - .
SelText - .
:
Private Sub Text1_GotFocus()
Text1.SelStart =0
Text1.SelLength = Len(Text1.Text)
End Sub
(CheckBox)
( CheckBox ) . . : , , , .
:
Click - .
:
Value :
0 - ;
1 - ;
2 - .
Style :
0- Standard ;
1- Graphical . (/).