bsp; For I = 0 To 4
TempPos = InStr(StartPos, Ctl.Tag, " ", vbTextCompare)
If TempPos > 0 Then
D(I) = Mid(Ctl.Tag, StartPos, TempPos - StartPos)
StartPos = TempPos + 1
Else
D(I) = 0
End If
' 根据比例设定 Control 的位置、大小、字型大小
Ctl.Move D(0) * ScaleX, D(1) * ScaleY, D(2) * ScaleX, D(3) * ScaleY
'Ctl.Width = D(2) * ScaleX
'Ctl.Height = D(3) * ScaleY
If ScaleX < ScaleY Then
Ctl.FontSize = D(4) * ScaleX
Else
Ctl.FontSize = D(4) * ScaleY
End If
Next I
Ctl.Visible = TempVisible
Next Ctl
On Error GoTo 0
For I = 0 To flxGridhistory.Cols - 1
flxGridhistory.ColWidth(I) = flxGridhistory.Width / 2 - 150
Next I
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
frmdengji.Show
End Sub
Private Sub Texta_Change()
flxGridhistory.Text = Texta.Text
End Sub
Private Sub Texta_LostFocus()
Dim j
If selrow = 1 And Caption = "初始登记窗口" Then
Command1.Enabled = True
End If
If selrow = 1 And Caption = "变更登记窗口" Then
Command4.Enabled = True
zdhao = flxGridhistory.TextMatrix(1, 1)
rs.FindFirst ("宗地号 = '" & zdhao & "'")
If rs.NoMatch Then
Exit Sub
Else
zdhao1 = rs.Fields(0)
For j = 0 To flxGridhistory.Rows - 5
flxGridhistory.TextMatrix(j + 1, 1) = rs.Fields(j) & ""
Next j
End If
End If
End Sub
Private Sub Textb_Change()
flxGridhistory.Text = Textb.Text
End Sub
Private Sub Textb_KeyPress(KeyAscii As Integer)
If KeyAscii <= 45 Or KeyAscii = 47 Or KeyAscii >= 58 Then
KeyAscii = 0
End If
End Sub