PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

VB.NET InputPanel AutoScrolling Late Binding Problem

 
 
The Mad Ape
Guest
Posts: n/a
 
      15th Feb 2012
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
 
Reply With Quote
 
 
 
 
The Mad Ape
Guest
Posts: n/a
 
      15th Feb 2012
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.NET InputPanel AutoScrolling Late Binding Problem The Mad Ape Microsoft VB .NET 1 15th Feb 2012 09:22 PM
Late Binding or Late Anything Piranha Microsoft Excel Programming 4 15th Oct 2005 03:42 AM
Late Binding examples of binding excel application =?Utf-8?B?SGVhdGhlck8=?= Microsoft Excel Programming 14 17th Mar 2005 09:19 AM
EARLY binding or LATE binding ? jason Microsoft Excel Programming 6 26th Feb 2004 05:57 PM
Early Binding v.s. Late Binding =?Utf-8?B?Q2hyaXMgQWRhbXM=?= Microsoft VB .NET 13 19th Jan 2004 04:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:42 AM.