I'm having a few problems converting some code into VB.NET from C#. Most of the translating is done, but I am getting errors when I try to run my code, and I can't figure out what is causing them. Here is the Sub I translated.
Public Sub CreateWidget()
Dim blue As LCDColor
blue.Red = 0
blue.Green = 0
blue.Blue = 255
blue.Alpha = 255
'create a full screen widget text box with text
Dim wg1 As New WidgetInfo()
wg1.BgColor = blue
wg1.Text = text
wg1.WidgetID = 1
wg1.WidgetType = WidgetType.TEXT
wg1.FontID = CByte(FontID.SAN_B_24)
wg1.FgColor.Red = 255
wg1.FgColor.Green = 255
wg1.FgColor.Blue = 0
wg1.FgColor.Alpha = 255
wg1.Effect = WidgetEffect.THREED
wg1.Left = 10
wg1.Top = 20
wg1.Width = 525
wg1.Height = 300
Me.m_WaitingForWidgetEvent = True
vision.Widgets.CreateWidget(wg1)
Trace.WriteLine(frmDisplay.lblHeadlines.Text)
Dim nRet As Integer = WaitForWidgetEvent(wg1.WidgetID, EventCode.CREATE_SUCCEED, EventCode.CREATE_FAILED)
If nRet = 2 Then
Throw New ePadException(HERROR.F_INTERNAL_ERROR)
End If
Trace.WriteLine("screen1 wg1 creating return " & nRet)
End Sub
The error I receive on this line ("vision.Widgets.CreateWidget(wg1)") reads "In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user."
So, now I'm trying to work out which property the error is talking about.
Any advice offered would be appreciated.

New Topic/Question
Reply



MultiQuote





|