TA的每日心情 | 怒 2022-12-29 15:40 |
---|
签到天数: 1 天 [LV.1]初来乍到
|
请教下大师里面的这个Action表示的数字1,2,3,4,5是啥参数,不晓得啥意思~~% I. ^- `$ D5 X7 O: I9 U
Private Function dialogfunc(DlgItem$, Action%, SuppValue&) As Boolean
& b* d7 T' r3 {/ s" ^ Select Case Action%+ ?. f+ I5 d6 I& Y9 N
Case 1 ' Dialog box initialization
9 A( d! j' Q0 c- D& d DlgText "Xstep", ActiveDocument.GridX(plogGridDesign)*36 B5 Q7 _1 k6 F% j; [2 X8 ?
DlgText "Ystep", ActiveDocument.GridY(plogGridDesign)*3% q$ W. v$ d: @5 Z# [! z
View_Change7 l# W' k; A6 n
Document_SelectionChange8 h6 W& a) ^: m& M6 m
Case 2 ' Value changing or button pressed: q+ W6 t2 ~! F6 R- {
changing = True, P; u1 f% o' d. ]
dialogfunc = True
( `7 |4 _2 |( ?, A8 L: Y6 K If DlgItem$ = "Vertical" Then 6 | I9 z7 c6 s
DistributeV# ~# u0 S* ]7 D1 D0 R$ `
ElseIf DlgItem$ = "Horizonal" Then
) s+ t$ d3 N9 k7 c% j' z2 } DistributeH
; r+ x- Q! A' \) n( x) K ElseIf DlgItem$ = "MirrorX" Then6 L9 s- |8 O. w
MirrorX
8 i9 _* d0 y! `' {2 J ElseIf DlgItem$ = "MirrorY" Then" b7 D) @7 O9 u: D" Y* M: A- Q
MirrorY
$ n/ X+ U$ }/ \0 D! j ElseIf DlgItem$ = "Rotate90" Then1 G% B( u, a3 x0 }
Rotate90
) {. N; K$ ~4 f# z9 ^" x. F+ ~. } ElseIf DlgItem$ = "SetPos" Then
# R( M. F* J$ a1 B# M SetPos
$ L+ O" t4 H: z, n ElseIf DlgItem$ = "Top" Then
l' {- ]* r/ g/ d( s AlignTop, U; w; b: C% {7 }2 M6 e
ElseIf DlgItem$ = "Bottom" Then/ Q) f: |5 p7 b8 T9 l
AlignBottom
5 o0 I% B- f6 q5 u( h$ D( Z9 }- o! A1 K0 { ElseIf DlgItem$ = "Left" Then
+ `4 A. ^4 V7 A% E( \5 U, |* R AlignLeft; t0 J+ L/ z5 E: @, a
ElseIf DlgItem$ = "Right" Then& v/ R( [" T( O, _8 p% F
AlignRight
' ^% v- p: I7 C" `: k* Y ElseIf DlgItem$ = "CloseBtn" Then( l" k* N, n; i% [# F5 s) P! E
dialogfunc = False8 r" u5 r* L# n
End If
- Y5 g8 D7 z0 x. t6 P changing = False5 m5 \5 p. \3 z2 C' a: B+ k
Document_SelectionChange
: v' N+ O; p# |) T Case 3 ' TextBox or ComboBox text changed3 Q* z, J; Q/ u% U3 g& v
Case 4 ' Focus changed
% w0 ~+ c: s' M% `& l Case 5 ' Idle
& L& i1 T3 j9 L6 O/ _ ' dialogfunc = True ' Continue getting idle actions
+ O, [2 y8 c) H. M' n6 w) Z1 b8 {9 l
6 g: a9 i9 r% G- g8 P2 w/ E. v' ~
Case 6 ' Function key
! G5 n* R" P9 ^# @8 w$ P1 \ End Select0 x/ }: u; D( c& P
End Function |
|