c#


Stick application to the Desktop on Vista


I have an application that I want to stick to the desktop. Stick to the desktop means that every time that someone click windows+D or the show desktop icon the desktop will appear with the application on it.
The user can locate the application on the desktop and change the location at any time but it always remains on the desktop.
We manage to do it on XP by setting the application’s parent to be the desktop using the winAPI methods SetParent (this .Handle, FindWindow ( "Progman " , null ));.
On Vista we manage to stick it to the desktop, whenever the desktop gets focus, it draws a gray background around we window. this background doesn't disappear when my window is moved, leaving ugly squares on the desktop. when I click Windows+D they all vanish.
Note that this doesn't happen on XP at all.
The client is based on .NET 3.0 and WPF .
Any idea why it happens and how to solve it?
use the following code and pass the window handle to the function while form load hope fully this resolves your problem
public void SetFormOnDesktop(IntPtr hwnd) {
IntPtr hwndf = hwnd;
IntPtr hwndParent = FindWindow("ProgMan", null);
SetParent(hwndf, hwndParent);
}

Related Links

Kinect SDK for finger detection?
save files on server
Marshalling C# types to call a C++ IDispatch interface results in a type mismatch
XML deserialization error with root
Passing parameters to constructors using Autofac
First Element as pivot in Quick sort
Translating HQL into another nHibernate query form
Checking lines of a file against a regex
C# get value of dynamically created control
Use of unassigned local variable. But always falls into assignment
my Namespace does not allow Directory.GetFiles
Evaluating a mathematical expression given as text
How can I speed up my loop calling a command line tool in ASP.NET?
3d Tiled terrain
Azure Load Testing: Spin up multiple instances runtime
Adjusting CommandTimeout in Dapper.NET?

Categories

HOME
pact
ckan
optimization
pyspark
customization
dynamic
arcgis
jquery-plugins
okhttp3
opc-ua
localhost
scapy
doctrine2
mamp
adroitlogic
solidity
mongodb-replica-set
fastreport
web-testing
internet-explorer-7
google-street-view
smali
onclicklistener
oracle10g
continuous-fourier
ds-5
schedule
textview
choco
qt-designer
geocomplete
ansible-inventory
console.readline
client-server
ngrok
icu
electron-packager
flume-ng
smooth-streaming
photoshop-script
typewriter
programming-pearls
multi-targeting
try-catch-finally
codesniffer
robotc
therubyracer
breadcrumbs
toggleclass
papyrus
android-xmlpullparser
laterjs
jmh
containstable
app-data
skscene
webservices-client
lytro
persian
exchange-server-2007
playn
photogrammetry
jeet-grid
skview
asp.net-2.0
optimistic-locking
crystal-reports-7
react-os
amzi-prolog
complete
kendo-window
cab
violation
leap-year
uikit-dynamics
microsoft-speech-platform
vline
screensharing
cryptarithmetic-puzzle
ios6-maps
mvcmailer
advanceddatagrid
symfony-1.2
xcdatamodel
versions
pkcs#7
wtsapi32
bootstrap-protocol
weak-typing
scalable

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App