.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How can i programmatically manipulate the Windows 7 on-screen keyboard osk: Move, Resize, Remove Tit

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :.NET Framework

I'm working on an app where i want to display the built-in windows 7 onscreen keyboard in a 'always there' manner.  So i want to:

 1. Move it to a particular location

 2. Set it to a certain width and height

 3. Remove the caption/titlebar so the user can't move it around or close it

 4. Remove that abilty to resize it (or any other user adjustments for that matter).

Basically it just permanently sits there.  I've tried all the typical API functions (MoveWindow, SetWindowPos, SetWindowLong, etc...) but it refuses to work.  Code currently works with all other processes and apps (such as internet explorer and the command prompt); it's almost as if you can't apply anything to the osk.  What am i missing?  Thanks in advance.





View Complete Post

More Related Resource Links

WPF 4.0 on Windows 7 Touch - Does PasswordBox support virtual (on-screen) keyboard?



I am developing a WPF 4.0 application to be deployed on a Windows 7 Touch machine.

During initial testing, I observed that TextBox control supports the virtual (on-screen) keyboard by default. However, the PasswordBox control does not seem to support the virtual keyboard.

I could not find any properties on PasswordBox to enable the virtual keyboard. Also, there isn't any guidance available online. For now, I assume that virtual keyboard has been disabled for security reasons.

Does the PasswordBox control support the virtual keyboard? If yes, please let me know the details.

Appreciate your time,


How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:

PDA Keyboard v1.0 Light Edition - Full Screen Keyboard

The default keypad on Windows Mobile is not at all finger friendly, there is no way you can use it with your fingers. I have trouble using the stylus with it too. But there are many freeware option available to make the SIP ( Software Input Panel - check the Glossary ) finger friendly. Some of these are HTC Diamond keyboard, Blimkeys, PocketCM Keyboard and then now we have PDA Keyboard v1.0 Light Edition from pdamedia.biz. When you hit the blue button it goes into fullscreen mode , then you can use both your hands for typing.

Mobility: Add Keyboard Support to Compact Framework Apps by Trapping Windows Messages


The Compact Framework Control class doesn't provide direct access to Windows messages. However, with P/Invoke, a few lines of native code, and the Compact Framework MessageWindow class, it's still possible to access underlying Windows messages. This can be used to work around any .NET Framework features, including keyboard support, that are not included in the Compact Framework.

Alan Pulliam

MSDN Magazine April 2004

how to move SSAS applications between windows servers

Hi All, We have separate windows servers hosting production and development environments.  Each environment consists of MS SQL Server and SSAS, studios, etc.  What would be the best way to move MS SQL Server databases and SSAS objects from one server to another?  I have been looking for some import/export applications but have not been able to find anything. Thanks for any help, Thanks, Roscoe

Using Windows 7 my screen resolution changed.

My screen resolution changed to 1280 X 720.The relavent sreen resolution section in windows only now allows me a max of the above.I am using NVIDIA Ge Force 9800GT graphics and ASUS VW220 monitor.Will appreciate any help.Cheers.    

How can I programmatically scroll to a DataGridRow that's off-screen?

There are many articles on the web about using attached behaviors for bringing a selected item into view (one such article is at http://www.codeproject.com/KB/WPF/AttachedBehaviors.aspx). I've been trying this technique to implement error navigation in an application (like double clicking on an error in VisualStudio) but I'm hitting a problem. While it works great when you click on a visible row, it doesn't work if the selected row is offscreen, since the DataGrid's VirtualizedStackPanel is virtualized, so the row container wouldn't have been created. I know that setting the DataGrid's VirtualizingStackPanel.IsVirtualized property to false will solve this problem (since it forces all DataGridRow containers to be created) but it ruins my application's performance. Is there another way to handle this so I can programmatically scroll to DataGridRows that are offscreen (and don't yet have containers)? In the worst case, perhaps a way to calculate where the row "would" be if I knew the row's index? Thanks, -Craig

Programmatically remove IIS HTTP header settings

 Our IIS server (v7) has the following settings in [Custom HTTP Headers] for our whole site: Pragma: no-cacheCache-Control: private, no-cache, no-store, max-age=0, must-revalidate, post-check=0, pre-check=0X-Powered-By: ASP.NET Out of the whole site, there are some pages that require the "no cache" setting to be removed for them to work properly. This was done manually by our IIS Administrator until recently.  Now we were told that we need to do it programmatically on our end. The following were the code snippets (VB.NET) we have used with no luck in success. Advice is appreciated, Thanks! Method-1Response.Headers.Remove("Pragma")Response.Headers.Remove("Cache-Control")Response.Headers.Add("Cache-Control", "private")Response.CacheControl = System.Web.HttpCacheability.public Method-2Response.ClearHeaders()Response.Headers.Clear()Response.CacheControl = "Public"Response.Cache.SetCacheability(HttpCacheability.Public)Response.Cache.SetAllowResponseInBrowserHistory(True)

Screen settings in Windows forms

Hi friends, I have a windows forms application. In this i have a main form and i want its controls to always appear in the center of the screen regardless of the resolution and other settings. Please help me on how to achieve this. Thank you, Syed

How to remove 'Delete Item' from context menu of a programmatically created list?

How to remove 'Delete Item' from context menu of a programmatically created list?
I have document library which is created programmatically but now I don't want to have 'Delete Item' in context menu of that document library. Are there any possibilites?

Move, Resize, Rotate InkStrokes



I wrote a custom InkCanvas Adorner.  It has custom Selecting, Moving, Resizing, and Rotation. It works fine with UIElements (e.g., Rectangles, Ellipses, RichTextBoxes). It can also select InkStrokes.

However, how do you (Move, Resize, and Rotate) InkStrokes using a custom adorner.

I've tried wrapping the InkStrokes inside a ViewBox and that does not work.

Is there a way, WPF Team? I know the built-in Adorner does it. But I do not have that option now that the project has requirements for custom adorning.

All the Best,


Office VB.NET Developer

Setting .net windows control location based on Screen width

I am developing an windows application in 20 inch moniter. I am positioning the controls in WPF like this

scrollViewer1.Height = Screen.PrimaryScreen.Bounds.Height / 5;

If I run this application in 15 inch monitor whether it will change the position of the control or it will give the look and feel what i expected.

Please clarify?

If it will chnage the positioning,please suggest how to poistion the control to support all screens widths.

Remove SQL Server 2008 R2 Express Edition from Windows 7 professional


Are there any good practices to follow in order to remove/uninstall SQL Server 2008 R2 Express Edition from Windows 7 professional laptop? Thanks for your comments.




Move SharePoint 2007 on Windows 2003 32-bit to Windows 2008 64-bit


I am planning to move SharePoint 2007 from a Windows 2003 32-bit system to a new Windows 2008 R2 64-bit server tomorrow afternoon.  I have done much research and found only one article that gives me enough information to go on for the migration.  Others in technet have cited this article; so, I expect it is the one go use.  However, before I begin, I wanted to see if anyone has anything else to add. 

Here's the article I'm planning to use:


Our current environment consist of one front end server (Windows 2003 32-bit running MOSS 2007) and one SQL server (Windows 2008 Standard 64-bit with SQL 2008 640bit).  So, we don't need to move the SQL databases - just the SharePoint front end.  We are moving to Windows 2008 R2 with MOSS 2007 (same SP and patch levels are planned).  

Our final goal is to move to SharePoint 2010 in the next week or two, but this seems to be the required first step.

Most of what I've read online contradicts other things.  I've found no consistency between articles.  

Thank you in advance for your assistance. 

Programmatically remove link from lookup field

I've found this link describing an approach to remove the link from a lookup field via javascript. Is there an other way except adding a content editor webpart to every site with lookup fields? Like setting a property for the lookup field? Thanks

Converting windows form to bmp - image crops when the screen resolution is changed


I am converting windows form to a bitmap file using   DrawToBitmap method.  My code looks like this.

            Dim wid As Integer = 760 '  Me.Width
            Dim hgt As Integer = 780 ' Me.Height
            Dim bm As New Bitmap(wid, hgt)
            Me.DrawToBitmap(bm, New Rectangle(0, 0, wid, hgt))
            bm.Save(CurDir() & "\sample.bmp")

This code work fine on desktop/laptop with the screen resolution 1024 x 768  or above.   If I use app on a table pc – with the screen resolution is 800 x 480, the image gets cropped. 
Any suggestion or alternate mode.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend