真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

vb.net窗體???vb中窗體是什么意思

vb.net在設(shè)計過程中,發(fā)現(xiàn)當(dāng)窗口化的窗體最大化后,里面的組件不能被放大~~

這個問題,如有可能你應(yīng)當(dāng)先把大的控件停靠在窗體的某部分,其他的控件用form的resize事件觸發(fā)控件寬高的數(shù)值或控件位置坐標(biāo)的數(shù)值。例:

創(chuàng)新互聯(lián)公司專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于做網(wǎng)站、成都網(wǎng)站建設(shè)、祁縣網(wǎng)絡(luò)推廣、小程序開發(fā)、祁縣網(wǎng)絡(luò)營銷、祁縣企業(yè)策劃、祁縣品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們最大的嘉獎;創(chuàng)新互聯(lián)公司為所有大學(xué)生創(chuàng)業(yè)者提供祁縣建站搭建服務(wù),24小時服務(wù)熱線:028-86922220,官方網(wǎng)址:www.cdcxhl.com

Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize

Dim pLabel1, pTextBox1, pButton1 As New Point

pLabel1.X = CInt(Me.Width / 7)

pLabel1.Y = CInt(Me.Height / 8) + 4

pTextBox1.X = CInt(Me.Width / 5)

pTextBox1.Y = CInt(Me.Height / 8)

pButton1.X = CInt(Me.Width / 3)

pButton1.Y = CInt(Me.Height / 8) - 1

Me.Label1.Location = pLabel1

Me.TextBox1.Location = pTextBox1

Me.Button1.Location = pButton1

End Sub

以上只是改變了控件的位置,如需改變控件的大小,重新定義計算控件的size屬性

VB.NET的窗體是通過什么屬性來控制在屏幕上的位置的?

.Top 和 .Left

.Top 是距離屏幕頂端的距離,也就是Y坐標(biāo)

.Left 是距離屏幕左邊的距離,也就是X坐標(biāo)

例如

Private?Sub?Form_Load()

With?Me

.Top?=?0

.Left?=?0

End?With

End?Sub

把自己的位置調(diào)到最左上角

vb.net窗體靠屏幕邊緣觸發(fā)事件

建立新的form,加入一個timer,interval設(shè)為100

Option Explicit

Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long

Private Type POINTAPI

X As Long

Y As Long

End Type

Dim p As POINTAPI

Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Private Const HWND_TOPMOST = -1

Private Const SWP_NOMOVE = H2

Private Const SWP_NOSIZE = H1

Private Sub Form_Load()

SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE '加載窗口是指定窗口在最頂層

Timer1.Enabled = True

End Sub

Private Sub Timer1_Timer()

On Error Resume Next

GetCursorPos p

If Me.Top = 0 Then 'form1 is not hide and form1's top is 0

'hide form

If p.Y Me.Height / 15 + Me.Top / 15 Or p.X Me.Width / 15 + Me.Left / 15 Or p.X Me.Left / 15 Then 'mouse is not over form1

Me.Top = 0 - Me.Height + 50

End If

'show form

If p.X Me.Left / 15 And p.X Me.Left / 15 + Me.Width / 15 And p.Y 3 Then 'mouse is over form

Me.Top = 0

End If

End If

If Me.Left = 0 Then ''form1 is not hide form1's left is 0

'hide form

If p.Y Me.Height / 15 + Me.Top / 15 Or p.Y Me.Top / 15 Or p.X Me.Width / 15 + Me.Left / 15 Then 'mouse is not over form1

Me.Left = 0 - Me.Width + 50

End If

'show form

If p.X 3 And p.Y Me.Top / 15 And p.Y Me.Height / 15 + Me.Top / 15 Then 'mouse is over form

Me.Left = 0

End If

End If

If Me.Left = Screen.Width - Me.Width Then

'hide form

If p.Y Me.Height / 15 + Me.Top / 15 Or p.Y Me.Top / 15 Or p.X Me.Left / 15 Then 'mouse is not over form1

Me.Left = Screen.Width - 50

End If

'show form

If p.X Screen.Width / 15 - 3 And p.Y Me.Top / 15 And p.Y Me.Height / 15 + Me.Top / 15 Then 'mouse is over form

Me.Left = Screen.Width - Me.Width

End If

End If

End Sub

VB.NET怎么做永遠(yuǎn)??吭谄聊簧系臇|西

本質(zhì)是一個不規(guī)則形狀的窗體,把窗體的 TopMost 屬性設(shè)為 True 即可。


本文名稱:vb.net窗體???vb中窗體是什么意思
分享網(wǎng)址:http://weahome.cn/article/ddopoee.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部