2 Replies - 928 Views - Last Post: 12 October 2008 - 10:28 PM Rate Topic: -----

#1 prigupta2  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 11-October 08

error in bold portion

Post icon  Posted 11 October 2008 - 03:53 AM

Sub AdjustDWLScale(ByRef DrawControl As System.Windows.Forms.Control, ByRef szColumn1 As String, ByRef szColumn2 As String)
		Dim DrawFact As Object
		Dim szSearch As Object
		Dim NMAXX As Single
		Dim NMAXY As Single
		Dim NMINX As Single
		Dim NMINY As Single
		Dim Dc As DAO.Recordset
		Dim DCC As DAO.Recordset
		Dc = CurDb.OpenRecordset("Columns", DAO.RecordsetTypeEnum.dbOpenDynaset)
		DCC = CurDb.OpenRecordset("Columns", DAO.RecordsetTypeEnum.dbOpenDynaset)
		szSearch = "CName='" & szColumn1 & "'"
		Dc.FindFirst(szSearch)
		szSearch = "CName='" & szColumn2 & "'"
		DCC.FindFirst(szSearch)
		If Dc.Fields(4).Value > DCC.Fields(4).Value Then
			NMAXX = Dc.Fields(4).Value
			NMINX = DCC.Fields(4).Value
			Drawscale = System.Math.Abs(Dc.Fields(4).Value - DCC.Fields(4).Value) + 2 * JUSTFACT
			DrawFact = Drawscale / 2
			DrawControl.Scale((NMINX - JUSTFACT, Dc.Fields(5).Value + DrawFact) - (NMAXX + JUSTFACT, DCC.Fields(5) - DrawFact))
		Else
			If Dc.Fields(4).Value < DCC.Fields(4).Value Then
				NMAXX = DCC.Fields(4).Value
				NMINX = Dc.Fields(4).Value
				Drawscale = System.Math.Abs(Dc.Fields(4).Value - DCC.Fields(4).Value) + 2 * JUSTFACT
				DrawFact = Drawscale / 2
			  [b]  DrawControl.Scale((NMINX - JUSTFACT, Dc.Fields(5).Value + DrawFact) - (NMAXX + JUSTFACT, DCC.Fields(5) - DrawFact))[/b]
			End If
		End If
		If Dc.Fields(5).Value > DCC.Fields(5).Value Then
			NMAXY = Dc.Fields(5).Value
			NMINY = DCC.Fields(5).Value
			Drawscale = System.Math.Abs(Dc.Fields(5).Value - DCC.Fields(5).Value) + 2 * JUSTFACT
			DrawFact = Drawscale / 2
			[b]DrawControl.Scale((Dc.Fields(4) - DrawFact, NMAXY + JUSTFACT) - (DCC.Fields(4).Value + DrawFact, NMINY - JUSTFACT))[/b]
		Else
			If Dc.Fields(5).Value < DCC.Fields(5).Value Then
				NMAXY = DCC.Fields(5).Value
				NMINY = Dc.Fields(5).Value
				Drawscale = System.Math.Abs(Dc.Fields(5).Value - DCC.Fields(5).Value) + 2 * JUSTFACT
				DrawFact = Drawscale / 2
			   [b] DrawControl.Scale((Dc.Fields(4) - DrawFact, NMAXY + JUSTFACT) - (DCC.Fields(4).Value + DrawFact, NMINY - JUSTFACT))[/b]			End If
		End If
		'DWMax = IIf(nMaxX > nMaxY, nMaxX, nMaxY)
		'DWMin = IIf(nMinX < nMinY, nMinX, nMinY)
		   [b]DrawControl.Scale (DWMin - JUSTFACT, DWMax + JUSTFACT)-(DWMax + JUSTFACT, DWMin - JUSTFACT)
			DrawControl.Scale (nMinX - JUSTFACT, nMaxY + JUSTFACT)-(nMaxX + JUSTFACT, nMinY - JUSTFACT)[/b]
	End Sub


error in bold portion

Is This A Good Question/Topic? 0
  • +

Replies To: error in bold portion

#2 Damage  Icon User is offline

  • Lord of Schwing
  • member icon

Reputation: 51
  • View blog
  • Posts: 1,179
  • Joined: 05-June 08

Re: error in bold portion

Posted 11 October 2008 - 04:06 AM

what error?
Was This Post Helpful? 0
  • +
  • -

#3 prigupta2  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 11-October 08

Re: error in bold portion

Posted 12 October 2008 - 10:28 PM

View Postprigupta2, on 11 Oct, 2008 - 03:53 AM, said:

Sub AdjustDWLScale(ByRef DrawControl As System.Windows.Forms.Control, ByRef szColumn1 As String, ByRef szColumn2 As String)
		Dim DrawFact As Object
		Dim szSearch As Object
		Dim NMAXX As Single
		Dim NMAXY As Single
		Dim NMINX As Single
		Dim NMINY As Single
		Dim Dc As DAO.Recordset
		Dim DCC As DAO.Recordset
		Dc = CurDb.OpenRecordset("Columns", DAO.RecordsetTypeEnum.dbOpenDynaset)
		DCC = CurDb.OpenRecordset("Columns", DAO.RecordsetTypeEnum.dbOpenDynaset)
		szSearch = "CName='" & szColumn1 & "'"
		Dc.FindFirst(szSearch)
		szSearch = "CName='" & szColumn2 & "'"
		DCC.FindFirst(szSearch)
		If Dc.Fields(4).Value > DCC.Fields(4).Value Then
			NMAXX = Dc.Fields(4).Value
			NMINX = DCC.Fields(4).Value
			Drawscale = System.Math.Abs(Dc.Fields(4).Value - DCC.Fields(4).Value) + 2 * JUSTFACT
			DrawFact = Drawscale / 2
			DrawControl.Scale((NMINX - JUSTFACT, Dc.Fields(5).Value + DrawFact) - (NMAXX + JUSTFACT, DCC.Fields(5) - DrawFact))
		Else
			If Dc.Fields(4).Value < DCC.Fields(4).Value Then
				NMAXX = DCC.Fields(4).Value
				NMINX = Dc.Fields(4).Value
				Drawscale = System.Math.Abs(Dc.Fields(4).Value - DCC.Fields(4).Value) + 2 * JUSTFACT
				DrawFact = Drawscale / 2
			  [b]  DrawControl.Scale((NMINX - JUSTFACT, Dc.Fields(5).Value + DrawFact) - (NMAXX + JUSTFACT, DCC.Fields(5) - DrawFact))[/b]
			End If
		End If
		If Dc.Fields(5).Value > DCC.Fields(5).Value Then
			NMAXY = Dc.Fields(5).Value
			NMINY = DCC.Fields(5).Value
			Drawscale = System.Math.Abs(Dc.Fields(5).Value - DCC.Fields(5).Value) + 2 * JUSTFACT
			DrawFact = Drawscale / 2
			[b]DrawControl.Scale((Dc.Fields(4) - DrawFact, NMAXY + JUSTFACT) - (DCC.Fields(4).Value + DrawFact, NMINY - JUSTFACT))[/b]
		Else
			If Dc.Fields(5).Value < DCC.Fields(5).Value Then
				NMAXY = DCC.Fields(5).Value
				NMINY = Dc.Fields(5).Value
				Drawscale = System.Math.Abs(Dc.Fields(5).Value - DCC.Fields(5).Value) + 2 * JUSTFACT
				DrawFact = Drawscale / 2
			   [b] DrawControl.Scale((Dc.Fields(4) - DrawFact, NMAXY + JUSTFACT) - (DCC.Fields(4).Value + DrawFact, NMINY - JUSTFACT))[/b]			End If
		End If
		'DWMax = IIf(nMaxX > nMaxY, nMaxX, nMaxY)
		'DWMin = IIf(nMinX < nMinY, nMinX, nMinY)
		   [b]DrawControl.Scale (DWMin - JUSTFACT, DWMax + JUSTFACT)-(DWMax + JUSTFACT, DWMin - JUSTFACT)
			DrawControl.Scale (nMinX - JUSTFACT, nMaxY + JUSTFACT)-(nMaxX + JUSTFACT, nMinY - JUSTFACT)[/b]
	End Sub


error in bold portion

Scale is not a member of System.Windows.Forms.Control
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1