Toolbar.bas 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574
  1. VERSION 5.00
  2. Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} Toolbar
  3. Caption = "Toolbar"
  4. ClientHeight = 4230
  5. ClientLeft = 45
  6. ClientTop = 330
  7. ClientWidth = 6780
  8. OleObjectBlob = "Toolbar.frx":0000
  9. End
  10. Attribute VB_Name = "Toolbar"
  11. Attribute VB_GlobalNameSpace = False
  12. Attribute VB_Creatable = False
  13. Attribute VB_PredeclaredId = True
  14. Attribute VB_Exposed = False
  15. #If VBA7 Then
  16. Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
  17. Private Declare PtrSafe Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
  18. Private Declare PtrSafe Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
  19. Private Declare PtrSafe Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  20. Private Declare PtrSafe Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  21. Private Declare PtrSafe Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
  22. Private Declare PtrSafe Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
  23. #Else
  24. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
  25. Private Declare Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
  26. Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
  27. Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  28. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  29. Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
  30. Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
  31. #End If
  32. Private Const GWL_STYLE As Long = (-16)
  33. Private Const GWL_EXSTYLE = (-20)
  34. Private Const WS_CAPTION As Long = &HC00000
  35. Private Const WS_EX_DLGMODALFRAME = &H1&
  36. 'Constants for transparency
  37. Private Const WS_EX_LAYERED = &H80000
  38. Private Const LWA_COLORKEY = &H1 'Chroma key for fading a certain color on your Form
  39. Private Const LWA_ALPHA = &H2 'Only needed if you want to fade the entire userform
  40. Public UIL_Key As Boolean
  41. Public pic1, pic2
  42. Private Sub MakeUserFormTransparent(frm As Object, Optional Color As Variant)
  43. 'set transparencies on userform
  44. Dim formhandle As Long
  45. Dim bytOpacity As Byte
  46. formhandle = FindWindow(vbNullString, Me.Caption)
  47. If IsMissing(Color) Then Color = vbWhite 'default to vbwhite
  48. bytOpacity = 100 ' variable keeping opacity setting
  49. SetWindowLong formhandle, GWL_EXSTYLE, GetWindowLong(formhandle, GWL_EXSTYLE) Or WS_EX_LAYERED
  50. 'The following line makes only a certain color transparent so the
  51. ' background of the form and any object whose BackColor you've set to match
  52. ' vbColor (default vbWhite) will be transparent.
  53. Me.BackColor = Color
  54. SetLayeredWindowAttributes formhandle, Color, bytOpacity, LWA_COLORKEY
  55. End Sub
  56. Private Sub Change_UI_Close_Voice_Click()
  57. Speak_Msg "修改UI图片更换界面 注册表关闭语音 详QQ群"
  58. MsgBox "请给我支持!" & vbNewLine & "您的支持,我才能有动力添加更多功能." & vbNewLine & "蘭雅CorelVBA中秋节版" & vbNewLine & "coreldrawvba插件交流群 8531411"
  59. End Sub
  60. Private Sub UserForm_Initialize()
  61. Dim IStyle As Long
  62. Dim hWnd As Long
  63. hWnd = FindWindow("ThunderDFrame", Me.Caption)
  64. IStyle = GetWindowLong(hWnd, GWL_STYLE)
  65. IStyle = IStyle And Not WS_CAPTION
  66. SetWindowLong hWnd, GWL_STYLE, IStyle
  67. DrawMenuBar hWnd
  68. IStyle = GetWindowLong(hWnd, GWL_EXSTYLE) And Not WS_EX_DLGMODALFRAME
  69. SetWindowLong hWnd, GWL_EXSTYLE, IStyle
  70. With Me
  71. .StartUpPosition = 0
  72. .Left = Val(GetSetting("262235.xyz", "Settings", "Left", "400")) ' 设置工具栏位置
  73. .Top = Val(GetSetting("262235.xyz", "Settings", "Top", "55"))
  74. .Height = 30
  75. .Width = 336
  76. End With
  77. OutlineKey = True
  78. OptKey = True
  79. ' 读取角线设置
  80. Bleed.text = API.GetSet("Bleed")
  81. Line_len.text = API.GetSet("Line_len")
  82. Outline_Width.text = GetSetting("262235.xyz", "Settings", "Outline_Width", "0.2")
  83. UIFile = Path & "GMS\262235.xyz\ToolBar.jpg"
  84. If API.ExistsFile_UseFso(UIFile) Then
  85. UI.Picture = LoadPicture(UIFile) '换UI图
  86. Set pic1 = LoadPicture(UIFile)
  87. End If
  88. UIL = Path & "GMS\262235.xyz\ToolBar1.jpg"
  89. If API.ExistsFile_UseFso(UIL) Then
  90. Set pic2 = LoadPicture(UIL)
  91. UIL_Key = True
  92. End If
  93. ' 窗口透明, 最小化只显示一个图标
  94. #If VBA7 Then
  95. MakeUserFormTransparent Me, RGB(26, 22, 35)
  96. #Else
  97. ' CorelDRAW X4 / Windows7 自用关闭透明
  98. #End If
  99. End Sub
  100. Private Sub UI_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  101. UI.Visible = False
  102. If Y > 1 And Y < 16 And UIL_Key Then
  103. UI.Picture = pic2
  104. ElseIf Y > 16 And UIL_Key Then
  105. UI.Picture = pic1
  106. End If
  107. UI.Visible = True
  108. ' Debug.Print X & " , " & Y
  109. End Sub
  110. Private Sub UserForm_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  111. If Button Then
  112. mx = x
  113. my = Y
  114. End If
  115. With Me
  116. .Height = 30
  117. End With
  118. End Sub
  119. Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  120. If Button Then
  121. Me.Left = Me.Left - mx + x
  122. Me.Top = Me.Top - my + Y
  123. End If
  124. End Sub
  125. Private Sub LOGO_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  126. If Abs(x - 14) < 14 And Abs(Y - 14) < 14 And Button = 2 Then
  127. Me.Width = 336
  128. OPEN_UI_BIG.Left = 322
  129. UI.Visible = True
  130. LOGO.Visible = False
  131. TOP_ALIGN_BT.Visible = False
  132. LEFT_ALIGN_BT.Visible = False
  133. Exit Sub
  134. ElseIf Shift = fmCtrlMask Then
  135. mx = x
  136. my = Y
  137. Else
  138. Unload Me ' Ctrl + 鼠标 关闭工具
  139. End If
  140. End Sub
  141. Private Sub LOGO_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  142. If Button Then
  143. Me.Left = Me.Left - mx + x
  144. Me.Top = Me.Top - my + Y
  145. End If
  146. End Sub
  147. Private Sub UI_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  148. Dim c As New Color
  149. ' 定义图标坐标pos
  150. Dim pos_x As Variant
  151. Dim pos_y As Variant
  152. pos_y = Array(14)
  153. pos_x = Array(14, 41, 67, 94, 121, 148, 174, 201, 228, 254, 281, 308, 334, 361, 388, 415, 441, 468, 495)
  154. '// 鼠标右键 扩展键按钮优先 收缩工具栏 标记范围框 居中页面 尺寸取整数 单色黑中线标记 扩展工具栏 排列工具 扩展工具栏收缩
  155. If Abs(x - pos_x(0)) < 14 And Abs(Y - pos_y(0)) < 14 And Button = 2 Then
  156. Me.Width = 30
  157. Me.Height = 30
  158. UI.Visible = False
  159. LOGO.Visible = True
  160. Exit Sub
  161. ElseIf Abs(x - pos_x(1)) < 14 And Abs(Y - pos_y(0)) < 14 And Button = 2 Then
  162. Tools.居中页面
  163. Exit Sub
  164. ElseIf Abs(x - pos_x(2)) < 14 And Abs(Y - pos_y(0)) < 14 And Button = 2 Then
  165. Tools.Mark_Range_Box
  166. Exit Sub
  167. ElseIf Abs(x - pos_x(3)) < 14 And Abs(Y - pos_y(0)) < 14 And Button = 2 Then
  168. Tools.尺寸取整
  169. Exit Sub
  170. ElseIf Abs(x - pos_x(5)) < 14 And Abs(Y - pos_y(0)) < 14 And Button = 2 Then
  171. 自动中线色阶条.Auto_ColorMark_K
  172. Exit Sub
  173. '//分分合合把几个功能按键合并到一起,定义到右键上
  174. ElseIf Abs(x - pos_x(4)) < 14 And Abs(Y - pos_y(0)) < 14 And Button = 2 Then
  175. Tools.分分合合
  176. Exit Sub
  177. ElseIf Abs(x - pos_x(6)) < 14 And Abs(Y - pos_y(0)) < 14 And Button = 2 Then
  178. 智能群组和查找.智能群组 API.Create_Tolerance
  179. Exit Sub
  180. ElseIf Abs(x - pos_x(8)) < 14 And Abs(Y - pos_y(0)) < 14 And Button = 2 Then
  181. '// 右键扩展工具栏
  182. Me.Height = 30 + 45
  183. Exit Sub
  184. ElseIf Abs(x - pos_x(9)) < 14 And Abs(Y - pos_y(0)) < 14 And Button = 2 Then
  185. '// 右键拆分线段
  186. Tools.Split_Segment
  187. Exit Sub
  188. ElseIf Abs(x - pos_x(10)) < 14 And Abs(Y - pos_y(0)) < 14 And Button = 2 Then
  189. '// 右键排列工具
  190. TOP_ALIGN_BT.Visible = True
  191. LEFT_ALIGN_BT.Visible = True
  192. Exit Sub
  193. ElseIf Abs(x - pos_x(11)) < 14 And Abs(Y - pos_y(0)) < 14 And Button = 2 Then
  194. '// 右键扩展工具栏收缩
  195. Me.Height = 30
  196. Exit Sub
  197. End If
  198. '// 鼠标左键 单击按钮功能 按工具栏上图标正常功能
  199. If Abs(x - pos_x(0)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  200. 裁切线.start
  201. ElseIf Abs(x - pos_x(1)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  202. 剪贴板尺寸建立矩形.start
  203. ElseIf Abs(x - pos_x(2)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  204. 裁切线.SelectLine_to_Cropline
  205. ElseIf Abs(x - pos_x(3)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  206. 拼版裁切线.arrange
  207. ElseIf Abs(x - pos_x(4)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  208. 拼版裁切线.Cut_lines
  209. ElseIf Abs(x - pos_x(5)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  210. 自动中线色阶条.Auto_ColorMark
  211. ElseIf Abs(x - pos_x(6)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  212. 智能群组和查找.智能群组
  213. ElseIf Abs(x - pos_x(7)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  214. CQL_FIND_UI.Show 0
  215. ElseIf Abs(x - pos_x(8)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  216. Replace_UI.Show 0
  217. ElseIf Abs(x - pos_x(9)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  218. Tools.TextShape_ConvertToCurves
  219. ElseIf Abs(x - pos_x(10)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  220. '// 扩展工具栏
  221. Me.Height = 30 + 45
  222. Speak_Msg "左右键有不同功能"
  223. ElseIf Abs(x - pos_x(11)) < 14 And Abs(Y - pos_y(0)) < 14 Then
  224. If Me.Height > 30 Then
  225. Me.Height = 30
  226. Else
  227. '// 最小化
  228. Me.Width = 30
  229. Me.Height = 30
  230. OPEN_UI_BIG.Left = 31
  231. UI.Visible = False
  232. LOGO.Visible = True
  233. ' 保存工具条位置 Left 和 Top
  234. SaveSetting "262235.xyz", "Settings", "Left", Me.Left
  235. SaveSetting "262235.xyz", "Settings", "Top", Me.Top
  236. Speak_Msg "左键缩小 右键收缩"
  237. End If
  238. End If
  239. End Sub
  240. Private Sub X_EXIT_Click()
  241. Unload Me ' 关闭
  242. End Sub
  243. Private Sub 调用多页合并工具()
  244. Dim value As Integer
  245. value = GMSManager.RunMacro("合并多页工具", "合并多页运行.run")
  246. End Sub
  247. '''/// 贪心商人和好玩工具等 ///'''
  248. Private Sub Cdr_Nodes_BT_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  249. If Button = 2 Then
  250. TSP.Nodes_To_TSP
  251. ElseIf Shift = fmCtrlMask Then
  252. TSP.CDR_TO_TSP
  253. Else
  254. ' Ctrl + 鼠标 空
  255. End If
  256. End Sub
  257. Private Sub Cdr_Nodes_BT_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  258. TSP_L1.ForeColor = RGB(0, 150, 255)
  259. End Sub
  260. Private Sub START_TSP_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  261. TSP_L2.ForeColor = RGB(0, 150, 255)
  262. End Sub
  263. Private Sub PATH_TO_TSP_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  264. TSP_L3.ForeColor = RGB(0, 150, 255)
  265. End Sub
  266. Private Sub TSP2DRAW_LINE_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  267. TSP_L4.ForeColor = RGB(0, 150, 255)
  268. End Sub
  269. Private Sub TSP2DRAW_LINE_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  270. If Button = 2 Then
  271. TSP.TSP_TO_DRAW_LINE
  272. ElseIf Shift = fmCtrlMask Then
  273. TSP.TSP_TO_DRAW_LINES
  274. Else
  275. ' Ctrl + 鼠标 空
  276. End If
  277. End Sub
  278. Private Sub START_TSP_Click()
  279. TSP.START_TSP
  280. End Sub
  281. Private Sub PATH_TO_TSP_Click()
  282. TSP.MAKE_TSP
  283. End Sub
  284. Private Sub BITMAP_BUILD_Click()
  285. Tools.Python_BITMAP
  286. End Sub
  287. Private Sub BITMAP_BUILD2_Click()
  288. Tools.Python_BITMAP2
  289. End Sub
  290. Private Sub BITMAP_MAKE_DOTS_Click()
  291. TSP.BITMAP_MAKE_DOTS
  292. End Sub
  293. '''/// Python脚本和二维码等 ///'''
  294. Private Sub Organize_Size_Click()
  295. Tools.Python_Organize_Size
  296. End Sub
  297. Private Sub Get_Number_Click()
  298. Tools.Python_Get_Barcode_Number
  299. End Sub
  300. Private Sub Make_QRCode_Click()
  301. Tools.Python_Make_QRCode
  302. Tools.QRCode_replace
  303. End Sub
  304. Private Sub QR2Vector_Click()
  305. Tools.QRCode_to_Vector
  306. End Sub
  307. Private Sub OPEN_UI_BIG_Click()
  308. Unload Me
  309. CorelVBA.Show 0
  310. End Sub
  311. Private Sub Settings_Click()
  312. If 0 < Val(Bleed.text) * Val(Line_len.text) < 100 Then
  313. SaveSetting "262235.xyz", "Settings", "Bleed", Bleed.text
  314. SaveSetting "262235.xyz", "Settings", "Line_len", Line_len.text
  315. SaveSetting "262235.xyz", "Settings", "Outline_Width", Outline_Width.text
  316. End If
  317. ' 保存工具条位置 Left 和 Top
  318. SaveSetting "262235.xyz", "Settings", "Left", Me.Left
  319. SaveSetting "262235.xyz", "Settings", "Top", Me.Top
  320. Me.Height = 30
  321. End Sub
  322. '''///////// 图标鼠标左右点击功能调用 /////////'''
  323. Private Sub Tools_Icon_Click()
  324. ' 调用语句
  325. I = GMSManager.RunMacro("CorelDRAW_VBA", "学习CorelVBA.start")
  326. End Sub
  327. '''//// 选择多物件,组合然后拆分线段,为角线爬虫准备 ////'''
  328. Private Sub Split_Segment_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  329. If Button = 2 Then
  330. MsgBox "鼠标右键,功能待定"
  331. Exit Sub
  332. End If
  333. If Button Then
  334. Tools.Split_Segment
  335. End If
  336. End Sub
  337. Private Sub Split_Segment_Copy_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  338. If Button = 2 Then
  339. MsgBox "鼠标右键,功能待定"
  340. Exit Sub
  341. End If
  342. If Button Then
  343. Tools.Split_Segment
  344. End If
  345. Speak_Msg "拆分线段"
  346. End Sub
  347. '''//// CorelDRAW 与 Adobe_Illustrator 剪贴板转换 ////'''
  348. Private Sub Adobe_Illustrator_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  349. Dim value As Integer
  350. If Button = 2 Then
  351. value = GMSManager.RunMacro("AIClipboard", "CopyPaste.PasteAIFormat")
  352. Exit Sub
  353. End If
  354. If Button Then
  355. value = GMSManager.RunMacro("AIClipboard", "CopyPaste.CopyAIFormat")
  356. MsgBox "CorelDRAW 与 Adobe_Illustrator 剪贴板转换" & vbNewLine & "鼠标左键复制,鼠标右键粘贴"
  357. End If
  358. End Sub
  359. '''//// 标记画框 支持容差 ////'''
  360. Private Sub Mark_CreateRectangle_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  361. If Button = 2 Then
  362. Tools.Mark_CreateRectangle True
  363. ElseIf Shift = fmCtrlMask Then
  364. Tools.Mark_CreateRectangle False
  365. Else
  366. Create_Tolerance
  367. End If
  368. Speak_Msg "标记画框 右键支持容差"
  369. End Sub
  370. '''//// 一键拆开多行组合的文字字符 ////'''
  371. Private Sub Batch_Combine_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  372. If Button = 2 Then
  373. Tools.Batch_Combine
  374. ElseIf Shift = fmCtrlMask Then
  375. Tools.Take_Apart_Character
  376. Else
  377. Create_Tolerance
  378. End If
  379. Speak_Msg "智能拆字"
  380. End Sub
  381. '''//// 简单一刀切 ////'''
  382. Private Sub Single_Line_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  383. If Button = 2 Then
  384. Tools.Single_Line_Vertical
  385. ElseIf Shift = fmCtrlMask Then
  386. Tools.Single_Line
  387. Else
  388. Tools.Single_Line_LastNode
  389. End If
  390. Speak_Msg "简单一刀切"
  391. End Sub
  392. '''//// 傻瓜火车排列 ////'''
  393. Private Sub TOP_ALIGN_BT_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  394. If Button = 2 Then
  395. Tools.傻瓜火车排列 3#
  396. ElseIf Shift = fmCtrlMask Then
  397. Tools.傻瓜火车排列 0#
  398. Else
  399. Tools.傻瓜火车排列 Set_Space_Width
  400. End If
  401. End Sub
  402. '''//// 傻瓜阶梯排列 ////'''
  403. Private Sub LEFT_ALIGN_BT_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  404. If Button = 2 Then
  405. Tools.傻瓜阶梯排列 3#
  406. ElseIf Shift = fmCtrlMask Then
  407. Tools.傻瓜阶梯排列 0#
  408. Else
  409. Tools.傻瓜阶梯排列 Set_Space_Width
  410. End If
  411. End Sub
  412. '''//// 左键-多页合并一页工具 右键-批量多页居中 ////'''
  413. Private Sub UniteOne_BT_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  414. If Button = 2 Then
  415. Tools.批量多页居中
  416. ElseIf Shift = fmCtrlMask Then
  417. UniteOne.Show 0
  418. Speak_Msg "多页合并一页"
  419. Else
  420. ' Ctrl + 鼠标 空
  421. End If
  422. End Sub
  423. '''//// Adobe AI EPS INDD PDF和CorelDRAW 缩略图工具 ////'''
  424. Private Sub AdobeThumbnail_Click()
  425. Dim h As Long, r As Long
  426. mypath = Path & "GMS\262235.xyz\"
  427. App = mypath & "GuiAdobeThumbnail.exe"
  428. h = FindWindow(vbNullString, "CorelVBA 青年节 By 蘭雅sRGB")
  429. I = ShellExecute(h, "", App, "", mypath, 1)
  430. End Sub
  431. '''//// 快速颜色选择 ////'''
  432. Private Sub Quick_Color_Select_Click()
  433. Tools.quickColorSelect
  434. End Sub
  435. Private Sub Cut_Cake_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  436. If Button = 2 Then
  437. Tools.divideVertically
  438. ElseIf Shift = fmCtrlMask Then
  439. Tools.divideHorizontally
  440. Else
  441. ' Ctrl + 鼠标 空
  442. End If
  443. End Sub
  444. '// 安全辅助线功能,三键控制,讨厌辅助线的也可以用来删除辅助线
  445. Private Sub Safe_Guideangle_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal Y As Single)
  446. If Button = 2 Then
  447. Tools.guideangle CorelDRAW.ActiveSelectionRange, 0# ' 右键 0距离贴紧
  448. ElseIf Shift = fmCtrlMask Then
  449. Tools.guideangle CorelDRAW.ActiveSelectionRange, 4 ' 左键安全范围 4mm
  450. Else
  451. Tools.guideangle CorelDRAW.ActiveSelectionRange, -Set_Space_Width ' Ctrl + 鼠标左键
  452. End If
  453. End Sub
  454. '// 小工具快速启动
  455. Private Sub Open_Calc_Click()
  456. Launcher.START_Calc
  457. End Sub
  458. Private Sub Open_Notepad_Click()
  459. Launcher.START_Notepad
  460. End Sub
  461. Private Sub terminal_Click()
  462. Launcher.START_GitBash
  463. End Sub
  464. Private Sub Video_Camera_Click()
  465. Launcher.START_Bandicam
  466. End Sub