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

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

vb.net子控件 vb基本控件

VB.NET控件縮放的問題

jbp4b9ae4a2e8 ,你真是刷分大王!

成都網(wǎng)站制作、成都做網(wǎng)站,成都做網(wǎng)站公司-創(chuàng)新互聯(lián)已向1000多家企業(yè)提供了,網(wǎng)站設(shè)計(jì),網(wǎng)站制作,網(wǎng)絡(luò)營銷等服務(wù)!設(shè)計(jì)與技術(shù)結(jié)合,多年網(wǎng)站推廣經(jīng)驗(yàn),合理的價(jià)格為您打造企業(yè)品質(zhì)網(wǎng)站。

經(jīng)驗(yàn)值 財(cái)富值 采納率 提問數(shù) 回答數(shù) 精彩回答 贊同數(shù) 經(jīng)驗(yàn)數(shù)

938574 965990 0% 78441 0 0 0 0

vb.net如何調(diào)用窗體之間的控件

Public Class ks

Inherits System.Windows.Forms.Form

#Region " Windows 窗體設(shè)計(jì)器生成的代碼 "

Public Sub New()

MyBase.New()

'該調(diào)用是 Windows 窗體設(shè)計(jì)器所必需的。

InitializeComponent()

'在 InitializeComponent() 調(diào)用之后添加任何初始化

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 窗體設(shè)計(jì)器所必需的

Private components As System.ComponentModel.IContainer

'注意: 以下過程是 Windows 窗體設(shè)計(jì)器所必需的

'可以使用 Windows 窗體設(shè)計(jì)器修改此過程。

'不要使用代碼編輯器修改它。

Friend WithEvents tx As System.Windows.Forms.TextBox

Friend WithEvents ty As System.Windows.Forms.TextBox

Friend WithEvents tz As System.Windows.Forms.TextBox

Friend WithEvents ok As System.Windows.Forms.Button

Friend WithEvents l1 As System.Windows.Forms.Label

Friend WithEvents l2 As System.Windows.Forms.Label

Friend WithEvents l3 As System.Windows.Forms.Label

System.Diagnostics.DebuggerStepThrough() Private Sub InitializeComponent()

Me.l1 = New System.Windows.Forms.Label

Me.l2 = New System.Windows.Forms.Label

Me.l3 = New System.Windows.Forms.Label

Me.tx = New System.Windows.Forms.TextBox

Me.ty = New System.Windows.Forms.TextBox

Me.tz = New System.Windows.Forms.TextBox

Me.ok = New System.Windows.Forms.Button

Me.SuspendLayout()

'

'l1

'

Me.l1.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(192, Byte), CType(255, Byte))

Me.l1.Location = New System.Drawing.Point(8, 8)

Me.l1.Name = "l1"

Me.l1.Size = New System.Drawing.Size(200, 16)

Me.l1.TabIndex = 0

'

'l2

'

Me.l2.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(192, Byte), CType(255, Byte))

Me.l2.Location = New System.Drawing.Point(8, 32)

Me.l2.Name = "l2"

Me.l2.Size = New System.Drawing.Size(200, 16)

Me.l2.TabIndex = 1

'

'l3

'

Me.l3.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(192, Byte), CType(255, Byte))

Me.l3.Location = New System.Drawing.Point(8, 56)

Me.l3.Name = "l3"

Me.l3.Size = New System.Drawing.Size(200, 16)

Me.l3.TabIndex = 2

'

'tx

'

Me.tx.Location = New System.Drawing.Point(8, 80)

Me.tx.Name = "tx"

Me.tx.Size = New System.Drawing.Size(200, 25)

Me.tx.TabIndex = 3

Me.tx.Text = "請(qǐng)輸入x"

'

'ty

'

Me.ty.Location = New System.Drawing.Point(8, 104)

Me.ty.Name = "ty"

Me.ty.Size = New System.Drawing.Size(200, 25)

Me.ty.TabIndex = 4

Me.ty.Text = "請(qǐng)輸入y"

'

'tz

'

Me.tz.Location = New System.Drawing.Point(8, 128)

Me.tz.Name = "tz"

Me.tz.Size = New System.Drawing.Size(200, 25)

Me.tz.TabIndex = 5

Me.tz.Text = "請(qǐng)輸入z"

'

'ok

'

Me.ok.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(192, Byte), CType(255, Byte))

Me.ok.Location = New System.Drawing.Point(8, 160)

Me.ok.Name = "ok"

Me.ok.Size = New System.Drawing.Size(200, 64)

Me.ok.TabIndex = 6

Me.ok.Text = "ok"

'

'ks

'

Me.AutoScaleBaseSize = New System.Drawing.Size(8, 18)

Me.BackColor = System.Drawing.Color.FromArgb(CType(128, Byte), CType(128, Byte), CType(255, Byte))

Me.ClientSize = New System.Drawing.Size(216, 232)

Me.Controls.Add(Me.ok)

Me.Controls.Add(Me.tz)

Me.Controls.Add(Me.ty)

Me.Controls.Add(Me.tx)

Me.Controls.Add(Me.l3)

Me.Controls.Add(Me.l2)

Me.Controls.Add(Me.l1)

Me.Name = "ks"

Me.Text = "考試"

Me.ResumeLayout(False)

End Sub

#End Region

Dim x, y, z, a, b, c, d, aa, bb, cc As Single

Dim tts, alls As Single

Private Sub ks_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

x = Int(1 + 30 * Rnd())

y = Int(1 + 20 * Rnd())

z = Int(1 + 25 * Rnd())

a = Int(2 + 4 * Rnd())

b = Int(1 + a * 2 * Rnd())

c = Int(1 + b * 2 * Rnd())

d = Int(1 + c * 3 * Rnd())

aa = x + y + z

bb = a * x + b * y + c * z

cc = b * x + c * y + d * z

l1.Text = "x+y+z=" Str(aa)

l2.Text = Str(a) "x+" Str(b) "y+" Str(c) "z=" Str(bb)

l3.Text = Str(b) "x+" Str(c) "y+" Str(d) "z=" Str(cc)

End Sub

Private Sub ok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ok.Click

If Val(tx.Text) = x And Val(ty.Text) = y And Val(tz.Text) = z Then

tts = tts + 1

End If

alls = alls + 1

tx.Text = ""

ty.Text = ""

tz.Text = ""

x = Int(1 + (1000 ^ 0.5) * Rnd())

y = Int(1 + (10000 ^ 0.4) * Rnd())

z = Int(1 + (100000 ^ 0.3) * Rnd())

a = Int(2 + 4 * Rnd())

b = Int(1 + a * 2 * Rnd())

c = Int(1 + b * 2 * Rnd())

d = Int(1 + c * 3 * Rnd())

aa = x + y + z

bb = a * x + b * y + c * z

cc = b * x + c * y + d * z

l1.Text = "x+y+z=" Str(aa)

l2.Text = Str(a) "x+" Str(b) "y+" Str(c) "z=" Str(bb)

l3.Text = Str(b) "x+" Str(c) "y+" Str(d) "z=" Str(cc)

End Sub

Private Sub ks_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Click

Dim lv As Single

If Not (alls = 0) Then

lv = Int(tts * 100000 / alls) / 1000

MsgBox(Str(lv) "%", , "正確率")

tx.Visible = False

ty.Visible = False

tz.Visible = False

ok.Visible = False

l1.Visible = False

l2.Visible = False

l3.Visible = False

Else

MsgBox("答題!", , "答題!")

End If

End Sub

End Class

VB.net如何實(shí)現(xiàn)點(diǎn)擊不同控件分別調(diào)用相同子窗體,以控件名稱動(dòng)態(tài)命名子窗體名稱

1,添加一個(gè)模塊,在模塊里聲明一個(gè)全局公共變量N;

2,在控件的調(diào)用窗體代碼段里,把此控件名稱給這個(gè)全局公共變量N賦值;

3,在窗體的Load()事件里,寫代碼: Me.Text = N。

VB.NET用panel裝子窗體時(shí)提示"無法將頂級(jí)控件添加到控件。"

窗體默認(rèn)是頂級(jí)控件,不能添加到其他容器中

如果想將窗體像一般控件那樣添加進(jìn)容器中,需要將窗體的TopLevel屬性設(shè)為false

如下:

Dim

fir

As

New

Form2

fir.TopLevel

=

false

Me.Panel1.Controls.Add(fir)

VB.NET的控件問題 SOS~~~~~~~~~

FolderBrowserDialog可以實(shí)現(xiàn)

Windows 窗體編程

FolderBrowserDialog 組件概述(Windows 窗體)

請(qǐng)參見 發(fā)送反饋意見

Windows 窗體 FolderBrowserDialog 組件是用于瀏覽和選擇文件夾的模式對(duì)話框。也可以從 FolderBrowserDialog 組件內(nèi)創(chuàng)建新文件夾。

注意:

若要選擇文件而不是文件夾,請(qǐng)使用 OpenFileDialog 組件。

使用 ShowDialog 方法,可在運(yùn)行時(shí)顯示 FolderBrowserDialog 組件。設(shè)置 RootFolder 屬性可確定將出現(xiàn)在對(duì)話框的樹狀視圖中的頂級(jí)文件夾和任何子文件夾。在對(duì)話框顯示后,就可以使用 SelectedPath 屬性獲取所選文件夾的路徑。

將 FolderBrowserDialog 組件添加到窗體后,它就會(huì)出現(xiàn)在“Windows 窗體設(shè)計(jì)器”底部的欄中。

請(qǐng)參見

概念

如何:使用 Windows 窗體 FolderBrowserDialog 組件選擇文件夾

FolderBrowserDialog 組件(Windows 窗體)

參考

FolderBrowserDialog

上面是MSDN的幫助文檔,說的很清楚了

vb.net panel控件添加別的控件

其實(shí)只要往大的panel里添加小panel就不會(huì)出現(xiàn)上述情況,子控件的坐標(biāo)都是相對(duì)于父控件的,不應(yīng)該存在 "頁" 的概念.


網(wǎng)站名稱:vb.net子控件 vb基本控件
地址分享:http://weahome.cn/article/hpospd.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部