有源碼事例,還有說明.一看就明白, 一,把"HGB.dll"和"hgbguanligongcheng.dll"復制到系統(tǒng)文件夾"\WINDOWS\system32"下. 二,新建一VB標準EXE,在"工程\引用"下點擊瀏覽把"\WINDOWS\system32"下的"hgbguanligongcheng.dll" 引用進來. 三,在窗體里聲明一個對象變量yy Dim yy As New hgbguanlimokuai 再在任一事件下引用YY里的函數(shù)過程 i = yy.chongqi() 本過程執(zhí)行重啟動計算機,無返回值 ii=yy.guanji() 本過程執(zhí)行關(guān)閉計算機,無返回值 iii=yyy.huoquan() 本過程執(zhí)行獲得計算機管理權(quán),成功返回1,失敗返回0 注意: 生成exe文件在別的機上運行時要把兩個DLL文件復制到系統(tǒng)文件夾"\WINDOWS\system32"下,.因為exe 文件在運行時會用到那兩個DLL. 解釋: "hgbguanligongcheng.dll"文件里面有"hgbguanlimokuai"模塊 "hgbguanlimokuai"模塊里面有三個函數(shù)過程chongqi(),guanji(),huoquan() 我們聲明YY為"hgbguanlimokuai"模塊就等于在工程里加入了一個模塊當然就能 在任何其他事件引用模塊里的函數(shù)過程.
標簽: hgbguanligongcheng WINDOWSsystem dll HGB
上傳時間: 2013-12-19
上傳用戶:cuibaigao
Visual Basic 6.0可以通過調(diào)用API函數(shù)格式化一個磁盤,無論是軟盤還是硬盤。 打開一個新的項目(工程1) ,如果你沒有更改過缺省模式,那么Visual Basic 6.0會自動添加一個form1文件,在form1上添加一個命令控件,將下面的代碼拷入。 Option Explicit Private Declare Function SHFormatDrive Lib"shell32"( ByVal Hend AS Long,ByVal Drive AS Long,ByVal FormatID AS Long,ByVal Options AS Long) as Long Private Sub FormatDisk(intDrive as integer,blnQuickFormat as Boolean) Dim lngReturn As Long if (blnQuickFormat) then lngReturn= SHFormatDrive(0,intDrive,0&,1&) else lngReturn= SHFormatDrive(0,intDrive,0&,0&) end if end Sub Private Sub Command1_Click() call FormatDisk(0,True) End Sub 運行此程序。 注意FormatDisk函數(shù)的第一個變量很重要,他的值是0,1,2時代表格式化的分別是:A、B、C盤。
上傳時間: 2015-10-05
上傳用戶:kytqcool
利用WM5 實現(xiàn)電話功能 在程序中進行電話撥號 “項目”—“添加引用”—“Microsoft.WindowsMobile.Telephony”—“確定” Imports Microsoft.WindowsMobile.Telephony Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim TestPhone As New Phone TestPhone.Talk("1001") End Sub
標簽: Microsoft WindowsMobile Telephony Imports
上傳時間: 2013-12-20
上傳用戶:hasan2015
其中:ClientInfor.inf 文件: 第一行的數(shù)據(jù)表示: 客戶端游戲版本號 第一行的數(shù)據(jù)表示: 更新文件存放的網(wǎng)絡(luò)路徑 UpdateInfor.inf文件: 第一行的數(shù)據(jù)表示: 最新游戲版本號 第二行的數(shù)據(jù)表示: 有多少文件需要更新 后面每行的數(shù)據(jù)表示: 需要更新的文件的名稱 frmUpdate.frm窗體: 負責下載 modZip.BAS模塊: 只負責用來壓縮文件和解壓縮文件的 其中的 UnZipTo 函數(shù)用來解壓縮的 zlib.dll: 為WinZip的dll文件 更新完畢后,ClientInfor.inf文件的第一行的數(shù)據(jù)會變?yōu)樽钚掳姹咎? frmUpdate.frm窗體代碼如下: Private Sub cmdExit_Click() Unload Me End Sub Private Sub cmdUpdate_Click() Dim strClientInfor() As String Dim strUpdateInfor() As String Dim nNum As Integer 存
標簽: ClientInfor UpdateInfor inf 數(shù)據(jù)表示
上傳時間: 2013-12-24
上傳用戶:hanli8870
MirUnleashed vb.net Module modMainServer Public WithEvents Socket As New WinsockServer Public WithEvents StatusSocket As New WinsockServer Dim MonsterThread As New System.Threading.Thread(AddressOf MonsterProcess) Dim LastPacket As String =
標簽: modMainServer WinsockServer MirUnleashed WithEvents
上傳時間: 2016-02-21
上傳用戶:日光微瀾
{ OCSP REQUEST*req=NULL if ((req=OCSP一 REQUEST new())一NULL) goto err if (name) /* optional*/ f if (!(req->tbsRequest->requestorName=GENERAL-NAME_ new())) goto er req->tbsRequest->requestorName->type=GEN一 DIRNAME req->tbsRequest->requestorName->d.Dim=X509一 NAM幾dup(name) } if(!(req->tbsRequest->requestList=sk-OCSP ONEREQ_new(N〔幾L))) goto er if(extensions && (!(req->tbsRequest->requestExtensions = ext dup(extensions)))) goto er return req if (req) OCSP REQUEST free(req) return NULL ) 刀此函數(shù)用于一個新的合法的OCSP請求加入列表中
上傳時間: 2014-01-17
上傳用戶:lanjisu111
this program has many parts and fully working, based on MCS51. Hand made PWM and wave forms for Dimmer like output. it also drives ISD audio chip.
上傳時間: 2017-07-11
上傳用戶:xc216
asp實現(xiàn)限制一個ip只能訪問一次的方法 <% '///////////////////////////////////////////////////// '// // '//作用:一個IP地址只允許訪問本頁一次 // '//引用:<!-- #include file="Check_Ip.asp" --> // '// // '///////////////////////////////////////////////////// 'Response.Charset = 936 '設(shè)置輸出編碼為簡體中文 'Response.Buffer = false '關(guān)閉緩沖區(qū) Dim Fso,ts,IpList,Cfs '設(shè)置Cookies函數(shù) Function SetCookie() Response.Cookies("IsBrow") = "Brow" Response.Cookies("IsBrow").Expires = Date+365 End Function '記錄IP地址函數(shù) Function WriteIp(FileName, IpAddress) Set Fso = Server.CreateObject("Scripting.FileSystemObject") Set ts = Fso.OpenTextFile(Server.MapPath(FileName),8,true) ts.WriteLine IpAddress ts.Close Set ts = Nothing Set Fso = Nothing End Function '讀取IP地址函數(shù) Function ReadIpList(FileName) Set Fso = Server.CreateObject("Scripting.FileSystemObject") If Not Fso.FileExists(Server.MapPath(FileName)) Then CreateFile("Iplist.txt") Exit Function End If Set ts = Fso.OpenTextFile(Server.MapPath(FileName)) Iplist = ts.ReadAll ts.Close Set ts = Nothing Set Fso = Nothing ReadIpList = Iplist End Function '創(chuàng)建文件函數(shù) Function CreateFile(FileName) Set Fso = Server.CreateObject("Scripting.FileSystemObject") Set Cfs = Fso.CreateTextFile(Server.MapPath(FileName)) Cfs.Close Set Cfs = Nothing Set Fso = Nothing End Function '關(guān)閉當前IE窗口函數(shù)(注:IE6下通過,其他瀏覽器未測試) Function CloseWindow() 'Response.Write "<script>window.location='javascript:window.opener=null;window.close();'</script>" Response.Redirect "http://www.baidu.com" End Function Ip = Request.ServerVariables("REMOTE_ADDR") '獲取瀏覽者IP地址 Cookie = Request.Cookies("IsBrow") '獲取當前Cookies 'Response.Write Cookie If Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "" Then Response.Write "本站不允許使用代理訪問" Response.End() Else If Cookie = "Brow" Then CloseWindow() Else If Instr(ReadIpList("Iplist.txt"),Ip) <>0 Then CloseWindow() Else WriteIp "Iplist.txt" , Ip End If SetCookie() End If End If %>
上傳時間: 2016-07-14
上傳用戶:helei0915
PT4211-30V350mA高亮度LED恒流驅(qū)動器 ALTIUM AD設(shè)計硬件原理圖+PCB 工程文件 概述 PT4211是一款連續(xù)電感電流導通模式的降壓恒流源,專門針對用于驅(qū)動1-3顆串聯(lián)LED而設(shè)計。PT4211可接受的輸入電壓范圍從5伏到30伏,輸出電流可調(diào)至最大350mA。 PT4211 內(nèi)置功率開關(guān),采用高端電流采樣方式,通過一個外部電阻設(shè)定LED平均電流。專用調(diào)光Dim引腳可以接受寬范圍的PWM調(diào)光信號。當Dim的電壓低于0.4伏時,功率開關(guān)關(guān)斷,PT4211進入極低工作電流的待機狀態(tài)。 PT4211采用SOT23-5封裝。 關(guān)鍵特性極少的外部元器件輸入電壓范圍從5V到30V最大輸出350mA電流專用調(diào)光管腳可接受PWM調(diào)光3%的輸出電流精度LED開路自然保護高達93%的效率輸出可調(diào)的恒流控制方法軟過溫保護盡大可能減少高溫下LED閃爍
上傳時間: 2022-03-17
上傳用戶:
75W 1.4A PFC+DC-DC電路 。包括PFC和DC-DC兩部分。
上傳時間: 2022-03-28
上傳用戶:
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1