当前注册人数423000人 邮箱: 密码: 注册新用户 忘记密码
首页 C/C++/MFC C# ASP.NET VB.NET MATLAB Android   站内搜索 下载代码说明/积分规则
为什么要注册?

1. 可以直接免费从本站下载代码,防止邮件发送不到您的邮箱,或登录不了国外网站

2. 可以设定关键字,当有您关心的代码收录时,邮件通知您

3. 对这里的代码进行评分和评论

4. 可以和大家一起分享你的源代码,得到更多的建议

Automated Desktop Background Changer

自动桌面背景图片壁纸替换程序源代码

2007年12月22日
VB, Windows (WinXP, Win2003, Vista, TabletPC, Embedded), Windows, .NET, .NET (.NET 3.5), VS (VS2008), VS, Dev
本程序在VB.NET下实现Windows壁纸的自动替换功能,它可以每隔几分钟换一张桌面背景图片。另外,程序还涉及了如何转换一个图片到BMP格式的功能。
相关知识
Imports System
Imports System.Runtime.InteropServices
Imports System.Drawing
Imports Microsoft.Win32

Public Class Wallpaper
    Const SPI_SETDESKWALLPAPER As Integer = 20
    Const SPIF_UPDATEINIFILE As Integer = &H1&
    Const SPIF_SENDWININICHANGE As Integer = &H2&

    "user32") /> _
    Public Shared Function SystemParametersInfo(ByVal uAction As Integer, _
        ByVal uParam As Integer, ByVal lpvParam As String, ByVal fuWinIni As Integer) _
            As Integer
    End Function

    Public Enum Style As Integer
        Tiled
        Centered
        Stretched
    End Enum

    Public Sub SetWallpaper(ByVal path As String, ByVal selectedStyle As Style)
        Dim key As RegistryKey = My.Computer.Registry.CurrentUser.OpenSubKey_
            ("Control Panel\Desktop", True)

        Select Case selectedStyle
            Case Style.Stretched
                key.SetValue("WallpaperStyle", "2")
                key.SetValue("TileWallpaper", "0")

            Case Style.Centered
                key.SetValue("WallpaperStyle", "1")
                key.SetValue("TileWallpaper", "0")

            Case Style.Tiled
                key.SetValue("WallpaperStyle", "1")
                key.SetValue("TileWallpaper", "1")
        End Select

        SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, path, SPIF_UPDATEINIFILE _
            Or SPIF_SENDWININICHANGE)
    End Sub
End Class
源代码原文下载:
Automated Desktop Background Changer This project will show you how to make a program that randomly chooses a background image when you log on, and either lets you simply select a background, or randomly chooses one for you every minute to an hour. Ever been stuck trying to find the right image to use as your background? Well, look no further. This project will show you how to make a program that randomly chooses a background image when you log on, and either lets you simply select a background, or randomly chooses one for you every minute to an hour. Also this project includes instructions on how to convert an image to BMP format.

源码图片

点击链接查看大图
从本站下载附件及源代码(1个附件,已经成功下载326次)

最值得关注的外文源代码

Calculator
Basic Skin Creator for DotNetNuke
ASP.NET GridView Sort Indicator Component
A simple way to snap a form to screen borders
评论(评论是增加积分的一个有效途径)
字数在300字内
请如实评论
本源代码共评论54次,此处显示最近20次评论! 查看所有评论

zg  2021年08月17日
wgy起飞  2021年08月17日
天涯沙漠  2017年04月16日
五十六朵花开五五十六朵花开五光十色六合春光十色六合春
lyzz  2016年06月11日
谢谢分享~
天涯沙漠  2015年07月25日
五十六朵花开五光十色六合春
balabala  2015年06月12日
谢谢分享~
wcxfairy  2014年06月25日
谢谢分享!
sun  2014年03月22日
谢谢
pengpeng612  2013年03月21日
谢谢
cl05032  2013年03月20日
好啊
gn_2012  2013年03月19日
看看
小莉  2012年03月07日
yayexing001  2012年01月19日
看看。
uhitme  2012年01月12日
和好啊
陈禧  2012年01月04日
好好学习,天天向上。
vivian  2011年11月23日
thanks
costa10  2011年11月03日
谢谢了
aken088  2011年10月27日
谢谢了
nwuwkg  2011年10月14日
实用
g-crazy  2011年09月21日
kankan xian
字数在300字内
请如实评论
200万国内源码搜索
CopyRight (C) codesoso.com 2007-2009 All Rights Reserved zhihuishi   免责声明