dotnet-Snippets.com
Snippets: 61 | Registered User: 61 | Visitors online: 8
Main Menu

Home
Random Snippet
FAQs
Contact Us
Imprint
RSS Feeds

Rss All languages
Rss C#
Rss VB.NET
Rss C++
Rss J#
Rss ASP.NET
Google Ads

Sri Lanka .NET 
                Forum Member
Gets the current wallpaper path

Author: Jan Welker
Programming Language: C# Rating:
not yet rated

Views: 1700

Description:

Gets the current wallpaper path

needed namespace: Microsoft.Win32;




C#
1
2
3
4
5
6
7
8
9
10
11
12
/// <summary>
/// Gets the current wallpaper path.
/// </summary>
/// <returns>the wallpaper path</returns>
private static string GetCurrentWallpaperPath()
{
    RegistryKey wallPaper = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", false);
    string WallpaperPath = wallPaper.GetValue("WallPaper").ToString();
    wallPaper.Close();
    return WallpaperPath;
}


This Snippets could be interesting for you:
No results available

Poor Excellent
1 2 3 4 5 6 7 8 9 10
Sign in to vote for this snippet.

Comments:
(Please log in to wrtite an comment.)