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

Which graphical technologies were used for creating interface for Visual Studio 2013? [closed]
How to validate Linq join query?
How to play the microphone audio using DirectSound or API?
Saving Panel to PDF not working nor getting errors
Reliably identifying and tracking Asterisk calls using C# and Aster.NET
Get a list result from another list and a property
Proper Max Database Size and Max Buffer Size for Windows Mobile device with 128MB of RAM?
C# Regex to validate string
How to manage a PowerPoint presentations programmatically
Best Linq Syntax for To Create List for JQuery Autocomplete
Instance validation error: * is not a valid value for *
Return inside out outside the using statement?
Error converting data type varchar to int (stored procedure C# ASP.NET)
Gridview On Row Command
Why the task cancellation happens on the caller thread?
Automapper - map collection containing 'null' and initialized objects

Categories

HOME
indexing
azure-documentdb
netty
virtual-machine
casting
blob
dynamic
azure-database-mysql
salesforce-lightning
coordinates
datetimepicker
localhost
terminal
yuv
python-3.4
samsung-gear-s2
ios-universal-links
select2
core-data
osclass
hql
openscad
gpo
udeploy
lotusscript
angular2-pipe
javaagents
grunt-contrib-uglify
android-cursorloader
formtastic
large-files
checkmarx
jms-topic
boost-log
multilanguage
webclient
azure-vm-scale-set
javafxports
kofax
kepserverex
gem-fury
ape-phylo
php-mongodb
qt-quick
superclass
servicebus
ack
stanford-nlp-server
django-tables2
dcom
standard-error
richtext
cc
disassembly
cardview
alarmmanager
easy-thumbnails
firebase-job-dispatcher
angularfire
camellia
jmh
pyshark
wonderware
gnu-sort
imageicon
ruby-1.8.7
event-tracking
gulp-cdnizer
jts
biginsights
adempiere
om
tidesdk
fxmlloader
illegalargumentexception
diffmerge
os.walk
register-allocation
formbuilder
nsnotificationcenter
system.net
cocos2d-x-2.x
indic
time-frequency
nativequery
scidb
sygic
octokit
record-locking
dnsbl
idoc
volatility
parallel-python
s60
text-manipulation
konsole
hp-trim
bootstrap-protocol
tracd

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