主题:急切求助:为何这种建立数组的方法提示错误??
xinying2005
[专家分:0] 发布于 2006-03-24 20:38:00
正常 dim txt() as textbox 可以
但是我编的自定义控件expllicit
dim e() as expllicit 就提示错误?
回复列表 (共7个回复)
沙发
xinying2005 [专家分:0] 发布于 2006-03-28 13:17:00
怎么没有人回答我????
板凳
calflyok [专家分:220] 发布于 2006-03-28 15:55:00
什么错误?
3 楼
xinying2005 [专家分:0] 发布于 2006-03-29 07:41:00
当书写程序dim e() as expllicit时, expllicit下方显示蓝线 。那就是有错误呗 但并没有提示具体什么错误。
谢谢帮助!!
4 楼
jobfish [专家分:110] 发布于 2006-04-05 04:49:00
拼写是否正确?
5 楼
packepeng [专家分:70] 发布于 2006-04-13 14:28:00
我觉得把代码发上来好些,有蓝线不一定是有错误,不知道能编译通过
6 楼
my engine [专家分:20] 发布于 2006-04-15 00:32:00
你编制完后有没有生成它,如果没有生成则可能会认为不存在。
如果e是默认元素,则e不能乱使用的.
哈哈 不是很懂. 只作为参考
7 楼
xinying2005 [专家分:0] 发布于 2006-04-19 10:31:00
代码如下::
Imports System.Drawing.Drawing2D
Public Class ellipsectl
Inherits System.Windows.Forms.UserControl
Private type As Boolean
Public Property pmark() As Boolean
Get
Return type
End Get
Set(ByVal Value As Boolean)
type = Value
End Set
End Property
Private ptimeE As Integer
Public Property ptime() As Integer
Get
Return ptimeE
End Get
Set(ByVal Value As Integer)
ptimeE = Value
End Set
End Property
Private timeE As Integer
Public Property time() As Integer
Get
Return timeE
End Get
Set(ByVal Value As Integer)
timeE = Value
End Set
End Property
‘windows窗体生成的代码 这里省略了
'画椭圆
Dim startX As Integer
Dim startY As Integer
Protected Sub ellipsectl_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim pen As New System.Drawing.Pen(System.Drawing.Color.Blue)
Dim sb As System.Drawing.Brush
sb = New SolidBrush(System.Drawing.Color.Green)
If type = True Then
e.Graphics.DrawEllipse(pen, startX, startY, Me.Width - 1, Me.Height - 1)
e.Graphics.FillEllipse(sb, New Rectangle(startX + Me.Width / 2 - 4, startY + Me.Height / 2 - 4, 8, 8))
Else
e.Graphics.DrawEllipse(pen, startX, startY, startX + Me.Width - 1, startY + Me.Height - 1)
End If
End Sub
'随时更新
Private Sub ellipsectl_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
Me.Refresh()
End Sub
Private Sub Timer1_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
Timer1.Interval = 1000
Me.Refresh()
End Sub
End Class
谢谢帮忙!!¥¥¥¥¥
我来回复