Results 1 to 4 of 4

Thread: [RESOLVED] Soft Input Panel

  1. #1

    Thread Starter
    Junior Member Snizbatch's Avatar
    Join Date
    Sep 2002
    Location
    Jacksonville, FL
    Posts
    26

    Resolved [RESOLVED] Soft Input Panel

    Hi,
    Why is it that the Soft Input Panel Appears when you create an application, although it hasn't been placed in the Component Tray? And how can the one that magically appears be referenced without creating a new InputPanel object?

    I am able to use the Input Panel in my App, but I want to reference it to make it appear when focus is given to a TextBox, and there seems not to be one?!?

    I'd hate to have to create another InputPanel object and use more resources when one already seems to exist.
    Last edited by Snizbatch; May 23rd, 2006 at 03:10 AM. Reason: Resolution

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Soft Input Panel

    HI,
    on the gotfocus event of the textbox you require, set the inputpanel enabled property to true, and it will appear.

    In the lostfocus, set it to false, and it will disappear.

    You don't HAVE to add the component to your form, but it is easier if you do.
    You could use the SipShowIM API

    Pete

  3. #3

    Thread Starter
    Junior Member Snizbatch's Avatar
    Join Date
    Sep 2002
    Location
    Jacksonville, FL
    Posts
    26

    Re: Soft Input Panel

    Thanks for the reply!
    I do understand the action of enabling the SIP on focus with InputPanel1.enabled, and vice versa to disable it. Simple concept...

    But I just wondered how to access the one that's already there on Apps that have a MainMenu with a SIP magically already there. It seems weird that it would be available, although not accessible... I guess that's where the SIPShowIM API you're talking about would come into play. I haven't worked much with API's. I'm assuming that would be system access to a more or less 'global' Input Panel?!?

    Thanks again for the help. I'm not officially marking this one as resolved just yet!

  4. #4

    Thread Starter
    Junior Member Snizbatch's Avatar
    Join Date
    Sep 2002
    Location
    Jacksonville, FL
    Posts
    26

    Re: Soft Input Panel

    Well,
    I answered my own question... You sparked my curiosity about the API call. I googled it and developed my solution! For all that are wondering:

    To control the SIP via API call rather than creating an instance of it in your program, use the following code:

    VB Code:
    1. Imports System.Runtime.InteropServices
    2.  
    3.     Public Const SIPF_OFF As Integer = &H0
    4.     Public Const SIPF_ON As Integer = &H1
    5.  
    6.     <DllImport("coredll.dll")> _
    7.     Public Shared Sub SipShowIM(ByVal dwFlag As Integer)
    8.     End Sub
    9.    
    10.     SipShowIM(SIPF_ON) 'Display Soft Input Panel
    11.     SipShowIM(SIPF_OFF) 'Hide Soft Input Panel

    Found the code here:
    http://msdn.microsoft.com/library/de...PInvokeLib.asp

    Thanks!
    Jim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width