国产探花免费观看_亚洲丰满少妇自慰呻吟_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



發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 鹿泉市| 突泉县| 神池县| 墨玉县| 金溪县| 泰顺县| 阿拉尔市| 商河县| 云浮市| 安康市| 三原县| 湟中县| 灵川县| 罗山县| 浙江省| 齐齐哈尔市| 屏东县| 古蔺县| 甘孜| 清苑县| 林口县| 微山县| 年辖:市辖区| 康乐县| 商丘市| 池州市| 卫辉市| 广安市| 儋州市| 屯门区| 陆河县| 许昌县| 延川县| 阳曲县| 浠水县| 龙山县| 寻乌县| 乌拉特中旗| 西林县| 绥宁县| 岫岩|