cnjmorris Posted September 20, 2003 Posted September 20, 2003 Here is the function along with the errors. I tried looking at the error messages and don't understand what is necessary to make this workable. Public Sub DoGradient(ByRef FormName As Object) Dim BF As Object On Error Resume Next '============================================================ ' '============================================================ Dim i, y As Short 'UPGRADE_WARNING: Couldn't resolve default property of object FormName.AutoRedraw. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1037"' FormName.AutoRedraw = True 'UPGRADE_WARNING: Couldn't resolve default property of object FormName.DrawStyle. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1037"' FormName.DrawStyle = 6 'UPGRADE_WARNING: Couldn't resolve default property of object FormName.DrawMode. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1037"' FormName.DrawMode = 13 'UPGRADE_WARNING: Couldn't resolve default property of object FormName.DrawWidth. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1037"' FormName.DrawWidth = 13 'UPGRADE_WARNING: Couldn't resolve default property of object FormName.ScaleMode. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1037"' FormName.ScaleMode = 3 'UPGRADE_WARNING: Couldn't resolve default property of object FormName.ScaleHeight. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1037"' FormName.ScaleHeight = 256 For i = 0 To 510 'UPGRADE_WARNING: Couldn't resolve default property of object FormName.Width. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1037"' 'UPGRADE_WARNING: Couldn't resolve default property of object FormName.Line. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup1037"' FormName.Line((0, y)-(FormName.Width, y + 1), RGB(0, 0, i), BF) FormName.GetType() y = y + 1 Next i End Sub Quote
*Experts* mutant Posted September 20, 2003 *Experts* Posted September 20, 2003 First of all you are trying to use an Object object (:)) for a form where you should use the Form type unless you are casting the object. Second, when you change the object type to Form those will show errors because those methods/properties from VB6 are not available in .NET. :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.