Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • *Experts*
Posted

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.

:)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...