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

c# Connection must be valid and open to commit transaction TransactionScope
Is there a way suppress message inspection in WCF for certain properties?
ElasticSearch Nest MatchPhrasePrefix Multiple Fields
WCF Get request returns 401 after successfully processed the request
“Two-way binding requires Path or XPath” when attempting edit a DataGrid column
How can I calculate business date and time from date assigned in SQL
Xamarin Form(PCL) IOS Firebase Push Message not working
Is there any way to revert single file using libgit2sharp?
How to consume WCF POST with List<Object> as parameters
GoogleConnect.Fetch throws Unable to cast object error
Sum method return long value
Why doesn't my code access the control inside item template?
Trying to add rows to a Table results in multiple tables
Getting error “Unable to load DLL 'SQLite.Interop.dll'” despite it being in the bin folder
Append data in a json file in C#
C# Foreach loop through json-object, get key [duplicate]

Categories

HOME
classification
postgresql
javafx
cluster-analysis
sdk
checkpoint
procmon
country-codes
android-webview
phpexcel
google-app-maker
adroitlogic
derby
aggregate
infopath
multibinding
reportlab
openam
views
aws-devicefarm
glibc
bootstrap-datetimepicker
polybase
mattermost
javaagents
infinite-loop
datastax-enterprise
suitescript
smart-device
intermec
multilanguage
ios-autolayout
sampling
dom4j
ragel
leaderboard
keychain
android-graphview
definition
piranha-cms
line-endings
easyquery
confluent
nao-robot
import.io
flask-socketio
monaca
ear
wink
ajv
printer-control-language
codesniffer
esprima
lattice
easy68k
mac-app-store
mongodb-3.3
symantec
particle-system
jcalendar
ewam
dynamics-nav
serial-communication
syncano
dcg
waterline
mergecursor
veeam
douglas-peucker
method-overloading
javadb
jsonschema2pojo
system.net
redmine-plugins
ccmenuitem
disabled-control
html5-filesystem
git-subtree
scidb
ia-32
rbm
qt5.1
mail-gem
hypertable
xcode4.6.3
socketasynceventargs
wxperl
cgaffinetransform
discussion-board
opendir
functional-specifications
viewdata
konsole
user-preferences
urlscan

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