当前位置:编程学习 > asp >>

可拖动的无标题栏窗体

注意:要设置form的controlbox属性为false,

特别注意: form.text要设置为空,否则不会把标题栏去掉

Dim MousX As Integer

Dim MousY As Integer

Dim CurrX As Integer

Dim CurrY As Integer

 

 Public Sub myMouseDown(ByVal sender As Object, ByVal ex As MouseEventArgs) Handles MyBase.MouseDown

        If ex.Button = MouseButtons.Left Then

            如果是鼠标左键,则不捕获鼠标

            Me.Capture() = False

 

            获得鼠标坐标(相对于窗体)

            MousX = ex.X

        &nbs

补充:Web开发 , ASP.Net ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,