Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you are on Windows XP you can simply add active content on your desktop.</p> <blockquote> <p>Right Mouse Button on Desktop -> Properties -> Desktop tab -> Customize Desktop -> Web tab -> New -> Location "www"</p> </blockquote> <p>Setup your URL and activate content. You will have a small on-desktop window with the picture from camera. If it will not refresh automatically then create a simple page with meta refresh afver 20 seconds and img tag with src property setup for your link.</p> <p>Im not sure if above works for Vista/7.</p> <hr> <p>Otherwise</p> <p>this will likely be useful to you:</p> <pre><code>'Set the wallpaper strComputer = "." Set objWMIService = GetObject("winmgmts:\\" &amp; strComputer &amp; "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_VideoController",,48) Set WshShell = WScript.CreateObject("WScript.Shell") Set WshSysEnv = WshShell.Environment("Process") Set objFSO = CreateObject("Scripting.FileSystemObject") WinPath = WshSysEnv("SystemRoot") &amp; "\YourWallpaper.bmp" If Not objFSO.FileExists(winpath) then 'If the file does not exist then copy it For Each objItem in colItems sourcePath = "\\path\here\" rightSize = "NameHere" &amp; objItem.CurrentHorizontalResolution &amp; "x" &amp; objItem.CurrentVerticalResolution &amp; ".bmp" objFSO.CopyFile sourcePath &amp; rightSize, WSHShell.ExpandEnvironmentStrings ("%SystemRoot%") &amp; "\NameYourWallpaper.bmp", overwrite = True Next End If '************************************************************************************************************************************************ 'Set Wallpaper Bitmap to Default Set WshShell = CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") sWinDir = objFSO.GetSpecialFolder(0) sWallPaper = sWinDir &amp; "\NameYourWallpaper.bmp" ' update in registry WshShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", sWallPaper WshShell.Regwrite "HKCU\Software\Microsoft\Internet Explorer\Desktop\General\Wallpaper", sWallPaper WshShell.Regwrite "HKCU\Software\Microsoft\Internet Explorer\Desktop\General\BackupWallpaper", sWallPaper ' let the system know about the change WshShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True </code></pre> <p>This is VBscript that will change the desktop background and reload your profile afterwards to let you see the changes.</p> <p>Or if you want something more here is a code you should take a look at:</p> <p>This example demonstrates many useful techniques including: Picking a file from a random list. Setting the desktop wallpaper. Setting the desktop wallpaper style (centered, tiled, or stretched). Writing Registry entries. Moving a file into the wastebasket. Editing a file with the system's default editor. When the program starts (and when you click the Apply button), the program calls ReadFiles. That routine reads the names of the files in the indicated directory and saves those that end in BMP, GIF, JPG, and JPEG. After it loads all the file names, the routine calls RandomizeNames to randomize the list.</p> <pre><code>Sub ReadFiles() Dim file As String Dim ext As String ' Create the new file name collection. Set FileNames = New Collection ' Get the file names. file = Dir(DirName &amp; "\*.*") Do While file &lt;&gt; "" If LCase$(file) &lt;&gt; "temp.bmp" Then ext = UCase$(Right$(file, 4)) If ext = ".BMP" Or ext = ".GIF" Or _ ext = ".JPG" Or ext = "JPEG" _ Then _ FileNames.Add file End If file = Dir() Loop NumNames = FileNames.Count RandomizeNames End Sub </code></pre> <p>Subroutine RandomizeNames makes an array of indexes with one entry for each name in the FileNames collection. For i = 1 to NumNames - 1, the routine selects a random index and swaps it into position i.</p> <pre><code>Private Sub RandomizeNames() Dim idx As Integer Dim tmp As Integer Dim i As Integer ReDim Indexes(1 To NumNames) For i = 1 To NumNames Indexes(i) = i Next i ' Randomize them. For i = 1 To NumNames - 1 idx = Int((NumNames - i + 1) * Rnd + i) tmp = Indexes(i) Indexes(i) = Indexes(idx) Indexes(idx) = tmp Next i ' Point to the index to display. NextIndex = 1 End Sub </code></pre> <p>When a Timer fires, the program calls ShowFile to display the next file in the randomized list.</p> <pre><code>Private Sub SwitchTimer_Timer() Dim secs As Long Dim pic As Integer ' See if it's time yet. secs = DateDiff("s", Now, NextTime) If secs &lt;= 1 Then If FileNames.Count &gt; 1 Then pic = Indexes(NextIndex) NextIndex = NextIndex + 1 If NextIndex &gt; NumNames Then RandomizeNames ShowFile FileNames(pic) End If NextTime = DateAdd("s", Pause, Now) secs = Pause End If If secs &lt;= 60 Then SwitchTimer.Interval = secs * 1000 Else SwitchTimer.Interval = 60000 End If SwitchTimer.Enabled = True End Sub </code></pre> <p>Subroutine ShowFile checks the Style combo box and sets Registry entries to make the desktop image centered, tiled, or stretched. Next, if the file is a bitmap file, the program simply calls the SystemParametersInfo API function to set the desktop background image.</p> <p>If the file is not a bitmap file, the program loads it into a hidden PictureBox and then saves the image as a bitmap file. Then it calls SystemParametersInfo.</p> <pre><code>Private Sub ShowFile(ByVal file_name As String) Const STYLE_CENTERED As String = "0" Const STYLE_TILED As String = "1" Const STYLE_STRETCHED As String = "2" Const TILE_NO As String = "0" Const TILE_YES As String = "1" Dim had_error As Boolean ' Set the display style. had_error = False Select Case cboStyle.Text Case "Centered" If SetRegistryValue(HKEY_CURRENT_USER, _ "Control Panel\Desktop", "TileWallpaper", _ TILE_NO) _ Then had_error = True If SetRegistryValue(HKEY_CURRENT_USER, _ "Control Panel\Desktop", "WallpaperStyle", _ STYLE_CENTERED) _ Then had_error = True Case "Tiled" If SetRegistryValue(HKEY_CURRENT_USER, _ "Control Panel\Desktop", "TileWallpaper", _ TILE_YES) _ Then had_error = True If SetRegistryValue(HKEY_CURRENT_USER, _ "Control Panel\Desktop", "WallpaperStyle", _ STYLE_TILED) _ Then had_error = True Case "Stretched" If SetRegistryValue(HKEY_CURRENT_USER, _ "Control Panel\Desktop", "TileWallpaper", _ TILE_NO) _ Then had_error = True If SetRegistryValue(HKEY_CURRENT_USER, _ "Control Panel\Desktop", "WallpaperStyle", _ STYLE_STRETCHED) _ Then had_error = True End Select If had_error Then MsgBox "Error saving desktop style to registry.", _ vbOKOnly, "Registry Error" End If ' Display the file. FileLabel.Caption = file_name m_CurrentFile = DirName &amp; "\" &amp; file_name If UCase$(Right$(file_name, 4)) = ".BMP" Then SystemParametersInfo SPI_SETDESKWALLPAPER, _ 0, m_CurrentFile, SPIF_UPDATEINIFILE Else HiddenPict.Picture = LoadPicture(m_CurrentFile) SavePicture HiddenPict.Picture, DirName &amp; _ "\temp.bmp" SystemParametersInfo SPI_SETDESKWALLPAPER, _ 0, DirName &amp; "\temp.bmp", _ SPIF_UPDATEINIFILE End If End Sub </code></pre> <p>When you click the Edit button, the program uses the ShellExecute API function to edit the current picture file.</p> <pre><code>Private Sub cmdEdit_Click() ShellExecute ByVal 0&amp;, "edit", m_CurrentFile, _ vbNullString, vbNullString, SW_SHOWMAXIMIZED End Sub </code></pre> <p>When you click the Delete button, the program calls subroutine DeleteFile to move the file into the wastebasket. It then displays the next picture.</p> <pre><code>Private Sub cmdDelete_Click() ' Delete the file. DeleteFile m_CurrentFile, False ' Display the next file. cmdNext_Click End Sub </code></pre> <p>Subroutine DeleteFile uses the SHFileOperation API function to move a file into the wastebasket, optionally asking the user to confirm.</p> <pre><code>Public Sub DeleteFile(ByVal file_name As String, ByVal _ user_confirm As Boolean) Dim op As SHFILEOPSTRUCT With op .wFunc = FO_DELETE .pFrom = file_name If user_confirm Then ' Make the user confirm. .fFlags = FOF_ALLOWUNDO Else ' Do not make the user confirm. .fFlags = FOF_ALLOWUNDO Or FOF_NOCONFIRMATION End If End With SHFileOperation op End Sub </code></pre> <p>Taken from <a href="http://www.vb-helper.com/howto_backer.html" rel="nofollow">here</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload