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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 赤城县| 内丘县| 双城市| 札达县| 富锦市| 山东省| 横峰县| 重庆市| 红原县| 托里县| 黄山市| 福鼎市| 九江县| 高阳县| 五峰| 行唐县| 保山市| 德阳市| 隆昌县| 嘉定区| 来宾市| 台东县| 东台市| 金川县| 青川县| 合川市| 三穗县| 临泽县| 太保市| 普格县| 晋江市| 永新县| 航空| 错那县| 隆回县| 巴林左旗| 柘城县| 称多县| 辉县市| 沐川县| 甘孜县|