Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 131,628 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,151 people online right now. Registration is fast and FREE... Join Now!




error in bold portion

 
Reply to this topicStart new topic

error in bold portion

prigupta2
post 11 Oct, 2008 - 02:53 AM
Post #1


New D.I.C Head

*
Joined: 11 Oct, 2008
Posts: 5

CODE
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
User is offlineProfile CardPM

Go to the top of the page


Damage
post 11 Oct, 2008 - 03:06 AM
Post #2


D.I.C Addict

Group Icon
Joined: 5 Jun, 2008
Posts: 728



Thanked 7 times

Dream Kudos: 75
My Contributions


what error?
User is offlineProfile CardPM

Go to the top of the page

prigupta2
post 12 Oct, 2008 - 09:28 PM
Post #3


New D.I.C Head

*
Joined: 11 Oct, 2008
Posts: 5

QUOTE(prigupta2 @ 11 Oct, 2008 - 03:53 AM) *

CODE
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
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/20/08 05:27AM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month