vb :请问各位大侠,以下代码每句都是什么意思呀.小弟才疏学浅,实在是不知道我.
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/08 23:04:06
vb :请问各位大侠,以下代码每句都是什么意思呀.小弟才疏学浅,实在是不知道我.
Private FormOldWidth As Long
Private FormOldHeight As Long
Public Sub resizeinit(FormName As Form)
Dim Obj As Control
FormOldWidth = FormName.ScaleWidth
FormOldHeight = FormName.ScaleHeight
On Error Resume Next
For Each Obj In FormName
Obj.Tag = Obj.Left & " " & Obj.Top & " " & Obj.Width & " " & Obj.Height & " "
Next Obj
On Error GoTo 0
End Sub
Public Sub ResizeForm(FormName As Form)
Dim Pos(4) As Double
Dim i As Long,TempPos As Long,StartPos As Long
Dim Obj As Control
Dim ScaleX As Double,ScaleY As Double
ScaleX = FormName.ScaleWidth / FormOldWidth
ScaleY = FormName.ScaleHeight / FormOldHeight
On Error Resume Next
For Each Obj In FormName
StartPos = 1
For i = 0 To 4
TempPos = InStr(StartPos,Obj.Tag," ",vbTextCompare)
If TempPos > 0 Then
Pos(i) = Mid(Obj.Tag,StartPos,TempPos - StartPos)
StartPos = TempPos + 1
Else
Pos(i) = 0
End If
Obj.Move Pos(0) * ScaleX,Pos(1) * ScaleY,Pos(2) * ScaleX,Pos(3) * ScaleY
Next i
Next Obj
On Error GoTo 0
End Sub
Private Sub Form_Resize()
Call ResizeForm(Me)
End Sub
Private FormOldWidth As Long
Private FormOldHeight As Long
Public Sub resizeinit(FormName As Form)
Dim Obj As Control
FormOldWidth = FormName.ScaleWidth
FormOldHeight = FormName.ScaleHeight
On Error Resume Next
For Each Obj In FormName
Obj.Tag = Obj.Left & " " & Obj.Top & " " & Obj.Width & " " & Obj.Height & " "
Next Obj
On Error GoTo 0
End Sub
Public Sub ResizeForm(FormName As Form)
Dim Pos(4) As Double
Dim i As Long,TempPos As Long,StartPos As Long
Dim Obj As Control
Dim ScaleX As Double,ScaleY As Double
ScaleX = FormName.ScaleWidth / FormOldWidth
ScaleY = FormName.ScaleHeight / FormOldHeight
On Error Resume Next
For Each Obj In FormName
StartPos = 1
For i = 0 To 4
TempPos = InStr(StartPos,Obj.Tag," ",vbTextCompare)
If TempPos > 0 Then
Pos(i) = Mid(Obj.Tag,StartPos,TempPos - StartPos)
StartPos = TempPos + 1
Else
Pos(i) = 0
End If
Obj.Move Pos(0) * ScaleX,Pos(1) * ScaleY,Pos(2) * ScaleX,Pos(3) * ScaleY
Next i
Next Obj
On Error GoTo 0
End Sub
Private Sub Form_Resize()
Call ResizeForm(Me)
End Sub
gxhbsx
vb :请问各位大侠,以下代码每句都是什么意思呀.小弟才疏学浅,实在是不知道我.
请问各位大侠,以下代码每句都是什么意思呀.小弟才疏学浅,实在是不知道我.
有于才疏学浅、小弟确实不知道是什么意思、还请大家踊跃发言、不要灌水`!
请各位大侠教教小弟以下题目:
老师布置的英语作文,实在是不会,现在求各位英语大侠帮帮小弟...知道的请速度回复...明早要收
水鱼煲龟这句话是什么意思 小弟才疏学浅请各位达人、朋友告诉小弟
超级电容选用小弟有一辆电动自行车,电池是48V,23AH,想配(并联)一个超级电容器使用,小弟才疏学浅,请问各位大虾选多
小弟才疏学浅 寻求高手帮我翻译 速度呀!‘‘
才疏学浅看不懂,请问各位这是哪首诗
小弟才疏学浅,请问这两个词怎么说
各位大哥大姐,小弟是学政治的,但是我不知道如何更好的记忆知识点,
请问每句代码的意思是什么?