.


:




:

































 

 

 

 





ScrollBar ( ) (ScrollBar) (. 2.15).

 

2.15

 

ScrollBar.

 

Value ( )
Min ( )
Max ( )
SrnallChange
Enabled : True ( ) False ( )
Visible : True ( ) False ( )

 

SpinButton () (SpinButton) (. 2.15). SpinButton . , , . Value, Min, M, Enabled, Visible SmallChange, .

 

OptionButton () (OptionButton) (. 2.16). , . , .

 

2.16 .

 

OptionButton.

 

Value True, False
Enabled : True ( ) False ( )
Visible : True ( ) False ( )
Capture ................................................... ,

 

. , : (1 ) (0 ). , 0, 1, . , , . . . . 2.17 , .

 

2.17 ,

 

, , UserForm1 , . 2.18, UserForm1 , .

2.18 -

 

Private Sub CommandButtonl_Click()

' 0 (), 1 (),

' . .

Randomize

= Int(2 * Rnd)

'

' , ""

If OptionButtonl.Value = True Then

If = 0 Then MsgBox "He . - VBA"

If = 1 Then MsgBox ". , ."

End If

'

' , ""

If OptionButton2.Value = True Then

If = 1 Then MsgBox "He . - VBA"

If = 0 Then MsgBox ". , "

End If

End Sub

 

Frame () (Frame) (. 2.19). . Capture, .

 

heckBox () (Checkbox) (. 2.20). . : , . Value, Enabled, Visible Capture, . , TripleState, . TripieState : False ( True False) True ( True, False Null).

 

2.19

 

2.20

 

ToggleButton () (ToggleButton) (. 2.20). , .

2.21 , , . .

Private Sub UserForm_Initialize()

ToggleButtonl.Value = True ToggleButton2.Value = False ToggleButton3.TripleState = True

ToggleButton3.Value = Null

CheckBoxl.Value = True CheckBox2.Value = False CheckBox3.TripleState = True CheckBox3.Value = Null

End Sub

2.21

 

Image () (Image). bmp, cur, gif, ico, jpg wmf. , .

 

AutoSize : True ( , ) False ( ).
Picture . LoadPicture. : Picture = LoadPicture()
PictureSizeMode . : fmPictureSizeModeClip ( ); fmPictureSizeModeStretch ( , ); fmPictureSizeModeZoom ( c , )
PictureAlignment . : fmPictureAlignmentTopLeft ( ); fmPictureAlignmentTopRight ( ); fmPictureAlignmentCenter ( ); fmPictureAlignmentBottomLeft ( ); fmPictureAlignmentBottomRight ( )
PictureTiling : True ( ) False ( )

(. 2.22). . , . , , .

Private Sub UserForm_Initialize()

With Image1

.PictureAlignment = fmPictureAlignmentTopLeft

.PictureSizeMode = fmPictureSizeModeZoom

.Picture = LoadPicture("c:\Face.bmp")

End With

With Image2

.PictureAlignment = fmPictureAlignmentTopLeft

.PictureSizeMode = fmPictureSizeModeStretch

.Picture = LoadPicture(":\Face.bmp")

End With

With Image2

.PictureAlignment = fmPictureAlignmentTopLeft.PictureSizeMode = fmPictureSizeModeStretch

Picture = LoadPicture("c:\Face.bmp")

End With

With Image3

.PictureAlignment = fmPictureAlignmentTopLeft.PictureSizeMode = fmPictureSizeModeClip

.Picture = LoadPicture("c:\Face.bmp")

End With

With Image4

.PictureAlignment = fmPictureAlignmentTopLeft

.PictureTiling = True

.Picture = LoadPicture("c:\Face.bmp")

End With

End Sub

 

2.22

 





:


: 2016-10-30; !; : 331 |


:

:

- - , .
==> ...

1622 - | 1583 -


© 2015-2024 lektsii.org - -

: 0.017 .