我的窗口打开后本来就有计划在执行,文字移动。这个问题去年就问了,您帮人家搞了,说我的问题简单,不复杂。但一直未解决。窗口afterload事件代码为:
e.Form.BaseForm.TopMost = True
e.Form.TimerInterval = 1 '设定定时器周期为10/1000=0.01秒
e.Form.TimerEnabled = True ' 起动定时器
Dim lab3 As WinForm.Label = e.Form.Controls("Label3")
Dim lab4 As WinForm.Label = e.Form.Controls("Label4")
Dim lab5 As WinForm.Label = e.Form.Controls("Label5")
lab3.Left = -lab3.Width
lab4.Left = -lab4.Width
lab5.Left = lab5.Width
lab3.Text = "系统"
lab4.Text = "financial statement"
If UKey.Start() Then
Dim khs As String = UKey.ReadStr(0,50)
lab5.Text = khs
End If
If loginMode = True Then
e.Form.Text = "用户登录"
e.Form.Controls("Button1").Text = "登录"
e.Form.Controls("Button2").Text = "退出"
Else
e.Form.Text = "切换用户"
e.Form.Controls("Button1").Text = "切换"
e.Form.Controls("Button2").Text = "取消"
End If
'e.Form.BaseForm.FormBorderStyle = Windows.Forms.FormBorderStyle.None
'e.Form.AcceptButton = "Button1" ' -----按回车键的按钮
'e.Form.BaseForm.ShowInTaskBar = True '-----在任务栏显示此窗口---
'e.Form.Select()
'e.Form.Controls("TextBox1").Enabled = True
'e.Form.Controls("TextBox1").Select()
'e.Form.Controls("TextBox1").BaseControl.Focus()
'
e.Form.BaseForm.FormBorderStyle = Windows.Forms.FormBorderStyle.None
e.Form.AcceptButton = "Button1" ' -----按回车键的按钮
e.Form.BaseForm.ShowInTaskBar = True '-----在任务栏显示此窗口---
e.Form.BaseForm.TopMost = True
If e.Form.BaseForm.CanFocus Then e.Form.BaseForm.Focus()
e.Form.Controls("TextBox1").Enabled = True
e.Form.Controls("TextBox1").Select()
timetick事件代码为:
Dim lab3 As WinForm.Label = e.Form.Controls("label3")
Dim lab4 As WinForm.Label = e.Form.Controls("label4")
Dim lab5 As WinForm.Label = e.Form.Controls("label5")
Dim n1 As Boolean = False
Dim n2 As Boolean = False
Dim n3 As Boolean = False
If lab3.left > (e.Form.width - lab3.Width)/2 Then
lab3.left = (e.Form.width - lab3.Width)/2
n1 = True
Else
lab3.left += 1
End If
If lab4.left > (e.Form.width - lab4.Width)/2 Then
lab4.left = (e.Form.width - lab4.Width)/2
n2 = True
Else
lab4.left += 1
End If
If lab5.left < (e.Form.width - lab5.Width)/2 Then
lab5.left = (e.Form.width - lab5.Width)/2
n3 = True
Else
lab5.left -= 1
End If
If n1 = True And n2 = True And n3 = True Then
e.Form.TimerEnabled = False
劳驾帮忙解决,光标在窗口的TextBox1控件中闪烁,不用鼠标点击此控件,就不能输入字符的原因???????