请帮助,滚动条更多问题。代码包括。 [英] Please help, more scrollbar questions. CODE INCLUDED.
问题描述
我为发布另一个滚动条问题而道歉。这是我的
代码。我想要的是在用户控件中从坐标
(0,0)到(宽度,高度)出现对角线,无论
用户是否自动控制用户控件(我要滚动的其他东西在
用户控件上,但这里没有包含任何内容。)
以下是重现我的步骤问题。
1.启动Visual Studio并使用Form1创建一个新的Windows
应用程序。
2.粘贴以下内容(记得包括
你的Windows窗体设计器生成的代码。
3.运行 - 说明在运行的程序中。
我正在使用Microsoft Development Environment 2003,版本7.1.3088。
我正在使用Microsoft .NET Framework 1.1,版本1.1.4322
感谢您对我的耐心。
Colin
公共类Form1
继承System.Windows.Forms.Form
''======================
''Windows窗体设计器生成的代码
'' (此处包含来自您的IDE的FORM1,不在此处发布)
''======================
公共类UserControl1
继承System.Windows.Forms.UserControl
受保护覆盖Sub OnPaint(ByVal p As PaintEventArgs)
MyBase.OnPaint(p)
p.Graphics.DrawLine(New Pen(Color.Black),_
clientRectangle.Width,_
ClientRectangle.Height,_
0,0)
End Sub
Private Sub UserControl1_Load(ByVal sender As System。对象,_
ByVal e As System.EventArgs)_
处理MyBase.Load
Me.BackColor = Color.Yellow
End Sub
End Class
Private Sub Form1_Load(ByVal sender As System.Object,_
ByVal e As System.EventArgs )处理MyBase.Load
Dim uc As New UserControl1
uc.Location = New Point(0,0)
uc.Size = New System.Drawing.Size(New Point(100,100))
uc.BackColor = Color.Yellow
uc .AutoScroll = True
uc.AutoScrollMinSize =新尺寸(New Point(200,300))
uc.Visible = True
Me。 Controls.Add(uc)
尺寸=新尺码(新点(300,300))
Dim lb作为新标签
lb.Location =新点(0,150)
lb.Size =新尺寸(290,80)
lb.Text =" 1.Move the滚动条,对角线不是不是 + _
"从(0,0)到(宽度,高度)绘制。 2.Minimize" + _
"这个表格。 3.恢复表格大小,现在是 + _
"行确实从(0,0)到(宽度,高度)。 " + _
为什么,为什么不是对角线和滚动后清除控制背景+
Me.Controls.Add(lb)
End Sub
结束班
I apologize for posting yet another scrollbar question. Here is my
code. All I want is for a diagonal line to appear from coordinates
(0,0) to (width,height) in a usercontrol regardless of whether the
user autoscrolls the usercontrol (other things that are on the
usercontrol I want to scroll, but haven''t included any here).
Here are the steps to reproduce my problem.
1. Launch Visual Studio and create a new Windows
application with "Form1".
2. Paste the following in (remember to include
your "Windows Form Designer generated code).
3. Run - instructions are in the program that runs.
I am using "Microsoft Development Environment 2003, Version 7.1.3088".
I am using "Microsoft .NET Framework 1.1, Version 1.1.4322"
Thank you for your patience with me.
Colin
Public Class Form1
Inherits System.Windows.Forms.Form
''======================
'' Windows Form Designer generated code
'' (INCLUDE HERE FOR FORM1 FROM YOUR IDE, NOT POSTED HERE)
''======================
Public Class UserControl1
Inherits System.Windows.Forms.UserControl
Protected Overrides Sub OnPaint(ByVal p As PaintEventArgs)
MyBase.OnPaint(p)
p.Graphics.DrawLine(New Pen(Color.Black), _
clientRectangle.Width, _
ClientRectangle.Height, _
0, 0)
End Sub
Private Sub UserControl1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Me.BackColor = Color.Yellow
End Sub
End Class
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim uc As New UserControl1
uc.Location = New Point(0, 0)
uc.Size = New System.Drawing.Size(New Point(100, 100))
uc.BackColor = Color.Yellow
uc.AutoScroll = True
uc.AutoScrollMinSize = New Size(New Point(200, 300))
uc.Visible = True
Me.Controls.Add(uc)
Size = New Size(New Point(300, 300))
Dim lb As New Label
lb.Location = New Point(0, 150)
lb.Size = New Size(290, 80)
lb.Text = "1.Move the scrollbars,the diagonal line isn''t" + _
" drawn from(0,0) to (width,height). 2.Minimize" + _
" this form. 3. Restore the form size,now the " + _
"line does go from (0,0) to (width,height). " + _
"Why, why isn''t the diagonal line and " + _
"control background cleared as you scroll?"
Me.Controls.Add(lb)
End Sub
End Class
推荐答案
接下来会发生什么?
Colin McGuire写道:
What happens then ?
Colin McGuire wrote:
我为发布另一个滚动条问题而道歉。这是我的代码。我想要的是在用户控件中从坐标
(0,0)到(宽度,高度)出现的对角线,无论
用户是否自动滚动用户控件(其他内容都在
usercontrol我想滚动,但这里没有任何内容。
以下是重现我的问题的步骤。
1.启动Visual Studio和使用Form1创建一个新的Windows
应用程序。
2.粘贴以下内容(记住包括
您的Windows窗体设计器生成的代码)。
3.运行 - 程序在运行的程序中。
我正在使用Microsoft Development Environment 2003,版本7.1.3088。
我正在使用Microsoft .NET Framework 1.1,版本1.1 .4322"
感谢您对我的耐心。
Colin
公共类Form1
继承System.Windows.Forms.Form >
''======================
''Windows窗体设计器生成代码
''(此处包含来自您的IDE的FORM1,不在此处发布)
''======================
公共类UserControl1
继承System.Windows.Forms.UserControl
受保护的覆盖Sub OnPaint(ByVal p As PaintEventArgs)
MyBase.OnPaint(p)
p .Graphics.DrawLine(New Pen(Color.Black),_
clientRectangle.Width,_
ClientRectangle.Height,_
0,0)
End Sub
Private Sub UserControl1_Load(ByVal sender As System.Object,_
ByVal e As System.EventArgs)_
处理MyBase.Load
Me.BackColor = Color.Yellow > End Sub
End Class
Private Sub Form1_Load(ByVal sender As System.Object,_
ByVal e As System.EventArgs)处理MyBase.Load
Dim uc作为新我们erControl1
uc.Location = New Point(0,0)
uc.Size = New System.Drawing.Size(New Point(100,100))
uc.BackColor = Color.Yellow
uc.AutoScroll = True
uc.AutoScrollMinSize =新尺寸(新点(200,300))
uc.Visible = True
Me.Controls.Add(uc)
尺寸=新尺寸(新点(300,300))
Dim lb作为新标签
lb.Location =新点(0,150)
lb.尺寸=新尺寸(290,80)
lb.Text =" 1.移动滚动条,对角线不是不是 + _
从(0,0)到(宽度,高度)绘制。 2.Minimize" + _
这个表格。 3.恢复表格大小,现在是 + _
行确实从(0,0)到(宽度,高度)。 " + _
为什么,为什么不是对角线和 + _
"控制背景在滚动时被清除?"
Me.Controls.Add(lb)
End Sub
End Class
I apologize for posting yet another scrollbar question. Here is my
code. All I want is for a diagonal line to appear from coordinates
(0,0) to (width,height) in a usercontrol regardless of whether the
user autoscrolls the usercontrol (other things that are on the
usercontrol I want to scroll, but haven''t included any here).
Here are the steps to reproduce my problem.
1. Launch Visual Studio and create a new Windows
application with "Form1".
2. Paste the following in (remember to include
your "Windows Form Designer generated code).
3. Run - instructions are in the program that runs.
I am using "Microsoft Development Environment 2003, Version 7.1.3088".
I am using "Microsoft .NET Framework 1.1, Version 1.1.4322"
Thank you for your patience with me.
Colin
Public Class Form1
Inherits System.Windows.Forms.Form
''======================
'' Windows Form Designer generated code
'' (INCLUDE HERE FOR FORM1 FROM YOUR IDE, NOT POSTED HERE)
''======================
Public Class UserControl1
Inherits System.Windows.Forms.UserControl
Protected Overrides Sub OnPaint(ByVal p As PaintEventArgs)
MyBase.OnPaint(p)
p.Graphics.DrawLine(New Pen(Color.Black), _
clientRectangle.Width, _
ClientRectangle.Height, _
0, 0)
End Sub
Private Sub UserControl1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Me.BackColor = Color.Yellow
End Sub
End Class
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim uc As New UserControl1
uc.Location = New Point(0, 0)
uc.Size = New System.Drawing.Size(New Point(100, 100))
uc.BackColor = Color.Yellow
uc.AutoScroll = True
uc.AutoScrollMinSize = New Size(New Point(200, 300))
uc.Visible = True
Me.Controls.Add(uc)
Size = New Size(New Point(300, 300))
Dim lb As New Label
lb.Location = New Point(0, 150)
lb.Size = New Size(290, 80)
lb.Text = "1.Move the scrollbars,the diagonal line isn''t" + _
" drawn from(0,0) to (width,height). 2.Minimize" + _
" this form. 3. Restore the form size,now the " + _
"line does go from (0,0) to (width,height). " + _
"Why, why isn''t the diagonal line and " + _
"control background cleared as you scroll?"
Me.Controls.Add(lb)
End Sub
End Class
你不会再让我谢谢了我希望:)
这里有一些关于我的问题的详细说明。
我看到的是:
1.当我通过点击in来移动垂直滚动条时
滚动条(即在向上箭头和向下箭头之间),
正确绘制对角线(下图)。
+ ------- --- +
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
+ ---------- +
2.当我点击向下箭头时垂直方向上的按钮
滚动条,对角线滚动,但我可以看到一个小的
位新对角线出现 - 有点像
+ --- \ ------- +
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| |
| |
| \ |
+ ----------- +
3.当我添加一个Debug.WriteLine(OnPaint)时)内部
OnPaint方法,都点击in滚动条
并单击滚动条的向上或向下箭头
出现产生OnPaint在IDE调试窗口中。
4.当我最小化这个(损坏的窗口,第2步),然后
再次最大化它,然后它正确地重绘
从(0,0)到(宽度,高度)的对角线如图所示
在步骤1中。
BTW:我在
$ b之前的原始帖子中忘记粘贴了
p.Graphics.Clear(BackColor)
$ b p.Graphics.DrawLine ....但是
如果我这样做没有任何区别。
谢谢
Colin
单身男人 <博**** @ Duck.net>在消息中写道
news:bl ********** @ hercules.btinternet.com ...
You''re not going to make me thank you again I hope :)
Here is some more elaboration of my problem.
What I see is:
1. When I move the vertical scrollbar by clicking "in"
the scrollbar (ie between the up arrow and down arrow),
the diagonal line is drawn properly (diagram below).
+----------+
|\ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \|
+----------+
2. When I click the "down arrow" button on the vertical
scrollbar, the diagonal scrolls, but I can see a tiny
bit of the new diagonal showing up - sort of looks like
+---\-------+
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \|
| |
| |
| \|
+-----------+
3. When I add a Debug.WriteLine("OnPaint") inside
the OnPaint method, both clicking "in" the scrollbar
and clicking the up or down arrow of the scrollbar
appear produce "OnPaint" in the IDE debug window.
4. When I minimise this (corrupted window, step 2), then
maximize it again, then it redraws properly with
the diagonal from (0,0) to (width,height) as shown
in Step 1.
BTW: I forgot to paste in the
p.Graphics.Clear(BackColor)
in my original post before the
p.Graphics.DrawLine .... but
it doesn''t make any difference if I do.
Thank you
Colin
"One Handed Man" <Bo****@Duck.net> wrote in message
news:bl**********@hercules.btinternet.com...
那会怎么样?
Colin McGuire写道:
What happens then ?
Colin McGuire wrote:
我为发布另一个滚动条问题而道歉。这是我的代码。我想要的是在用户控件中从坐标
(0,0)到(宽度,高度)出现的对角线,无论
用户是否自动滚动用户控件(其他内容都在
usercontrol我想滚动,但这里没有任何内容。
以下是重现我的问题的步骤。
1.启动Visual Studio和使用Form1创建一个新的Windows
应用程序。
2.粘贴以下内容(记住包括
您的Windows窗体设计器生成的代码)。
3.运行 - 程序在运行的程序中。
我正在使用Microsoft Development Environment 2003,版本7.1.3088。
我正在使用Microsoft .NET Framework 1.1,版本1.1 .4322"
感谢您对我的耐心。
Colin
公共类Form1
继承System.Windows.Forms.Form >
''======================
''Windows窗体设计器生成代码
''(此处包含来自您的IDE的FORM1,不在此处发布)
''======================
公共类UserControl1
继承System.Windows.Forms.UserControl
受保护的覆盖Sub OnPaint(ByVal p As PaintEventArgs)
MyBase.OnPaint(p)
p .Graphics.DrawLine(New Pen(Color.Black),_
clientRectangle.Width,_
ClientRectangle.Height,_
0,0)
End Sub
Private Sub UserControl1_Load(ByVal sender As System.Object,_
ByVal e As System.EventArgs)_
处理MyBase.Load
Me.BackColor = Color.Yellow > End Sub
End Class
Private Sub Form1_Load(ByVal sender As System.Object,_
ByVal e As System.EventArgs)处理MyBase.Load
Dim uc作为新我们erControl1
uc.Location = New Point(0,0)
uc.Size = New System.Drawing.Size(New Point(100,100))
uc.BackColor = Color.Yellow
uc.AutoScroll = True
uc.AutoScrollMinSize =新尺寸(新点(200,300))
uc.Visible = True
Me.Controls.Add(uc)
尺寸=新尺寸(新点(300,300))
Dim lb作为新标签
lb.Location =新点(0,150)
lb.尺寸=新尺寸(290,80)
lb.Text =" 1.移动滚动条,对角线不是不是 + _
从(0,0)到(宽度,高度)绘制。 2.Minimize" + _
这个表格。 3.恢复表格大小,现在是 + _
行确实从(0,0)到(宽度,高度)。 " + _
为什么,为什么不是对角线和 + _
"控制背景在滚动时被清除?"
Me.Controls.Add(lb)
End Sub
End Class
I apologize for posting yet another scrollbar question. Here is my
code. All I want is for a diagonal line to appear from coordinates
(0,0) to (width,height) in a usercontrol regardless of whether the
user autoscrolls the usercontrol (other things that are on the
usercontrol I want to scroll, but haven''t included any here).
Here are the steps to reproduce my problem.
1. Launch Visual Studio and create a new Windows
application with "Form1".
2. Paste the following in (remember to include
your "Windows Form Designer generated code).
3. Run - instructions are in the program that runs.
I am using "Microsoft Development Environment 2003, Version 7.1.3088".
I am using "Microsoft .NET Framework 1.1, Version 1.1.4322"
Thank you for your patience with me.
Colin
Public Class Form1
Inherits System.Windows.Forms.Form
''======================
'' Windows Form Designer generated code
'' (INCLUDE HERE FOR FORM1 FROM YOUR IDE, NOT POSTED HERE)
''======================
Public Class UserControl1
Inherits System.Windows.Forms.UserControl
Protected Overrides Sub OnPaint(ByVal p As PaintEventArgs)
MyBase.OnPaint(p)
p.Graphics.DrawLine(New Pen(Color.Black), _
clientRectangle.Width, _
ClientRectangle.Height, _
0, 0)
End Sub
Private Sub UserControl1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Me.BackColor = Color.Yellow
End Sub
End Class
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim uc As New UserControl1
uc.Location = New Point(0, 0)
uc.Size = New System.Drawing.Size(New Point(100, 100))
uc.BackColor = Color.Yellow
uc.AutoScroll = True
uc.AutoScrollMinSize = New Size(New Point(200, 300))
uc.Visible = True
Me.Controls.Add(uc)
Size = New Size(New Point(300, 300))
Dim lb As New Label
lb.Location = New Point(0, 150)
lb.Size = New Size(290, 80)
lb.Text = "1.Move the scrollbars,the diagonal line isn''t" + _
" drawn from(0,0) to (width,height). 2.Minimize" + _
" this form. 3. Restore the form size,now the " + _
"line does go from (0,0) to (width,height). " + _
"Why, why isn''t the diagonal line and " + _
"control background cleared as you scroll?"
Me.Controls.Add(lb)
End Sub
End Class
您需要在VScroll上重新绘制。您的用户控件继承自Scrollable
类,并且此事件受到保护,因此您继承了这一点,您应该能够添加处理程序并强制控件重新绘制。< Br $>
Colin McGuire写道:
You need to repaint on VScroll. Your user control inherits from Scrollable
class and this event is protected so as you have inherited this you should
be able to add a handler and force the control to repaint.
Colin McGuire wrote:
你不会再让我感谢你了我希望:)
>以下是我的问题的更详细说明。
我看到的是:
1.当我通过点击在中移动垂直滚动条时
滚动条(即向上箭头和向下箭头之间),正确绘制对角线(下图)。
+ ---------- +
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
+ ---------- +
2.当我点击向下箭头时垂直滚动条上的按钮,对角线滚动,但我可以看到新对角线的一点点 - 显示出来 - 有点像
+ --- \ ------- +
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| |
| |
| \ |
+ ----------- +
3.当我在OnPaint中添加一个Debug.WriteLine(OnPaint)时方法,都点击在...滚动条
并单击滚动条的向上或向下箭头
出现产生OnPaint在IDE调试窗口中。
4.当我最小化这个(损坏的窗口,第2步),然后
再次最大化它,然后用
对角线重新绘制( 0,0)到(宽度,高度)如步骤1所示。
BTW:我忘了粘贴在
p.Graphics.Clear( BackColor)
在
p.Graphics.DrawLine之前我原来的帖子....但是如果我这样做没有任何区别。
谢谢
科林
一手汉语 <博**** @ Duck.net>在消息中写道
新闻:bl ********** @ hercules.btinternet.com ...
You''re not going to make me thank you again I hope :)
Here is some more elaboration of my problem.
What I see is:
1. When I move the vertical scrollbar by clicking "in"
the scrollbar (ie between the up arrow and down arrow),
the diagonal line is drawn properly (diagram below).
+----------+
|\ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \|
+----------+
2. When I click the "down arrow" button on the vertical
scrollbar, the diagonal scrolls, but I can see a tiny
bit of the new diagonal showing up - sort of looks like
+---\-------+
| \ |
| \ |
| \ |
| \ |
| \ |
| \ |
| \|
| |
| |
| \|
+-----------+
3. When I add a Debug.WriteLine("OnPaint") inside
the OnPaint method, both clicking "in" the scrollbar
and clicking the up or down arrow of the scrollbar
appear produce "OnPaint" in the IDE debug window.
4. When I minimise this (corrupted window, step 2), then
maximize it again, then it redraws properly with
the diagonal from (0,0) to (width,height) as shown
in Step 1.
BTW: I forgot to paste in the
p.Graphics.Clear(BackColor)
in my original post before the
p.Graphics.DrawLine .... but
it doesn''t make any difference if I do.
Thank you
Colin
"One Handed Man" <Bo****@Duck.net> wrote in message
news:bl**********@hercules.btinternet.com...
那么会发生什么?
Colin McGuire写道:
What happens then ?
Colin McGuire wrote:
我为发布另一个滚动条问题而道歉。这是我的代码。我想要的是在用户控件中从坐标
(0,0)到(宽度,高度)出现的对角线,无论
用户是否自动滚动用户控件(其他内容都在
usercontrol我想滚动,但这里没有任何内容。
以下是重现我的问题的步骤。
1.启动Visual Studio和使用Form1创建一个新的Windows
应用程序。
2.粘贴以下内容(记住包括
您的Windows窗体设计器生成的代码)。
3.运行 - 程序在运行的程序中。
我正在使用Microsoft Development Environment 2003,Version
7.1.3088。我正在使用Microsoft .NET Framework 1.1,版本
1.1.4322
感谢您对我的耐心。
Colin
公开Class Form1
继承System.Windows.Forms.Form
''======================
''Windows窗体设计器生成的代码
''(此处包含来自您的IDE的FORM1,不在此处发布)
''================== ====
公共类UserControl1
继承System.Windows.Forms.UserControl
受保护的覆盖Sub OnPaint(ByVal p As PaintEventArgs)
MyBase.OnPaint(p )
p.Graphics.DrawLine(New Pen(Color.Black),_
clientRectangle.Width,_
ClientRectangle.Height,_
0,0)
End Sub
Private Sub UserControl1_Load(ByVal sender As
System.Object,_ ByVal e As System.EventArgs) _
处理MyBase.Load
Me.BackColor = Color.Yellow
End Sub
End Class
Private Sub Form1_Load(ByVal sender As System.Object ,_
ByVal e As System.EventArgs)处理MyBase.Load
Dim uc As New UserControl1
uc.Location = New Point(0,0)
uc.Size = New System.Drawing.Size(New Point(100,100))
uc.BackColor = Color.Yellow
uc.AutoScroll = True
uc.AutoScrollMinSize = New Size(New Point(200, 300))
uc.Visible = True
Me.Controls.Add(uc)
尺寸=新尺寸(新点(300,300))
昏暗lb作为新标签
lb.Location =新点(0,150)
lb.Size =新尺寸(290,80)
lb.Text =" 1.移动滚动条,对角线不是不是 +
_"从(0,0)到(宽度,高度)绘制。
2.Minimize" + _"这个表格。 3.恢复表格大小,现在是 + _"行确实从(0,0)到
(宽度,高度)。 " + _为什么,为什么不是
对角线和滚动时清除+ _&控制背景
? Me.Controls.Add(lb)
End Sub
End Class
I apologize for posting yet another scrollbar question. Here is my
code. All I want is for a diagonal line to appear from coordinates
(0,0) to (width,height) in a usercontrol regardless of whether the
user autoscrolls the usercontrol (other things that are on the
usercontrol I want to scroll, but haven''t included any here).
Here are the steps to reproduce my problem.
1. Launch Visual Studio and create a new Windows
application with "Form1".
2. Paste the following in (remember to include
your "Windows Form Designer generated code).
3. Run - instructions are in the program that runs.
I am using "Microsoft Development Environment 2003, Version
7.1.3088". I am using "Microsoft .NET Framework 1.1, Version
1.1.4322"
Thank you for your patience with me.
Colin
Public Class Form1
Inherits System.Windows.Forms.Form
''======================
'' Windows Form Designer generated code
'' (INCLUDE HERE FOR FORM1 FROM YOUR IDE, NOT POSTED HERE)
''======================
Public Class UserControl1
Inherits System.Windows.Forms.UserControl
Protected Overrides Sub OnPaint(ByVal p As PaintEventArgs)
MyBase.OnPaint(p)
p.Graphics.DrawLine(New Pen(Color.Black), _
clientRectangle.Width, _
ClientRectangle.Height, _
0, 0)
End Sub
Private Sub UserControl1_Load(ByVal sender As
System.Object, _ ByVal e As System.EventArgs) _
Handles MyBase.Load
Me.BackColor = Color.Yellow
End Sub
End Class
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim uc As New UserControl1
uc.Location = New Point(0, 0)
uc.Size = New System.Drawing.Size(New Point(100, 100))
uc.BackColor = Color.Yellow
uc.AutoScroll = True
uc.AutoScrollMinSize = New Size(New Point(200, 300))
uc.Visible = True
Me.Controls.Add(uc)
Size = New Size(New Point(300, 300))
Dim lb As New Label
lb.Location = New Point(0, 150)
lb.Size = New Size(290, 80)
lb.Text = "1.Move the scrollbars,the diagonal line isn''t" +
_ " drawn from(0,0) to (width,height).
2.Minimize" + _ " this form. 3. Restore the form
size,now the " + _ "line does go from (0,0) to
(width,height). " + _ "Why, why isn''t the
diagonal line and " + _ "control background
cleared as you scroll?" Me.Controls.Add(lb)
End Sub
End Class
这篇关于请帮助,滚动条更多问题。代码包括。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!