Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,534 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,792 people online right now. Registration is fast and FREE... Join Now!




Changing Desktop Background Help

 
Closed TopicStart new topic

Changing Desktop Background Help, Making a project, wishing to change desktop background

huzi8t9
12 Aug, 2008 - 10:40 PM
Post #1

New D.I.C Head
*

Joined: 11 Jul, 2007
Posts: 23


My Contributions
Hello, I'm Mark. I've started a project I cannot finish, and it's qute annoying. I'm making a program where a user can change there background using my program. Here's the good bit, I don't just want to change it to a picture. I'm wanting to change it to a HTM/L file, I know this can be done because Windows it's self allows it. Any help really appreciated.

vb

Public Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Dim FS As New FileSystemObject
Const SPI_SETDESKWALLPAPER = 20
Function SetWallPaper(Optional ByVal sFile As String) As Boolean
sFile = RTrim(sFile)
tmp$ = FS.GetTempName
Dim dat As String
Open tmp$ For Output As #1
Write #1, sFile
Close #1
SetWallPaper = (SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, tmp$, _
0) <> 0)
End Function

All this seems to be doing is removing my background? Even with Images..

thanks in advance, Mark.

P.S. I've also included my entire project for a better view.
Attached File  SWF2D.zip ( 3.07k ) Number of downloads: 28


This post has been edited by born2c0de: 13 Aug, 2008 - 04:03 AM
User is offlineProfile CardPM
+Quote Post

cmount
RE: Changing Desktop Background Help
13 Aug, 2008 - 09:56 AM
Post #2

New D.I.C Head
*

Joined: 1 Aug, 2008
Posts: 41



Thanked: 1 times
My Contributions
QUOTE(huzi8t9 @ 12 Aug, 2008 - 11:40 PM) *

Hello, I'm Mark. I've started a project I cannot finish, and it's qute annoying. I'm making a program where a user can change there background using my program. Here's the good bit, I don't just want to change it to a picture. I'm wanting to change it to a HTM/L file, I know this can be done because Windows it's self allows it. Any help really appreciated.

vb

Public Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Dim FS As New FileSystemObject
Const SPI_SETDESKWALLPAPER = 20
Function SetWallPaper(Optional ByVal sFile As String) As Boolean
sFile = RTrim(sFile)
tmp$ = FS.GetTempName
Dim dat As String
Open tmp$ For Output As #1
Write #1, sFile
Close #1
SetWallPaper = (SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, tmp$, _
0) <> 0)
End Function

All this seems to be doing is removing my background? Even with Images..

thanks in advance, Mark.

P.S. I've also included my entire project for a better view.
Attached File  SWF2D.zip ( 3.07k ) Number of downloads: 28



I have no idea how to accomplish that...I'm a n00b programmer. But it might be helpful to tell others what operating system you're using? Windows XP? Windows Vista? Windows Vista x64 (aka 64 bit edition)? These differences may or may not have an impact on how you would accomplish something--I don't know. But it never hurts to give others background on what setup you're working from.
User is offlineProfile CardPM
+Quote Post

huzi8t9
RE: Changing Desktop Background Help
13 Aug, 2008 - 01:29 PM
Post #3

New D.I.C Head
*

Joined: 11 Jul, 2007
Posts: 23


My Contributions
QUOTE(cmount @ 13 Aug, 2008 - 10:56 AM) *

QUOTE(huzi8t9 @ 12 Aug, 2008 - 11:40 PM) *

Hello, I'm Mark. I've started a project I cannot finish, and it's qute annoying. I'm making a program where a user can change there background using my program. Here's the good bit, I don't just want to change it to a picture. I'm wanting to change it to a HTM/L file, I know this can be done because Windows it's self allows it. Any help really appreciated.

vb

Public Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Dim FS As New FileSystemObject
Const SPI_SETDESKWALLPAPER = 20
Function SetWallPaper(Optional ByVal sFile As String) As Boolean
sFile = RTrim(sFile)
tmp$ = FS.GetTempName
Dim dat As String
Open tmp$ For Output As #1
Write #1, sFile
Close #1
SetWallPaper = (SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, tmp$, _
0) <> 0)
End Function

All this seems to be doing is removing my background? Even with Images..

thanks in advance, Mark.

P.S. I've also included my entire project for a better view.
Attached File  SWF2D.zip ( 3.07k ) Number of downloads: 28



I have no idea how to accomplish that...I'm a n00b programmer. But it might be helpful to tell others what operating system you're using? Windows XP? Windows Vista? Windows Vista x64 (aka 64 bit edition)? These differences may or may not have an impact on how you would accomplish something--I don't know. But it never hurts to give others background on what setup you're working from.

I'm sorry, I did try to provide all the details, must have slipped my mind.

I'm using Microsoft Windows XP, Professional. Service Pack 3.
User is offlineProfile CardPM
+Quote Post

Closed TopicStart new topic
Time is now: 12/2/08 10:17PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month