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

首頁 > 編程 > .NET > 正文

顯示自定義動畫鼠標或彩色圖標(VB.net)

2024-07-10 13:00:43
字體:
來源:轉載
供稿:網友
,歡迎訪問網頁設計愛好者web開發。 

'//
'//顯示自定義動畫鼠標或彩色圖標
'//根據【孟子e章】的專欄c#代碼 http://blog.csdn.net/net_lover/archive/2004/10/22/146575.aspx
'//

'imports system.runtime.interopservices
imports system.reflection
public class form1
    inherits system.windows.forms.form

#region " windows 窗體設計器生成的代碼 "

    public sub new()
        mybase.new()

        '該調用是 windows 窗體設計器所必需的。
        initializecomponent()

        '在 initializecomponent() 調用之后添加任何初始化

    end sub

    '窗體重寫 dispose 以清理組件列表。
    protected overloads overrides sub dispose(byval disposing as boolean)
        if disposing then
            if not (components is nothing) then
                components.dispose()
            end if
        end if
        mybase.dispose(disposing)
    end sub

    'windows 窗體設計器所必需的
    private components as system.componentmodel.icontainer

    '注意: 以下過程是 windows 窗體設計器所必需的
    '可以使用 windows 窗體設計器修改此過程。
    '不要使用代碼編輯器修改它。
    friend withevents savedlg as system.windows.forms.savefiledialog
    <system.diagnostics.debuggerstepthrough()> private sub initializecomponent()
        me.savedlg = new system.windows.forms.savefiledialog
        '
        'form1
        '
        me.autoscalebasesize = new system.drawing.size(6, 14)
        me.clientsize = new system.drawing.size(360, 213)
        me.name = "form1"
        me.text = "form1"

    end sub

#end region

    declare function loadcursorfromfile lib "user32" alias "loadcursorfromfilea" _
    (byval lpfilename as string) as intptr

    private sub form1_load(byval sender as system.object, byval e as system.eventargs) handles mybase.load
        dim mycursor as new cursor(cursor.current.handle)
        'dinosau2.ani為windows自帶的光標:
        dim colorcursorhandle as intptr = loadcursorfromfile("../dinosau2.ani")

        mycursor.gettype().invokemember("handle", bindingflags.public or _
        bindingflags.nonpublic or bindingflags.instance or bindingflags.setfield, _
        nothing, mycursor, new object() {colorcursorhandle}) '

        me.cursor = mycursor
    end sub

end class

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 巨野县| 赞皇县| 吴江市| 丽水市| 峨山| 阜宁县| 思茅市| 兴化市| 简阳市| 石台县| 齐河县| 漯河市| 达州市| 加查县| 德阳市| 丹凤县| 博兴县| 盘山县| 故城县| 腾冲县| 浦城县| 聊城市| 贺州市| 鄂温| 京山县| 广元市| 崇阳县| 南投县| 高碑店市| 昌黎县| 阜城县| 道孚县| 武夷山市| 宁德市| 离岛区| 沾化县| 怀安县| 峡江县| 浠水县| 芦溪县| 庐江县|