migration vb 6.0 to vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abhiraj Chauhan
    New Member
    • Oct 2008
    • 19

    migration vb 6.0 to vb.net

    Plz if any one can hlp me ,,i want to change this vb 6 code to vb.net after upgrading i had so much trouble about coordinate system changes in vb.net......... ...here is my code...
    [code=vbnet]
    Private Sub AddColumn(DrawS tr As String, szPos As String, DrawControl As Control)
    'drawstr contains name of column to be drawn
    'szpos contains name of column with respect to which the column is drawn
    'Add column to DrawControl
    Dim ds As Recordset
    Dim dss As Recordset
    Dim X As Single
    Dim Y As Single
    Set ds = CurDb.OpenRecor dset("Columns", dbOpenDynaset)
    Search = "Cname='" + DrawStr + "'" 'String to search for entry of column in drawstr
    ds.FindFirst Search
    Set dss = CurDb.OpenRecor dset("Columns", dbOpenDynaset)
    Csstr = "Cname='" + szPos + "'"
    dss.FindFirst Csstr

    X = ds(4)
    Y = ds(5)
    If X + JUSTFACT > DrawControl.Sca leLeft + DrawControl.Sca leWidth Or X - JUSTFACT < DrawControl.Sca leLeft Or Y + JUSTFACT > DrawControl.Sca leTop Or Y - JUSTFACT < DrawControl.Sca leTop + DrawControl.Sca leHeight Then
    If MainAdd Then
    Adjustmain
    Else
    Column_Draw DrawControl
    End If
    Exit Sub
    End If
    DrawControl.Lin e (dss(4), dss(5))-(ds(4), ds(5))
    FlushDistances ds, X, Y
    If StrComp(Left$(D rawStr, 1), "C") = 0 Then
    Select Case ds(1)
    Case "H"
    DrawControl.Lin e (X - ds(2) / 2, Y - ds(3) / 2)-(X + ds(2) / 2, Y + ds(3) / 2), , BF
    Case "C"
    DrawControl.Fil lStyle = 0
    DrawControl.Cir cle (X, Y), ds(2)
    DrawControl.Fil lStyle = 1
    End Select
    Else
    Select Case ds(1)
    Case "H"
    DrawControl.Lin e (X - ds(2) / 2, Y - ds(3) / 2)-(X + ds(2) / 2, Y + ds(3) / 2), , B
    End Select

    End If
    If Main Then
    Column_Dis ds(4) + ds(2) / 2, ds(5) - ds(3) / 2, ds(0), DrawControl
    End If
    ds.Close
    dss.Close
    'Stop
    'DrawDiagonal DrawControl
    End Sub[/code]
    Last edited by Frinavale; Oct 8 '08, 03:06 PM. Reason: added [code] tags
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    What problems are you having with your .NET code?

    -Frinny

    Comment

    • Abhiraj Chauhan
      New Member
      • Oct 2008
      • 19

      #3
      I don't have .net code

      Comment

      • Abhiraj Chauhan
        New Member
        • Oct 2008
        • 19

        #4
        i don't have .net code......I want to migrate my vb6.0 code to vb.net ....

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Originally posted by Abhiraj Chauhan
          i don't have .net code......I want to migrate my vb6.0 code to vb.net ....
          The experts on this site are more than happy to help you with your problems but they cannot implement your program for you. Attempt the program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

          -Frinny

          Comment

          Working...