|
-
May 23rd, 2006, 12:01 AM
#1
Thread Starter
Junior Member
[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
-
May 23rd, 2006, 01:23 AM
#2
Frenzied Member
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
-
May 23rd, 2006, 02:23 AM
#3
Thread Starter
Junior Member
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!
-
May 23rd, 2006, 03:07 AM
#4
Thread Starter
Junior Member
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:
Imports System.Runtime.InteropServices
Public Const SIPF_OFF As Integer = &H0
Public Const SIPF_ON As Integer = &H1
<DllImport("coredll.dll")> _
Public Shared Sub SipShowIM(ByVal dwFlag As Integer)
End Sub
SipShowIM(SIPF_ON) 'Display Soft Input Panel
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|