자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다.
- 제품설치/등록 오류 문의: 설치/등록 Q&A 이용 (제품 구매 고객 한정)
Delphi 비주얼 베이직 소스 변경 문의 드립니다.
2013.03.15 23:37
안녕하세요?
아래 것은 비주얼 베이직 6 소스인데 델파이 XE로 변경 할려 합니다.
제가 비베는 잘 몰라서 그러는데 노란색 부분을 델파이XE로 변경할려는데 어떻게 해야 하나요?
변경 좀 부탁 드립니다.
감사합니다.
Private Sub Form_Load()
Dim max As Double
Dim min As Double
Dim matrix_dim As Double
Dim graph_data As ART_Graph
On Error GoTo Err:
graph_status = True
ade.WaferGraph graph_style, graph_file_name
graph_data = ade.Graph
Me.Caption = graph_data.path & graph_data.Name & " " & graph_data.Content
matrix_dim = UBound(graph_data.data, 1)
If Not no_error Then
SCALE_MAX = 2
End If
ReDim p(0 To matrix_dim, 0 To matrix_dim) As Variant
For t = 0 To matrix_dim
For W = 0 To matrix_dim
If (graph_data.data(t, W) = "-1,#IND") Or (graph_data.data(t, W) = "-1.#IND") Then
p(t, matrix_dim - W) = 0
Else
p(t, matrix_dim - W) = Format(graph_data.data(t, W) - graph_data.min, "0.000")
'?necessario il format, altrimenti F1 lascia dei buchi nella mappa se il numero ?troppo spinto
End If
Next W
Next t
With Me.WaferGraph
.chartType = VtChChartType3dSurface
.ChartData = p()
.Backdrop.Frame.style = VtFrameStyleNull
.Backdrop.Fill.style = VtFillStyleNull
.Plot.Wall.Pen.style = VtPenStyleNull
If graph_data.max - graph_data.min > SCALE_MAX Then
SCALE_MAX = graph_data.max - graph_data.min
End If
.Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
.Plot.Axis(VtChAxisIdY).ValueScale.Minimum = 0
.Plot.Axis(VtChAxisIdY).ValueScale.Maximum = SCALE_MAX
.Plot.Axis(VtChAxisIdY).ValueScale.MajorDivision = 10
.Plot.Axis(VtChAxisIdX).AxisScale.Hide = True
.Plot.Axis(VtChAxisIdY).AxisScale.Hide = False
.Plot.Axis(VtChAxisIdZ).AxisScale.Hide = True
.Plot.Axis(VtChAxisIdY2).AxisScale.Hide = True
.Plot.Axis(VtChAxisIdX).AxisGrid.MajorPen.style = VtPenStyleNull
.Plot.Axis(VtChAxisIdY).AxisGrid.MajorPen.style = VtPenStyleNull
.Plot.Axis(VtChAxisIdZ).AxisGrid.MajorPen.style = VtPenStyleNull
.Plot.Axis(VtChAxisIdY2).AxisGrid.MajorPen.style = VtPenStyleNull
.Plot.Elevation.Surface.RowWireframe = VtChSurfaceWireframeTypeMajor
.Plot.Elevation.Surface.ColWireframe = VtChSurfaceWireframeTypeNone
.Plot.PlotBase.BaseHeight = 0
.Plot.View3d.Rotation = 210
.Plot.View3d.Elevation = 30
.Plot.WidthToHeightRatio = 2.5
.Plot.DepthToHeightRatio = 2.5
.Plot.Elevation.Surface.DisplayType = VtChSurfaceDisplayTypeCBands
.Plot.Elevation.Contour.DisplayType = VtChContourDisplayTypeCBands
.Plot.Elevation.ColorType = VtChContourColorTypeManual
.Plot.Elevation.AutoValues = False
If graph_data.max - graph_data.min <= SCALE_MAX Then
Do While .Plot.Elevation.Attributes.count > 0
.Plot.Elevation.Attributes.Remove 1
Loop
For t = 0 To SCALE_MAX Step (SCALE_MAX / .Plot.Axis(VtChAxisIdY).ValueScale.MajorDivision)
.Plot.Elevation.Attributes.Add t
Next t
For t = 1 To .Plot.Elevation.Attributes.count
.Plot.Elevation.Attributes.Item(t).Brush.FillColor.Set 255, 255, 255
.Plot.Elevation.Attributes.Item(t).Brush.style = VtBrushStyleSolid
Debug.Print .Plot.Elevation.Attributes.Item(t).Value
Next t
End If
.Visible = True
End With
Exit Sub
Err:
If no_error Then
graph_status = False
Unload Me
Else
If ade.ErrorCode > 0 Then
Unload Me
Else
Err.Raise Err.Number
Resume
End If
End If
End Sub
Private Sub Form_Resize()
WaferGraph.Move 0, 0, ScaleWidth, ScaleHeight
End Sub
댓글 0
Delphi 비주얼 베이직 소스 변경 문의 드립니다.
2013.03.15 23:37
안녕하세요?
아래 것은 비주얼 베이직 6 소스인데 델파이 XE로 변경 할려 합니다.
제가 비베는 잘 몰라서 그러는데 노란색 부분을 델파이XE로 변경할려는데 어떻게 해야 하나요?
변경 좀 부탁 드립니다.
감사합니다.
Private Sub Form_Load()
Dim max As Double
Dim min As Double
Dim matrix_dim As Double
Dim graph_data As ART_Graph
On Error GoTo Err:
graph_status = True
ade.WaferGraph graph_style, graph_file_name
graph_data = ade.Graph
Me.Caption = graph_data.path & graph_data.Name & " " & graph_data.Content
matrix_dim = UBound(graph_data.data, 1)
If Not no_error Then
SCALE_MAX = 2
End If
ReDim p(0 To matrix_dim, 0 To matrix_dim) As Variant
For t = 0 To matrix_dim
For W = 0 To matrix_dim
If (graph_data.data(t, W) = "-1,#IND") Or (graph_data.data(t, W) = "-1.#IND") Then
p(t, matrix_dim - W) = 0
Else
p(t, matrix_dim - W) = Format(graph_data.data(t, W) - graph_data.min, "0.000")
'?necessario il format, altrimenti F1 lascia dei buchi nella mappa se il numero ?troppo spinto
End If
Next W
Next t
With Me.WaferGraph
.chartType = VtChChartType3dSurface
.ChartData = p()
.Backdrop.Frame.style = VtFrameStyleNull
.Backdrop.Fill.style = VtFillStyleNull
.Plot.Wall.Pen.style = VtPenStyleNull
If graph_data.max - graph_data.min > SCALE_MAX Then
SCALE_MAX = graph_data.max - graph_data.min
End If
.Plot.Axis(VtChAxisIdY).ValueScale.Auto = False
.Plot.Axis(VtChAxisIdY).ValueScale.Minimum = 0
.Plot.Axis(VtChAxisIdY).ValueScale.Maximum = SCALE_MAX
.Plot.Axis(VtChAxisIdY).ValueScale.MajorDivision = 10
.Plot.Axis(VtChAxisIdX).AxisScale.Hide = True
.Plot.Axis(VtChAxisIdY).AxisScale.Hide = False
.Plot.Axis(VtChAxisIdZ).AxisScale.Hide = True
.Plot.Axis(VtChAxisIdY2).AxisScale.Hide = True
.Plot.Axis(VtChAxisIdX).AxisGrid.MajorPen.style = VtPenStyleNull
.Plot.Axis(VtChAxisIdY).AxisGrid.MajorPen.style = VtPenStyleNull
.Plot.Axis(VtChAxisIdZ).AxisGrid.MajorPen.style = VtPenStyleNull
.Plot.Axis(VtChAxisIdY2).AxisGrid.MajorPen.style = VtPenStyleNull
.Plot.Elevation.Surface.RowWireframe = VtChSurfaceWireframeTypeMajor
.Plot.Elevation.Surface.ColWireframe = VtChSurfaceWireframeTypeNone
.Plot.PlotBase.BaseHeight = 0
.Plot.View3d.Rotation = 210
.Plot.View3d.Elevation = 30
.Plot.WidthToHeightRatio = 2.5
.Plot.DepthToHeightRatio = 2.5
.Plot.Elevation.Surface.DisplayType = VtChSurfaceDisplayTypeCBands
.Plot.Elevation.Contour.DisplayType = VtChContourDisplayTypeCBands
.Plot.Elevation.ColorType = VtChContourColorTypeManual
.Plot.Elevation.AutoValues = False
If graph_data.max - graph_data.min <= SCALE_MAX Then
Do While .Plot.Elevation.Attributes.count > 0
.Plot.Elevation.Attributes.Remove 1
Loop
For t = 0 To SCALE_MAX Step (SCALE_MAX / .Plot.Axis(VtChAxisIdY).ValueScale.MajorDivision)
.Plot.Elevation.Attributes.Add t
Next t
For t = 1 To .Plot.Elevation.Attributes.count
.Plot.Elevation.Attributes.Item(t).Brush.FillColor.Set 255, 255, 255
.Plot.Elevation.Attributes.Item(t).Brush.style = VtBrushStyleSolid
Debug.Print .Plot.Elevation.Attributes.Item(t).Value
Next t
End If
.Visible = True
End With
Exit Sub
Err:
If no_error Then
graph_status = False
Unload Me
Else
If ade.ErrorCode > 0 Then
Unload Me
Else
Err.Raise Err.Number
Resume
End If
End If
End Sub
Private Sub Form_Resize()
WaferGraph.Move 0, 0, ScaleWidth, ScaleHeight
End Sub