Technology Questions

Go Back   Technology Questions > Hardware Questions > Mobile Computers > Tablet PC > Tablet PC Software > Tablet PC Developers

Tablet PC Developers Show off your work while discussing with others how to create ink enabled applications.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 05-06-2007, 07:30 AM
asu.young@gmail.com
Newsgroup Contributor
 
Posts: n/a
PenInputPanel behaving erratically on WinXP SP2

I am having extreme difficulty getting the PIP/TIP "activate icon" to
consistently appear in a windows form. I would like to control the
PIP/TIP icon's appearance when certain controls are tapped or get
focus. Using the enclosed version of a sample app, the PIP/TIP icon
never appears when I tap the Textbox control after the form opens.
However, it occasionally appears when I tap the InkEdit control. Then
it seems that once it shows itself once it will occasionally appear
when I tap the Textbox control. Has anyone else seen this behavior?
Is there something that is obviously out of place in my code?

I should mention that I am most interested in getting consistent
behavior for the Textbox control. Also, I am testing the application
on a device with Windows XP SP2 and the Microsoft.Ink.dll version is
1.7.2600.2180.

Thanks in advance,
Paul Young



Imports Microsoft.Ink

Public Class Form1

Private WithEvents Textbox1 As TextBox
Private WithEvents InkEdit1 As InkEdit
Private WithEvents Button1 As Button

Private WithEvents pipTextbox As PenInputPanel
Private WithEvents pipInkEdit As PenInputPanel

Public Sub New()

' This call is required by the Windows Form Designer.
InitializeComponent()

' Add any initialization after the InitializeComponent() call.

Textbox1 = New TextBox()
InkEdit1 = New InkEdit()
Button1 = New Button()

Textbox1.Location = New Point(10, 10)
InkEdit1.Location = New Point(10, 40)
Button1.Location = New Point(10, 150)
Button1.Text = "Show Input Panel"

Me.Controls.Add(Textbox1)
Me.Controls.Add(InkEdit1)
Me.Controls.Add(Button1)

' Initialize the PenInputPanel(s)
Try
pipTextbox = New PenInputPanel()
pipTextbox.AttachedEditWindow = Textbox1.Handle
pipTextbox.AttachedEditControl = Textbox1
pipTextbox.AutoShow = True
AddHandler pipTextbox.VisibleChanged, AddressOf
PenInputPanel_VisibleChanged

pipInkEdit = New PenInputPanel()
pipInkEdit.AttachedEditWindow = InkEdit1.Handle
pipInkEdit.AttachedEditControl = InkEdit1
pipInkEdit.AutoShow = True
AddHandler pipInkEdit.VisibleChanged, AddressOf
PenInputPanel_VisibleChanged
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try

End Sub

Private Sub PenInputPanel_VisibleChanged(ByVal sender As Object,
ByVal e As Microsoft.Ink.PenInputPanelVisibleChangedEventArgs )

Try
If TypeOf sender Is PenInputPanel Then
Dim pip As PenInputPanel = sender
If e.NewVisibility Then
If pip.CurrentPanel <> PanelType.Keyboard Then
pip.CurrentPanel = PanelType.Keyboard
End If
End If
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try

End Sub

Private Sub Textbox1_MouseClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles Textbox1.MouseClick
If Not pipTextbox Is Nothing Then
Textbox1.Focus()
' Attempt to show the in-place TIP
pipTextbox.Visible = True
End If
End Sub

Private Sub InkEdit1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles InkEdit1.Click
If Not pipInkEdit Is Nothing Then
InkEdit1.Focus()
' Attempt to show the in-place TIP
pipInkEdit.Visible = True
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click

Try
Dim tabTip As New TABLETTIPLib.UIHost
' Show the docked TIP
tabTip.ShowWnd(True)
Textbox1.Focus()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try

End Sub

End Class

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 05-06-2007, 07:30 AM
  #2 (permalink)  
Old 05-06-2007, 07:30 AM
asu.young@gmail.com
Newsgroup Contributor
 
Posts: n/a
Re: PenInputPanel behaving erratically on WinXP SP2

I just noticed that the Textbox is handling the MouseClick event and
not the Click. I changed this in my code and it made not change to
the behavior.

Also, I mentioned that I am using Win XP SP2, but I failed to say that
it is Tablet Edition 2005.

PY

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch files acting erratically? Ross Windows XP 5 10-17-2008 12:37 AM
IE7 on Vista with multiple tabs opened behaves erratically alex Internet Explorer 2 02-20-2008 02:51 PM
Problem with Tablet PC peninputpanel Kiran Windows XP Tablet PC Newsgroup 1 07-18-2007 09:00 AM
IE 7 pauses erratically--what can I do? Rob Internet Explorer 6 07-06-2007 05:40 AM
PenInputPanel Visibility jwkeene Windows XP Tablet PC Newsgroup 5 12-03-2006 11:40 AM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 05:30 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0