1
1

VBA_FORM.frm 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. VERSION 5.00
  2. Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} VBA_FORM
  3. Caption = "Hello_VBA"
  4. ClientHeight = 10080
  5. ClientLeft = 45
  6. ClientTop = 390
  7. ClientWidth = 6180
  8. OleObjectBlob = "VBA_FORM.frx":0000
  9. StartUpPosition = 1 'CenterOwner
  10. End
  11. Attribute VB_Name = "VBA_FORM"
  12. Attribute VB_GlobalNameSpace = False
  13. Attribute VB_Creatable = False
  14. Attribute VB_PredeclaredId = True
  15. Attribute VB_Exposed = False
  16. Private Sub AutoRotate_Click()
  17. Tools.自动旋转角度
  18. End Sub
  19. Private Sub btn_autoalign_bycolumn_Click()
  20. autogroup("group", 1).CreateSelection
  21. End Sub
  22. Private Sub btn_corners_off_Click()
  23. Tools.corner_off
  24. End Sub
  25. Private Sub btn_ExpandForm_Click()
  26. With Me
  27. If .Width = 200 Then
  28. .Width = 260: .Height = 132
  29. ElseIf .Height = 132 Then
  30. .Height = 206
  31. Else
  32. .Width = 200: .Height = 105
  33. End If
  34. End With
  35. End Sub
  36. Private Sub cmd_Batch_Center_Click()
  37. Container.Batch_Center
  38. End Sub
  39. Private Sub CommandButton1_Click()
  40. autogroup("group", 2).CreateSelection
  41. End Sub
  42. Private Sub CB_AQX_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  43. If Button = 2 Then
  44. Tools.guideangle ActiveSelectionRange, 0# ' 右键 0距离贴紧
  45. ElseIf Shift = fmCtrlMask Then
  46. Tools.guideangle ActiveSelectionRange, 4 ' 左键安全范围 4mm
  47. Else
  48. Tools.guideangle ActiveSelectionRange, -10 ' Ctrl + 鼠标左键
  49. End If
  50. End Sub
  51. Private Sub CB_BZCC_Click()
  52. Tools.尺寸标注
  53. End Sub
  54. Private Sub CB_ECWZ_Click()
  55. Tools.填入居中文字 GetClipBoardString
  56. End Sub
  57. Private Sub CB_JDZP_Click()
  58. Tools.角度转平
  59. End Sub
  60. Private Sub CB_JHDX_Click()
  61. Tools.交换对象
  62. End Sub
  63. Private Sub CB_make_sizes_Click()
  64. Tools.Make_Sizes
  65. End Sub
  66. Private Sub CB_PLBZ_Click()
  67. Tools.批量标注
  68. End Sub
  69. Private Sub CB_PLDYJZ_Click()
  70. Tools.批量多页居中
  71. End Sub
  72. Private Sub CB_PLWZ_Click()
  73. Tools.批量居中文字 "CorelVBA批量文字"
  74. End Sub
  75. Private Sub CB_QZJZ_Click()
  76. Tools.群组居中页面
  77. End Sub
  78. Private Sub CB_SIZESORT_Click()
  79. splash.Show 1
  80. End Sub
  81. Private Sub CB_VBA_Click()
  82. MsgBox "你好 CorelVBA!"
  83. End Sub
  84. Private Sub CB_VBA_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  85. CB_VBA.BackColor = RGB(255, 0, 0)
  86. End Sub
  87. Private Sub CB_ZDJD_Click()
  88. Tools.自动旋转角度
  89. End Sub
  90. Private Sub CB_mirror_by_line_Click()
  91. Tools.参考线镜像
  92. End Sub
  93. Private Sub CommandButton2_Click()
  94. Tools.服务器T
  95. End Sub
  96. Private Sub CommandButton3_Click()
  97. Dim sr As ShapeRange
  98. Dim shr As ShapeRange
  99. Set sr = ActiveSelectionRange
  100. Set shr = ActivePage.Shapes.All
  101. If sr.Shapes.Count = 0 Then
  102. shr.CreateSelection '所有对象
  103. Else
  104. shr.RemoveRange sr
  105. shr.CreateSelection '不在原选择范围内的对象
  106. End If
  107. End Sub
  108. Private Sub ExportNodePot_Click()
  109. Tools.ExportNodePositions
  110. End Sub
  111. Private Sub Image7_Click()
  112. arrow.Show 0
  113. Unload Me
  114. End Sub
  115. Private Sub Image8_Click()
  116. frmSelectSame.Show 0
  117. Unload Me
  118. End Sub
  119. Private Sub OneKeyToPowerClip_Click()
  120. Container.OneKey_ToPowerClip
  121. End Sub
  122. Private Sub Photo_Form_Click()
  123. PhotoForm.Show 0
  124. End Sub
  125. Private Sub BatchToPowerClip_Click()
  126. Container.Batch_ToPowerClip
  127. End Sub
  128. Private Sub Print_Page_Click()
  129. ActivePage.Shapes.All.Move ActivePage.CenterX - ActiveSelectionRange.CenterX, ActivePage.CenterY - ActiveSelectionRange.CenterY
  130. ' 等价下面几行代码
  131. ' Dim sr As ShapeRange, shr As ShapeRange
  132. ' Set sr = ActiveSelectionRange
  133. ' Set shr = ActivePage.Shapes.All
  134. ' X = sr.CenterX
  135. ' Y = sr.CenterY
  136. ' px = ActivePage.CenterX
  137. ' py = ActivePage.CenterY
  138. ' shr.Move px - X, py - Y
  139. End Sub
  140. Private Sub RemoveShapes_OutsideBox_Click()
  141. Container.Remove_OutsideBox
  142. End Sub
  143. Private Sub SelectOnMargin_Click()
  144. Container.Select_OnMargin
  145. End Sub
  146. Private Sub SelectOutsideBox_Click()
  147. Container.Select_OutsideBox
  148. End Sub
  149. Private Sub Set_BoxName_Click()
  150. Container.SetBoxName
  151. End Sub
  152. Private Sub SetNames_Click()
  153. Tools.SetNames
  154. End Sub
  155. Private Sub SplitSegment_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  156. If Button = 2 Then
  157. MsgBox "左键拆分线段,Ctrl合并线段"
  158. ElseIf Shift = fmCtrlMask Then
  159. Tools.Split_Segment
  160. Else
  161. ActiveSelection.CustomCommand "ConvertTo", "JoinCurves"
  162. Application.Refresh
  163. End If
  164. End Sub
  165. Private Sub Image4_Click()
  166. cmd_line = "Notepad D:\备忘录.txt"
  167. Shell cmd_line, vbNormalNoFocus
  168. End Sub
  169. Private Sub Image5_Click()
  170. Shell "Calc"
  171. End Sub
  172. Private Sub LevelRuler_Click()
  173. Tools.角度转平
  174. End Sub
  175. Private Sub MakeSizes_Click()
  176. ZCOPY.Show 0
  177. End Sub
  178. Private Sub MirrorLine_Click()
  179. Tools.参考线镜像
  180. End Sub
  181. Private Sub SortCount_Click()
  182. Tools.按面积排列 50
  183. End Sub
  184. Private Sub SwapShape_Click()
  185. Tools.交换对象
  186. End Sub
  187. Private Sub TESTPIC__MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  188. TESTPIC.SpecialEffect = fmSpecialEffectSunken
  189. End Sub
  190. Private Sub UserForm_Click()
  191. End Sub
  192. Private Sub ZNQZ_Click()
  193. Tools.智能群组
  194. End Sub
  195. Private Sub 读取文本_Click()
  196. AutoCutLines.AutoCutLines
  197. End Sub
  198. Sub 读取每一行数据()
  199. Dim txt As Object, t As Object, path As String
  200. Set txt = CreateObject("Scripting.FileSystemObject")
  201. Dim a
  202. ' 指定路径
  203. path = "R:\Temp.txt"
  204. ' “1”表示只读打开,“2”表示写入,True表示目标文件不存在时是创建
  205. Set t = txt.OpenTextFile(path, 1, True)
  206. '--------------------------
  207. ' 读取每一行并把内容显示出来
  208. Do While Not t.AtEndOfStream
  209. ' a = t.ReadLine
  210. a = a & t.ReadLine & vbNewLine
  211. TextBox1.Value = a
  212. Loop
  213. '--------------------------
  214. ' 打开文档,注意“notepad.exe ”最后有空格
  215. Shell "notepad.exe " & path, vbNormalFocus
  216. ' 释放变量
  217. Set t = Nothing
  218. Set txt = Nothing
  219. End Sub
  220. Private Sub 裁切线_Click()
  221. AutoCutLines.AutoCutLines
  222. End Sub
  223. Private Sub 手动拼版_Click()
  224. ArrangeForm.Show 0
  225. End Sub
  226. Private Sub 算法计算_Click()
  227. ChatGPT.计算行列
  228. End Sub
  229. Private Sub Z序排列_Click()
  230. ChatGPT.Z序排列
  231. End Sub
  232. Private Sub U序排列_Click()
  233. ChatGPT.正式U序排列
  234. End Sub