Состав формы:
3 Label {2 Static, 1 Dinamic} (cimg);1 TextBox (testimg);6 CommandButton (cbOk,cbCansel,cbBegin,cbPrev,cbNext,cbEnd);
|
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} FindImages
Caption = "Find Images"
ClientHeight = 1710
ClientLeft = 45
ClientTop = 330
ClientWidth = 4710
OleObjectBlob = "FindImages.frx":0000
StartUpPosition = 1 'CenterOwner
End
Attribute VB_Name = "FindImages"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim timg As Object
Private Sub UserForm_Activate()
Set timg = ActiveDocument.InlineShapes
cimg.Caption = timg.Count
End Sub
Private Sub UserForm_Initialize()
Set timg = ActiveDocument.InlineShapes
cimg.Caption = timg.Count
End Sub
Private Sub cbOk_Click()
Dim tempimg As Long
On Error Resume Next
tempimg = testimg.Value
If tempimg > CInt(cimg.Caption) Then tempimg = CInt(cimg.Caption)
If tempimg < 0 Then tempimg = 0
testimg.Value = tempimg
If tempimg > 0 Then timg(tempimg).Select
End Sub
Private Sub cbCansel_Click()
FindImages.Hide
End Sub
Private Sub cbBegin_Click()
If CInt(cimg.Caption) = 0 Then testimg.Value = 0 Else testimg.Value = 1
End Sub
Private Sub cbPrev_Click()
Dim tempimg As Long
tempimg = testimg.Value
If tempimg > 1 Then tempimg = tempimg - 1
If CInt(cimg.Caption) = 0 Then tempimg = 0
testimg.Value = tempimg
End Sub
Private Sub cbNext_Click()
Dim tempimg As Long
tempimg = testimg.Value
If tempimg < CInt(cimg.Caption) Then tempimg = tempimg + 1 Else tempimg = CInt(cimg.Caption)
testimg.Value = tempimg
End Sub
Private Sub cbEnd_Click()
testimg.Value = CInt(cimg.Caption)
End Sub
|
Made in Terra No Names.