- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
disappear or block start menu in all of applicatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
August 29 2010 05:01 PM
hello
i faced small problem and i hope someone to help me
i develop small program to lock screen on handheld so i tried code to disappear start menu only not task bar. and i worked perfectly. but when i open another application like mobilecalculator.exe from my interface
the startmenu will be back to appear.
i need to disappear or block start menu on all of application that are open, not only my application.
namespace startmenu { //Created to classes to implement this code public class SHAPI { public const int SHFS_SHOWTASKBAR = 1; public const int SHFS_HIDETASKBAR = 2; public const int SHFS_SHOWSIPBUTTON = 4; public const int SHFS_HIDESIPBUTTON = 8; public const int SHFS_SHOWSTARTICON = 16; public const int SHFS_HIDESTARTICON = 32; [DllImport("aygshell.dll")] private extern static bool SHFullScreen(IntPtr hWnd, int dwState); public static bool FullScreen(IntPtr hWnd) { return SHFullScreen(hWnd, SHFS_HIDESTARTICON | SHFS_HIDETASKBAR); } [DllImport("coredll.dll")] internal static extern int SetForegroundWindow(IntPtr hWnd); } public class API { [DllImport("coredll.dll", EntryPoint = "FindWindow")] private extern static IntPtr FindWindow(string lpClassName, string lpWindowName); public static IntPtr FindWindow(string windowName) { return FindWindow(null, windowName); } } }
call function from previous classes
//this code to call the function in previous classes and disappear //startmenu only private void button1_Click(object sender, EventArgs e) { IntPtr hWnd = API.FindWindow(this.Text); if(hWnd != IntPtr.Zero) { //this.MaximizeBox = false; //this.MinimizeBox = false; //this.Focus(); SHAPI.SetForegroundWindow(hWnd); SHAPI.FullScreen(hWnd); } }
open mobilecalculator.exe
private void button2_Click(object sender, EventArgs e) { System.Diagnostics.ProcessStartInfo p = new System.Diagnostics.ProcessStartInfo(@"\Windows\Mob ileCalculator.exe", ""); System.Diagnostics.Process.Start(p); }
Re: disappear or block start menu in all of applicatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
August 30 2010 04:05 AM
Hello
I believe the SHFullScreen API is unusable for this, it will 'work' only for the active foreground application. This will be np problem, if you are writing a kiosk mode application where no other apps are needed.
I have seen a solution to block the start menu, where subclassing is used:
LRESULT CALLBACK TaskbarWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
if (message == WM_LBUTTONDOWN)
{
POINTS pts;
pts.x = LOWORD(lParam);
pts.y = HIWORD(lParam);
if (pts.y < MAX_YBOTTOM_APP_TITLE)
return TRUE;
}
if (message == WM_KEYDOWN &&
wParam == VK_LWIN && lParam == 1)
return TRUE;
return CallWindowProc(oldWindowProc, hWnd, message, wParam, lParam);
}
void __stdcall LockStartMenu()
{
taskbarhWnd = FindWindow(TEXT("HHTaskBar"), NULL);
if (taskbarhWnd != NULL)
{
WNDPROC p = TaskbarWindowProc;
oldWindowProc = (WNDPROC)SetWindowLong(taskbarhWnd, GWL_WNDPROC, (long)p);
}
}
void __stdcall UnlockStartMenu()
{
if (oldWindowProc)
oldWindowProc = (WNDPROC)SetWindowLong(taskbarhWnd, GWL_WNDPROC, (long)oldWindowProc);
oldWindowProc = 0;
}
This subclassing prohibits clicks on start menu icon and disables the WinKey. The code has been taken of a DLL.
-------------==========================--------------
See all my tips and tools at hxxp://www.hjgode.de/dev
and the NEW http://www.hjgode.de/wp
code at google com:
http://code.google.com/p/itc-keyboard/
http://code.google.com/p/rdesktop-ce/
http://code.google.com/p/win-mobile-code/source/browse/#svn%2Ftrunk
Re: disappear or block start menu in all of applicatio n
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
August 31 2010 02:11 AM - edited August 31 2010 02:35 AM
thank you higode
but i need know where i found these method?which DLL file used?
TaskbarWindowProc
LockStartMenu
UnlockStartMenu
please help me
Re: disappear or block start menu in all of applicatio n
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
August 31 2010 07:48 AM - edited August 31 2010 10:39 AM
The code I provided are C code snippets. You normally should go on and create your own DLL or class from it.
Anyway, I have done a DLL and a C# sample for you:
Attached is the VS2005 / WM6 SDK source code and the C-DLL called StartLock.DLL
EDIT:
The DLL provides the following functions:
LockStartMenu()/UnlockStartMenu()
disables tapping (clicking) the start menu (clicks within first 158 pixels from left are catched and will not reach the taskbar window). Additionally the press of the WIN key is catched and does not reach hhtaskbar code.
LockStartbar()/UnlockStartbar()
disables or enables the whole taskbar window (the top bar of the today screen but also the title bar of apps, as long as part of the taskbar)
LockDown(title)/Unlockdown()
makes some calls to SHFullscreen API and makes the window with the title fullscreen
-------------==========================--------------
See all my tips and tools at hxxp://www.hjgode.de/dev
and the NEW http://www.hjgode.de/wp
code at google com:
http://code.google.com/p/itc-keyboard/
http://code.google.com/p/rdesktop-ce/
http://code.google.com/p/win-mobile-code/source/browse/#svn%2Ftrunk
Re: disappear or block start menu in all of applicatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
August 31 2010 04:15 PM
hi higode
you give effort generously, thank you
but this code not work perfectly.
the LockStartMenu() method close taskball not start menu.
i need method that close start menu only of all the application.
can you help me?
Re: disappear or block start menu in all of applicatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
September 1 2010 02:03 AM
hi higode
i clarify what i need?
i need disable or close start menu only from taskbar and windows button on keypad.
and when i open any application from this interface , the start menu still not working .
i tried the prevoius code but when i open the calculator inside my application interface, the start menu is return to work .
please help me
Re: disappear or block start menu in all of applicatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
September 1 2010 05:22 AM
I did some testing and although I cannot follow your issue, I see there is one possible issue:
The 'hot area' of the StartMenu is the top left Start symbol + the title of the current window/application. I changed the DLL to define 2/3 of the screen width as 'forbidden area'. Any clicks/taps in the area 0,0 x 26,2/3*screenwidth are not forwarded to hhtaskbar.
You can 'see' the hot area in the image below. It is the visible part of the title "A very long Application title text"
In landscape, the hot area is up to x=~196 pixels. In portrait it looks like being up to 148 pixels. So the assumption using 2/3 of screen width is approximately OK.
To test the DLL with the demo app, start StartLockTestCS and then click [Lock Start]
try to tap the start menu or press Win key to open startmenu, it should not be possible
tap on [Launch MobileCalculator]
try again to open the start menu, it should be impossible
you can still click outside the hot area, for example the connection symbol or the close button (X) in Calculator.
tap the (X) in calculator to go back to StartLockTestCS
As long as StartLock is running and the window proc subclassing is in place you will not be able to open the start menu.
See video here StartLock Video
-------------==========================--------------
See all my tips and tools at hxxp://www.hjgode.de/dev
and the NEW http://www.hjgode.de/wp
code at google com:
http://code.google.com/p/itc-keyboard/
http://code.google.com/p/rdesktop-ce/
http://code.google.com/p/win-mobile-code/source/browse/#svn%2Ftrunk
Re: disappear or block start menu in all of applicatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
September 9 2010 02:48 PM
You should look at the "Intermec Launcher" utility on the Intermec website at www.intermec.com. This might be exactly what you need.
Re: disappear or block start menu in all of applicatio n
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
January 11 2012 05:15 AM

