国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
使用VB快速制作WPS的COM加載項(xiàng)
1.新建工程,選擇ActiveX Dll。

2.工程、引用、選擇Kingsoft Add-In Designer、Kingsoft Office 1.0 Object Library、Kingsoft WPS 2.0 object Library。

3.將工程名原來(lái)的“工程1”改為“kgsPro”,類名稱的“Class1”改為“AddCommand”
(這里的修改的名稱根據(jù)實(shí)際情況而定義,但在后面的注冊(cè)時(shí)會(huì)用到這兩個(gè)名字)

4.寫入如下的代碼:
  1. Option Explicit
  2. Implements IDTExtensibility2
  3. Private WithEvents wpsApp As WPS.Application
  4. Private WithEvents btnNew As CommandBarButton
  5. Private myId As Integer
  6. Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
  7.     Set wpsApp = Application
  8. End Sub
  9. Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
  10.     Set wpsApp = Nothing
  11.    
  12. End Sub
  13. Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant)
  14.     Dim myBar As CommandBar
  15.     Set myBar = wpsApp.CommandBars.Add("測(cè)試工具欄")
  16.     Set btnNew = myBar.Controls.Add
  17.     
  18.    
  19. End Sub
  20. Private Sub IDTExtensibility2_OnAddInsUpdate(custom() As Variant)
  21.     '通常這些不需要寫
  22. End Sub
  23. Private Sub IDTExtensibility2_OnBeginShutdown(custom() As Variant)
  24.     btnNew.Delete '刪除加載項(xiàng)
  25. End Sub
  26. Private Sub btnNew_Click(ByVal Ctrl As KSO.CommandBarButton, CancelDefault As Boolean)
  27.    'wpsApp.ActiveDocument.BeginJob
  28.     MsgBox "這是一個(gè)Demo", vbOKOnly, "kongguisheng"
  29.    'wpsApp.ActiveDocument.EndJob "這僅僅是一個(gè)Demo", True
  30. End Sub
復(fù)制代碼
5.單擊文件、生成***.dll,保存到C盤下,文件名為kgsPro.dll。

6.Dll生成完成,下面就是注冊(cè)的步驟了。

7.新建一個(gè)文本文檔,保存為AddDemo.reg,寫入如下的內(nèi)容
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Kingsoft\Office\WPS\Addins\kgsPro.AddCommand]
"FriendlyName"="WPS加載項(xiàng)Demo"
"Description"="Konguisheng的Demo系列之加載項(xiàng)"
"LoadBehavior"=dword:00000003
"CommandLineSafe"=dword:00000001

8.雙擊AddDemo.reg,將此導(dǎo)入到注冊(cè)表中。

9.單擊Windows的“運(yùn)行”,輸入regsvr32 C:\kgsPro.dll完成

10.如果要?jiǎng)h除這個(gè)加載項(xiàng)
A.新建一個(gè)文本文檔,保存為DeleteDemo.reg,寫入如下的內(nèi)容
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\Kingsoft\Office\WPS\Addins\kgsPro.AddCommand]
B.單擊Windows的“運(yùn)行”,regsvr32 /u C:\kgsPro.dll (此步不是必須)
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
我的dll封裝學(xué)習(xí)筆記(二)
OFFICE 的加載項(xiàng)(add in)(轉(zhuǎn))
Word的COM加載項(xiàng)開發(fā)指南
C#調(diào)用WPS的兩種方式
VBA生成Excel2003經(jīng)典菜單
二次開發(fā)之Hello World! - 二次開發(fā)和插件 - WPS Office官方論壇 ...
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服