VB.NET InputPanel AutoScrolling Late Binding Problem

Discussion in 'Microsoft Dot NET Compact Framework' started by The Mad Ape, Feb 15, 2012.

  1. The Mad Ape

    The Mad Ape Guest

    VB.NET InputPanel AutoScrolling Late Binding Problem

    I am upgrading a VB.Net 2008 Compact Framework project from Windows
    Mobile 5 to Windows Mobile 6.

    This code worked in WM 5:

    If InputPanel1.Enabled = False Then
    For Each tbPge In tabCollect.TabPages
    tbPge.AutoScroll = False 'error fires on this line see
    details below
    Next

    tabCollect.Height = 268
    tabCollect.Width = 240
    End If

    When I use the same code in WM 6 I get an error message as follows:

    The targeted version of the .NET Compact Framework does not support
    latebinding.

    Why is this happening and how do I fix it?

    Thanks

    TMA
     
    The Mad Ape, Feb 15, 2012
    #1
    1. Advertisements

  2. The Mad Ape

    The Mad Ape Guest

    On 15/02/2012 1:23 PM, The Mad Ape wrote:
    > VB.NET InputPanel AutoScrolling Late Binding Problem
    >
    > I am upgrading a VB.Net 2008 Compact Framework project from Windows
    > Mobile 5 to Windows Mobile 6.
    >
    > This code worked in WM 5:
    >
    > If InputPanel1.Enabled = False Then
    > For Each tbPge In tabCollect.TabPages
    > tbPge.AutoScroll = False 'error fires on this line see details below
    > Next
    >
    > tabCollect.Height = 268
    > tabCollect.Width = 240
    > End If
    >
    > When I use the same code in WM 6 I get an error message as follows:
    >
    > The targeted version of the .NET Compact Framework does not support
    > latebinding.
    >
    > Why is this happening and how do I fix it?
    >
    > Thanks
    >
    > TMA


    I solved this:

    I added:

    Private tbPge As TabPage

    Placed it just inside:

    Public Class Form2

    Then rewrote the code as follows:

    Private Sub InputPanel1_EnabledChanged(ByVal sender As
    System.Object, ByVal e As System.EventArgs) Handles
    InputPanel1.EnabledChanged
    If InputPanel1.Enabled = False Then
    For Each Me.tbPge In tabCollect.TabPages
    tbPge.AutoScroll = False
    Next

    tabCollect.Height = 268
    tabCollect.Width = 240
    Else
    ' The SIP is enabled, so the height of the tab control
    ' is set to the height of the visible desktop area.
    For Each Me.tbPge In tabCollect.TabPages
    tbPge.AutoScroll = True
    tbPge.AutoScrollMargin = New Size(5, 5)
    Dim ctrl As Control
    For Each ctrl In tbPge.Controls
    If TypeOf ctrl Is TextBox Then
    If ctrl.Focused = True Then
    Dim intpos As Integer
    intpos = ctrl.Location.Y
    tbPge.AutoScrollPosition = New Point(0,
    intpos - tbPge.AutoScrollPosition.Y)
    End If
    End If
    Next
    Next

    tabCollect.Height = InputPanel1.VisibleDesktop.Height
    tabCollect.Width = InputPanel1.VisibleDesktop.Width
    End If
    End Sub

    That works and I am back in business
     
    The Mad Ape, Feb 15, 2012
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alberto Silva

    InputPanel not suported on CE.net emulator?

    Alberto Silva, Aug 12, 2003, in forum: Microsoft Dot NET Compact Framework
    Replies:
    3
    Views:
    297
    RAVI KRISHNASWAMY [MSFT]
    Aug 15, 2003
  2. J.R. Brown

    Late Binding Solution for CF.NET

    J.R. Brown, Aug 20, 2003, in forum: Microsoft Dot NET Compact Framework
    Replies:
    3
    Views:
    238
    J.R. Brown
    Aug 20, 2003
  3. Emilio

    Problem with late binding ?

    Emilio, Oct 7, 2004, in forum: Microsoft Dot NET Compact Framework
    Replies:
    1
    Views:
    944
    Alex Feinman [MVP]
    Oct 7, 2004
  4. Russ Ryba

    How do I turn Textbox Autoscrolling On/Off?

    Russ Ryba, Jan 17, 2005, in forum: Microsoft Dot NET Compact Framework
    Replies:
    4
    Views:
    3,811
    Alex Feinman [MVP]
    Jan 18, 2005
  5. RC

    All Program in CE.NET 4.2 cannot open InputPanel ....

    RC, Mar 29, 2005, in forum: Microsoft Dot NET Compact Framework
    Replies:
    0
    Views:
    186
Loading...

Share This Page