Daily Dilbert
This program Downloads the archive page from ' http://www.unitedmedia.com/comics/dilbert ' extracts the file name of the picture. Download it. Convert it to bitmap. ' Changes the desktop wallpaper to the new dilbert strip.
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
' 1. Create a new form.
' 2. Add a Textbox,a pictureBox and an Inet control.
' 3. Let them all have their default name.
' 4. Put all the code expect the global decleration in the "form load procedure"
Dim Pos As Integer
Dim Pos2 As Integer
Dim Bilden() As Byte
Dim NrString As String
Text1.Text = Inet1.OpenURL ("http://www.unitedmedia.com/comics/dilbert/archive/") 'Download the page.
Pos = InStr(1, Text1.Text, "/comics/dilbert/archive/images/dilbert")
Pos2 = InStr(Pos, Text1.Text, ".gif")
NrString = Mid(Text1.Text, Pos, Pos2 - Pos)
Text1.Text = "http://www.unitedmedia.com" + NrString + ".gif" ' Debug filename
Bilden() = Inet1.OpenURL("http://www.unitedmedia.com" + NrString + ".gif", icByteArray) ' Download picture.
Open "C:\dilbert.gif" For Binary Access Write As #1 ' Save the file.
Put #1, , Bilden()
Close #1
Picture1.Picture = LoadPicture("c:\dilbert.gif") 'Reload it to PictureBox
SavePicture Picture1.Picture, "c:\dilbert.bmp" 'Converted to bmp..
Call SystemParametersInfo(20, 0, "c:\dilbert.bmp", 1) 'Change the wallpaper.
Unload Me ' Exit program
Original Comments (3)
Recovered from Wayback Machine