用VB指令碼實現向右鍵選單新增快捷方式

2021-04-01 17:35:22 字數 867 閱讀 8805

'this is file extension the command

'should generate

filetype=".vbs"

'connect to wscript.shell registry access

set wshshell = createobject("wscript.shell")

'read in the name of vbs-section

prg = readreg("hkcr/"&tiletype&"/")

prgname = readreg("hkcr/"&prg&"/")

'ask for a new name

ask = "what should be the name for new vbscript script"

title="新建 vb 指令碼"

prgname = inputbox(ask,title,prgname)

wshshell.regwrite "hkcr/"&prg&"/",prgname

wshshell.regwrite "hkcr/"&filetype&"/shellnew/nullfile",""

function readreg(key)

on error resume next

readreg = wshshell.regread(key)

if err.number > 0 then

error = "error:registry-key"""&key&"""could not be found!!"

msgbox error.vbcritical

wscript.quit

end if

end function

用VB編寫ActiveX DLL實現ASP程式設計

dim testme 建立我們剛才編譯成功的元件,一旦建立這個元件,同時會在葉面輸出文字 activex dll元件已經被 建立了!set testme server.createobject first.test 呼叫元件的方法 testme.helloworld 登出元件,在登出的同時,會自動在...

用VB實現彩蝶飛舞

已從 版本發展到了 版本,其功能越來越完備 強大,不僅提供了輕鬆有趣的程式設計環境,而且控制元件技術的使用更是錦上添花。因此,在全世界範圍內特別是在我國 應用非常廣泛。本文通過兩幅蝴蝶的動畫設計 來說明在 中通過使用控制元件和新增少量 就能實現複雜的功能。介面的設計 在窗體 上,放置三個影象框控制元...

在windows系統下,用vb指令碼傳送郵

新建一個字尾名為vbs的檔案,把中文替換成對應的資訊後,雙擊即可傳送,內容檔案的編碼應為utf 8 namespace set email createobject cdo.message email.from 發件人地址 email.to 收件人地址 email.subject 測試 x 內容檔案...

SVN用指令碼實現開機啟動

由於最近運維部門對伺服器進行了一些操作,具體我也不太清楚,說是要維護,所以導致了svn的一個小問題,也就是svn的重啟。正常情況下,svn在配置完成後會進行啟動,然後由於伺服器長時間不會關機,所以大部分的時間是不需要配置的,但是本次有人說 傳不上去,也宕不下來,經過檢查是svn服務沒有成功啟動引起的...

VB6用API實現繁體簡體轉換

private declare function lcmapstring lib kernel32 alias lcmapstringa byval locale as long,byval dwmapflags as long,byval lpsrcstr as string,byval cchs...