Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Moving Desktop Icons


Hello, VBForum community!

I am wondering, how would you go about moving a icon on the desktop in VB?

Thanks for any help!

-Spyrorocks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Desktop Context Menu {hide Desktop Icons In WinXP}
my problem started when i found a submenu item for the desktop context menu (WinXP) that allowed me to hide my icons. i liked the look of my desktop like that, what i would really like is a button on my quicklink bar that could turn the icons on and off. as far as i could tell there is no way to do it with windows (ie. .scf script file like the "Show Desktop" quicklink button). so i opened up VB in hopes that i could use the windows API to deliver a click event to that menu item, so the icons would disappear with out actually displaying the menu for the user to see.

i found a code snippet on the net that showed how to hide the desktop window... causing the icons to disappear... but at the same time causes the desktop context menu to not function either. i looked over all the windows messages that i could send to a listview window in hopes that one of them would allow me to hide the icons... each solution seemed more and more complex.

is there a way to activate an menu item on the desktop context menu with out it being displayed?

Desktop Icons
I have packaged my app using the Package and Deployment wizard.. When my app is installed the icon for it will be located under Start-Programs etc etc...

Is it possible for the P+D wizard to install an icon for my application directly onto the users desktop ???

Desktop Icons In XP
I'm having trouble getting the label of each LVItem on the desktop. i can get the position fine, but when I try to get the caption VB quits. here is what I have now:
(the reason I want to do this is to save and restore icon positions. I thought that the positions themselves would be ok, but when I lock and unlock my workstation or reboot the pc and I try to restore the icons, the placement of the icons is kept but I get the wrong icons in the wrong place)


Code:
Dim iconlabel As LV_ITEM
Dim sizeIconpos As Long
Dim sizeIconlabel As Long
Dim sizeBuffer As Long
Dim MAX_PATH As Integer
MAX_PATH = 512
Dim buffer As String * 512
sizeIconlabel = Len(iconlabel)
sizeBuffer = Len(buffer)
iconlabel.iSubItem = 0
iconlabel.cchTextMax = MAX_PATH
iconlabel.mask = LVIF_TEXT

Dim lpSysSharedLVI As Long
Dim lpsysSharedITEM As Long


lpSysShared = GetMemSharedNT(pid, dwSize, hProcess)
lpSysSharedLVI = GetMemSharedNT(pid, sizeIconlabel, hProcess) lpsysSharedITEM = GetMemSharedNT(pid, 512, hProcess)
iconlabel.pszText = lpsysSharedITEM
WriteProcessMemory hProcess, ByVal lpSysSharedLVI, iconlabel, sizeIconlabel, lWritten
SendMessage h, LVM_GETITEMTEXT, 1, ByVal iconlabel
ReadProcessMemory hProcess, ByVal lpsysSharedITEM, buffer, 512, lWritten




Public Function GetMemSharedNT(ByVal pid As Long, ByVal memSize As Long, hProcess As Long) As Long
hProcess = OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE, False, pid)
GetMemSharedNT = VirtualAllocEx(ByVal hProcess, ByVal 0&, ByVal memSize, MEM_RESERVE Or MEM_COMMIT, PAGE_READWRITE)
End Function

Desktop Icons & API
Hi, I'm trying to make a fun program where i can grab and choose a desktop icon and throw it and have it bounce around the screen. Umm i'm not sure i know where to start, well if anybody could help me accomplish this because I really want to learn as i'm thinking this will help me learn and understand some api better. So if anybody could guide me along I would appreciate it, thanks

Behind Desktop Icons....
OK i need to make a GUI that Runs Behind Desktop icons but on desktop background in vb 6.0 pro can any 1 help me with code?

Desktop Icons
Hi All,
I want to write a program which changes the default icon of a desktop shortcut to my own icon. The program is a html executable and the default icon sucks, so i want to change it programmatically (the program will be installed on many different computers). Does anybody know how to do this? I have found code which installs a shortcut on the desktop, but none that successfully changes the icon.

Any help would be great.

Thanx all.

Icons Of The Desktop
For a newly "made" program, other than dragging the .exe icon from a folder to the desktop, is there any way to get the icon on the desktop? Can this be done automatically upon deployment?

Desktop Icons
I am trying to write a program which will allow a user to have several desktops, so you'd have one with all your games icons on, another with your graphics software, etc.

Can anyone suggest a way of saving all the icons and their positons on the desktop and then reloading them?

Darren.

Desktop Icons
Within my software I want show all the icons/shortcuts which is in my Desktop, And even I could play itself from application.
Is it possible ? If Yes plz let me know..

Icons On The Desktop
How can I put icons on the desktop?

This About The Desktop Icons.....need Some Help!
Hello to ya all!

I was wondering if I can get ALL the desktop icons, and add them to a ListView, WITH the icons, not only the names the ICONS too...all Desktop Icons including My Computer, Network Neighbourhood, and stuff like that.

Icons On Desktop...
Hello!
Is any body know how can I get the position of the icons on Desktop ?
Thanks...

Desktop Icons
How do you place an icon on the desktop from within a vb program. I have found the code to op pm folder and add to that but cannot find a ref to the desktop.

Please help imortant.

Desktop Icons
I need to have the execution/target command line of the icon on the desktop.
I thought that maybe I will use an OLE object.I will drag the icon from the desktop to the OLE object and so I will get it's properties (the icon's).
But I can't reach them.How can I get especially the command line of this icon wich basicly it's a shortcut to a program (DOS or WIN)?

thanks for your help,


Simona

Reset Icons On Desktop
Hello

Is there a program that I can create that will reset all the Icons on my desktop? For example deleting any new Icons or inserting required icons that was inserted or deleted by user.

A program that will "reimage" my desktop to predefind settings.

Thanks for your Help


David

Hiding Desktop Icons
Hello,

My desktop is cluttered with icons that I use on a regular basis, but annoy the crap out of me. In XP you can simply right click and tell it to not show icons. But this is getting kind of annoying. Is there a shortcut that you could type in the RUN dialog box or in the registry editor that would allow me to write a program that sits in the taskbar as a shortcut in the Quick Launch bar so I can just click on it once and have my icons appear or disappear? I believe there was a way to do this in earlier versions of Windows, but I'm not so sure about XP Professional. Thanks..

Desktop + Icons Screenshot
Hey I'm trying to figure out how to take a screenshot of the desktop WITH the icons in my program. My program is sort of a little prank that locks the user out of the computer unless they press the right key. So when it starts I want it to take a picture of their desktop so it looks like their computer is acting normal, but whenever they try to click something or type something it comes up with a box that says click me, which leads them back to the same endless puzzle until they press the key that exits the program. I've thought of a few options but can't figure out how to implement them, I only get the wallpaper without the icons. One option is to minimize all the other windows and then take a screenshot (show desktop) and then paste that screenshot into a picture box, but this didnt work right for some reason. Another is just take a picture of the desktop with icons, but I have no idea what the command for that is. Can anyone help me out with some code please?

Search For Icons On Desktop
How can I make my VB program search for an icon the desktop? If it doesn't find it - it will install an icon - how do I do that as well?

Get Icons Position On Desktop
Please, Can anyone tell me, how to find the positions of the icons on the desktop. I would like to Save these positions & restore them. The latter, I can do using SendMessage(desktopHwnd,LVM_SETITEMPOSITION, etc..)
Thanks
Nico

Text On Desktop Icons
Does anyone know the API and Constants to hide the colored boxes around the text of the Desktop Icons?

Thanks in advance!

Arrange Desktop Icons
I get so upset when something like changing my resolution moves my desktop icons since I've got about 30 - 40 and they all need to be arranged just so, so can I make a program that will arrange the icons (maybe something like iconpossition = 743, 123)? Thx.

I Need To Know How To Refresh Desktop And It's Icons
Hi all...
I made a code with alot of help of Fazi to set desktop icons spaces (Vertical & Horizontal) and size , but I need help to refresh desktop so I can see the result immediately . I hope that my question is obvious.

Disable Desktop Icons
How would i make disable desktop icons till program is ended.

Hide Certain Desktop Icons
Hi
I am building a small program to be uses on my parent childrens holiday computer network. By searching around the forums and various vb sites i'm sure i can find script to disable/hide the start bar. I can use tweak ui to hide the recycle bin, i can delete my breifcase but that still leaves my computer and network neighbourhood. Any code / ideas on how to hide these 2 with out hiding the rest of the desktop ?

Thanks

WinNT Desktop - Icons
Ok, if you right click on the desktop and choose properties, then select PLUS from the tab strip, you have the option of displaying icons using all possible colors.
Now our system is crap, and when we log in it gets settings from a server somewhere...is there any code I can use to change this so that when I start up I can see icons in proper colors rather than all blotchy???

Woka

Desktop Shortcut And Icons
Hi!

How can i create an desktop shortcut while installing my application to a client's machine that has been packeged by using vb package and deployement wizard.

And one more thing how the icon at the program group can be changed.

thanks in advance.

Align The Desktop Icons?
How can I align the desktop Icons through VB code? I would like to align them by name or just line them where they are. For example....if you right click the desktop and click Arrange Icons->By Name or click the Line Up Icons.

Any ideas?

Refreshing Desktop (icons)
Does anyone know how to refresh the desktop icons, like setup programs do!

Cheers for any help

Line Up Desktop Icons
Is it possible to force the desktop Icons to line up when the user clicks my "Line Up Icons" button? I need it to act just like when a user right clicks on the desktop and then clicks Line Up Icons.

Thanks!

Setting Desktop Icons
I do have one other problem that I'm having some trouble with.  In this VB program i'm working on, I create a icon on the desktop using the fCreateShellLink function.

ie.
lReturn = fCreateShellLink("" & MENU_NAME, "TCS - " & strCompanyName, strPath1, strArgs, -1, "$(Programs)")

Now this creates a icon with the following path;

"c:program filesmicrosoft officeofficemsaccess.exe" "c:program filesIceRidge cs.mde" /runtime

This path opens the access program via Access 2000 runtime.

This shortcuts icon is the default Access icon.  Is there any was in my code that i can assign an icon i have created for this shortcut?

If you have any suggestions i would much appreciate it.

Thanks

Garry

Create Icons On Desktop
I want to create icon on desktop? how to create icons on desktop using visual basic application

Show Desktop Icons Using VB6
The PC I use at work is maintained by a third-party, who have decided that Desktop Icons are unnecessary, and so delete all entries in my Desktop folder whenever XP is initiated.
What I would like to do is to have my desktop show shortcut icons.
I have no problem in devising a method to copy all shortcuts from another folder to this folder. I also know how to make these icons show on the desktop by right-clicking the desktop arrange icons / show desktop items. Does anyone know how to show the icons on the desktop using VB6 ?    

Rebuild Desktop Icons?
Hello Fellas...

I am writing a program that changes some desktop icons, and I have a big problem.

I need to rebuild all desktop icons to show the new icons.

If I did not get this code, I will have to restart windows to force it to rebuild the new icons.

Actually, I tried many methods, like : SendMessage(HWND_BROADCAST, WM_SYSTEMCHANGE, 0, 0), or SystemParametersInfo(SPI_SETICONS, .....), SendMessage(DesktopListView Handle, WM_PAINT, 0,0 ) ...

But all of the methods above does not work with me, I am using Windows XP® and Microsoft Visual Basic® v6.0

Can anyone help me with this???

-=-=-=-=-=-=-=-=-=-=
  Nothing Is Impossible
=-=-=-=-=-=-=-=-=-=-

Hiding Desktop Icons
How can I hide the desktop icons using vb code

THX

Desktop Icons Tool - Need Advice
Hi,
I want to write a tool that will take a snapshot of all the locations of icons on my desktop so that when some program messes them up, i can restore them with the same tool. I have a 3 monitor wide desktop filled with logically organized icons that i spent hrs on getting just right. but once in a while, windows goes wacky, big supprise there, and all icons are on the main monitor. after the 4th occurance, i started looking for ready made tools but none are designed for the xp and are a constant headache. plus no one developed an easy to use interface or update mode when you add new ones...

well, i written the interface and have an idea how things should work. I have the system tray icon with menus ready for code .....all i need is code that will collect all icon's name and position and code that will then check if an icon exists, and if so, move it to where it supposed to be.

I have searched in the forums and have found pieces of code here and there but i cant get it to work. I am fairly new at vb and am eager to learn. if someone could point me to a working example of such code, i think i can adapt it to my program and if it is any good i would love to share it here.

thanx for any help

Make The Form Appear Under Desktop Icons ?
How could I make my form appear as the background..

Under the icons...

Is this possible ? Im pretty sure it is..but how...

Any Idea ? Post me some code

Annoying Little Arrows On Desktop Icons
Hello

does anyone know of a way to remove those annoying little arrow things that appear on desktop icons?

Show/Hide Desktop Icons
Is it possible to trigger show/hide desktop icons. I want it to do it the way windows does and not some way that my program itself hides them. its for a little program im making that has to do with keeping the desktop clean while keeping programs still easily accessible.
-thanks

Inno Setup Desktop Icons
Anyone remember how to install a desktop icon for all users rather than just for the user installing the app?

Displaying Certain Icons On Win98 Desktop
Is there a way that I can shut off all Desktop Icons (My Computer, Network Neighborhood, Recycle Bin, etc) but only show those icons that lead to the applications that I write.

Think of it as a Kiosk type monitor where the user is only allowed certain functions.....

I know how to hide the desktop icons which is a registry setting....

I appreciate your help.

Hiding Icons On Windows Desktop
I have need to shell an application that removes all the icons from the desktop. When the application ends it restores them. I need to be able to shell the app and then restore the icons - because I don't want them removed.

Anyone have any ideas how this is achieved?

How To Create Desktop Icons During Install?
Hello:
Could anyone direct me to information as to how one goes about to
automatically create desktop icons when installing a VB6 app. I use the
PDWizard for installing my app, and it creates a little startup icon
in the program start menu, but how can one also be created on the
Desktop of any Windows operating system?

Thanks in advance,
Ted Krasnicki,
Montreal

Making DeskTop Icons To Look As If They Are Firing
Can any one tell me how to make DeskTop Icons to look as if they are Firing using windows api.

Thanks in Advance
prasanna venkatesh S.

How To Protect The Desktop Icons From Being Deleted???
Hi, guys,

How can I detect by a program that a user is trying to delete an icon on the desktop, and forbid him doing so by giving him a warning,
and resuming the tesktop to the original.

Any answers would be appraciated!

Problem When Moving Form On Desktop
Hi,

I have some code for a timing system, the code works fine and updates hours, minutes and seconds text boxes on the form and passes the data to a port via RS232.

However if I click and drag the form to another part of the desktop (i.e move the form) the RS232 code and hours minutes and seconds boxes stops working temporarily, when I stop dragging and release the form it then continues to work again sending data to the port via RS232.

There is no pause in the time, just the code for updating the text boxes and for sending the RS232 data pauses.

Is there a way to keep the form text boxes and RS232 data working when either moving the form or clicking on the form caption bar?

Thanks in advance.

Daz......

How To Get Mouse Positions Moving On The Desktop
My application starts in System Tray, and I want to store the mouse positions even if the mouse mouse moves on windows desktop.

How to do so?

Seting Desktop To List View Icons?
I was wondering if any one knows how to make the desktop icons 16x16 with the text to the right of the icon. I'v seen some background changers that do it but I would like to make a small system service that dose this.

Show-Hide The Desktop Icons Does Not Work
It is not working when I run it.
How about you?

Code 2 Make Desktop Icons Disappear/appear
If anyone has the code that can make icons on the desktop disappear and some code to get them to appear again then please post it. Thankyou.

Copyright © 2005-08 www.BigResource.com, All rights reserved