国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

在.NET中使用API的方法

2024-07-10 13:08:03
字體:
來源:轉載
供稿:網友
在.net中使用api的方法
www.yescnet.com cnet中文網

可能說vb.net是一個令人恨又令愛的編程軟件,新版的.net不像vb6那樣多的支持api調用,好不容易在msdn中找到的使用api的方法,代碼如下:
[visual basic]
setlasterror := true, charset := charset.unicode, _
exactspelling := true, _
callingconvention := callingconvention.stdcall)> _
public shared function movefile(src as string, dst as string) as boolean
' leave function empty - dllimport attribute forces calls to movefile to
' be forwarded to movefilew in kernel32.dll
end function
這是調用kernel中的movefile函數,在dllimport中必須聲明要調用的函數庫明,如kernel32,user32,gdi32等,entrypoint為要調用函數名.
下面是調用showwindow函數的實例:
setlasterror:=true, charset:=charset.unicode, _
exactspelling:=true, _
callingconvention:=callingconvention.stdcall)> _
public shared function showwindow(byval hwne as integer,_
byval ncmdshow as integer) as integer

end function
順便說一句,在.net中使用從前vb6中hwnd屬性的方法是:
me.handle.toint32



發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 沧源| 庆安县| 海兴县| 德钦县| 白山市| 恩平市| 阿合奇县| 南丰县| 凤山县| 广州市| 荆门市| 三原县| 崇阳县| 泰州市| 敦煌市| 上饶市| 娱乐| 曲阜市| 海门市| 巧家县| 青河县| 杨浦区| 来凤县| 龙胜| 长丰县| 莱州市| 璧山县| 芦山县| 儋州市| 合川市| 高淳县| 建水县| 崇州市| 介休市| 沙雅县| 宣城市| 甘肃省| 和林格尔县| 清原| 沽源县| 乌什县|