Solved

Tablet PC PenInputPanel

Posted on 2003-12-04
2
372 Views
Last Modified: 2012-05-04
I'm writing a prototype for the Tablet PC and can't figure out how to get the PenInputPanel to display.

I've tried code like the following...

     Dim thePenInputPanel As New PenInputPanel(PainDiagram.ActiveForm)
     thePenInputPanel.Visible = True

I've even tried to attach it to a control, but nothing.

One note, even though I have the latest TabletPC SDK installed, I get an error on my development box, when this code is ran, stating that the Com object i either not valid or not registered. I do not get this error when it is ran on a Tablet PC. Maybe this is because of my dev box not being a tablet pc.

Please Help
0
Comment
Question by:jeremypettit
2 Comments
 
LVL 1

Author Comment

by:jeremypettit
ID: 9897067
Got it to work after compiling on tablet

'In Declarations
Dim thePenInputPanel As PenInputPanel()

'In form Load
            thePenInputPanel = New PenInputPanel(InkEdit1)
            thePenInputPanel.DefaultPanel = PanelType.Keyboard
            thePenInputPanel.CurrentPanel = PanelType.Keyboard
            thePenInputPanel.AutoShow = True
            'thePenInputPanel.
            Dim PanelTop As Int32 = Screen.PrimaryScreen.WorkingArea.Height - thePenInputPanel.Height

            thePenInputPanel.MoveTo(0, PanelTop)



            ' Add a VisibleChanged event handler
            AddHandler thePenInputPanel.VisibleChanged, AddressOf VisibleChanged_Event



Public Sub VisibleChanged_Event(ByVal sender As Object, ByVal e As PenInputPanelVisibleChangedEventArgs)
        Try
            ' Make sure the object that generated
            ' the event is a PenInputPanel object
            If TypeOf sender Is PenInputPanel Then
                Dim thePanel As PenInputPanel = CType(sender, PenInputPanel)

                ' When the panel has become visible...
                If e.NewVisibility Then
                    ' Display the left edge of the
                    ' panel in the attached edit control
                    thePanel.AttachedEditControl.Text += "The left edge of the panel is at "
                    thePanel.AttachedEditControl.Text += thePanel.Left.ToString()
                    thePanel.AttachedEditControl.Text += " pixels." + ControlChars.Lf
                End If
            End If
        Catch ex As Exception
            MsgBox(ex.Message & vbNewLine & ex.Source)
        End Try
    End Sub 'VisibleChanged_Event
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 9899407
Question closed and points refunded

PashaMod
CS Moderator
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get list of word ducuments in a folder 10 35
What are the Important skill to have as Asp.net Developer 8 43
How do ASP.NET and MVC work together? 4 27
Tool Box 2 34
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now