Option Explicit Dim xDown As Double Dim yDown As Double Dim HisBeginFlag As Boolean Dim Lyr As MapXLib.Layer Dim LayerInfo As New MapXLib.LayerInfo Dim Flds As New MapXLib.Fields Dim Icount As Integer Dim Angle() As Double Dim RecordTime() As Date Dim StopFlag As Boolean Dim TempPnt As New Point Dim DisTemp As Double Dim DisSum As Double Private Sub Form_Load() Dim strsql As String Dim i As Integer Dim ResShowVehicle As ADODB.Recordset 'On Error Resume Next Set ResShowVehicle = New ADODB.Recordset strsql = select * from mapinfo where mapname=' & cSelectMapName & ' If CreateRecordSetbySQL_Tempdb(ResShowVehicle, strsql) Then If Not (ResShowVehicle.BOF And ResShowVehicle.EOF) Then fZoom = ResShowVehicle.Fields(zoom fCenterX = ResShowVehicle.Fields(fcenterx fCenterY = ResShowVehicle.Fields(fcentery End If End If Set ResShowVehicle = Nothing txtVehicle.Text = FrmHistory.cboVehicle.Text txtMap.Text = FrmHistory.cboMap.Text txtStart.Text = FrmHistory.txtYear(0) + - + FrmHistory.txtMonth(0) + - + FrmHistory.txtDay(0) + + FrmHistory.txtHour(0) + : + FrmHistory.txtMinute(0) + :00 txtEnd.Text = FrmHistory.txtYear(1) + - + FrmHistory.txtMonth(1) + - + FrmHistory.txtDay(1) + + FrmHistory.txtHour(1) + : + FrmHistory.txtMinute(1) + :00 HistoryMap.CreateCustomTool CreateCJTool, miToolTypePoly, miCrossCursor '设置默认工具 HistoryMap.CurrentTool = miArrowTool HistoryMap.MapUnit = miUnitMeter HistoryMap.Geoset = IIf(Right(cSelectMapPath, 1) = , cSelectMapPath, cSelectMapPath & + cSelectMapName HistoryMap.Zoom = fZoom HistoryMap.CenterX = fCenterX HistoryMap.CenterY = fCenterY TxtDataTime.Text = CStr(Year(Date)) + 年 + CStr(Month(Date)) + 月 + CStr(Day(Date)) + 日 + + CStr(Hour(Time)) + 时 + CStr(Minute(Time)) + 分 + CStr(Second(Time)) + 秒 StopFlag = False Toolbar1.Buttons(10).Enabled = False Toolbar1.Buttons(11).Enabled = False TimerShowMap.Interval = Slider.Value * 50 End Sub (责任编辑:admin) |