Quick Search for:  in language:    
program,Downloads,archive,page,from,extracts,
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,014,970. lines
 Jobs: 119. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic.
Click here to see a screenshot of this code!Xp Frames , Xp List Box And XpTextBox (updated!)
By ali s on 7/2

(Screen Shot)

Click here to see a screenshot of this code!Excel Into a webpage
By Bill Donahue on 7/2

(Screen Shot)

Unroll2 - Update
By Cyber Chris on 7/2


MultilinePWD
By Cyber Chris on 7/2


Click here to see a screenshot of this code!Song/Poem Assistant
By Peter Rowan on 7/2

(Screen Shot)

Click here to see a screenshot of this code!GPA Cal
By KBM-00 on 7/2

(Screen Shot)

Click here to see a screenshot of this code!Connection Via the Telephone line.No internet or cable.Just the telephone line
By Nass ClickMan on 7/2

(Screen Shot)

DBTool
By Make Strömberg on 7/2


Click here to see a screenshot of this code!MSChart Simple Example
By Sebastian Pereira on 7/2

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Daily Dilbert

Print
Email
 

Submitted on: 8/24/1999
By: Bjorn Larsson 
Level: Not Given
User Rating: By 109 Users
Compatibility:VB 5.0, VB 6.0

Users have accessed this code 9692 times.
 
 
     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.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

'**************************************
' Name: Daily Dilbert
' Description:This program Downloads the
'     archive page from 
' http://www.unitedmedia.com/comics/dilb
'     ert 
' extracts the file name of the picture.

'     Download it. Convert it to bitmap. 
    ' Changes the desktop wallpaper to the n
    '     ew dilbert strip.
' By: Bjorn Larsson
'
' Returns:2 files on c:\ dilbert.gif and
'     dilbert.bmp
' A changed wallpaper.
'
' Assumes:You must have an internet conn
'     ection..
'
' Side Effects:Sometimes the desktop wal
'     lpaper is not visible 
' unless you refresh the desktop yoursel
'     f 
' or select it manually. I don't know wh
'     y this happends...
'
'This code is copyrighted and has' limited warranties.Please see http://w
'     ww.Planet-Source-Code.com/vb/scripts/Sho
'     wCode.asp?txtCodeId=3201&lngWId;=1'for details.'**************************************

' 1. Create a new form.
' 2. Add a Textbox,a pictureBox and an I
'     net control.
' 3. Let them all have their default nam
'     e. 
' 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

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
9/7/1999 10:58:00 PM:Björn Larsson
If you're always connected to the 
internet, put the program in the 
autostart folder.. :-) 
This makes the 
program daily.. :-)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/9/1999 1:44:00 PM:Randal
Best Program Ever!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/13/1999 8:18:00 AM:Jonthan Shields
What Internet Control are you using?  
The Microsoft Internet Control does not 
seem to work. 
Thanks,
Jonathan
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/13/1999 12:30:00 PM:Shawn Verrall
I had the same problem Jonathan did.  
You nned to use Microsoft Internet 
Transfer Control (6.0 for me)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/15/1999 11:17:00 AM:hwilliam@my-deja.com
I could not get this code to work!
I 
get an invalid procedureor arguement 
error, 
on the line where nrString has 
it's first
assignment 
made.
HELP!
hwilliam@my-deja.com
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/15/1999 9:29:00 PM:Tax Man
Actually, it would be nice if this 
thing would update the windows 
wallpaper.  If you guys want to know 
how to do this, MSDN has a whitepaper 
on changing the wallpaper 
at:
http://msdn.microsoft.com/library
/techart/msdn_msdn192.htm
Take a 
look and enjoy!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/16/1999 7:19:00 AM:Akhilesh
This is good Idea, but can be improved 
at lot.
Well, Good Attempt.
   With Best Wishes,
          Akhilesh
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/20/1999 7:02:00 PM:MadArse
Sounds cool, but which component has 
the Internet Control?  Im using VB5 
sp3
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/27/1999 9:00:00 PM:EM Dixson
A nice try but I have tried the MS 
Internet Control and t doesn't fly. 
Sorry guy. 
VISIT MY SITE: 
http://developer.ecorp.net
FREE Visual 
Basic Source Code
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/2/1999 2:41:00 PM:zaid
guys i tried this and after executing 
my program 2 or three times i get some 
system error saying "System Error. Call 
not colintialized" any can help me 
please???
thnks
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/12/1999 2:56:00 PM:kennyle
Great Program
I have a question 
What 
are other datatypes for inet 
control
beside icByteArray?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/20/1999 9:23:00 AM:Scott Hutchinson
It worked great. I modified it to use 
the SetTimer API so it automatically 
refreshes ever 12 hours. Unfortunately, 
I don't have a way to turn it off 
(except using the Task Manager to kill 
the process). Other than giving it its 
own systray icon, I'm not sure how else 
to do it. Unless I could make it an NT 
service?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/25/1999 7:39:00 AM:Road Dogg
This works great, exept when i make it 
an .exe and run it I get a "The memory 
could not be read", this is probly 
becuse i use this program on an NT 
workstation, does anybody know what 
changes have to be made to avoid this 
error on an nt workstation. 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/28/1999 5:14:00 PM:Tom Williams
This is a pretty need demonstration and 
it works great on Win95 and Win98.  
However, the SystemParametersInfo() API 
call does not effect Windows 
NT.
Does anyone know how to get 
around this.  If have done a search on 
MSDN and have not located any other 
functions for NT.
Thanks in advance.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/28/1999 6:55:00 PM:Tom Williams
I also found that this code will blow 
up the first time that you use it.  It 
is like it doen't recognize that the 
new Dilber.Gif exists in the hard 
drive.  However, once you have the 
first file on your hard drive it works 
pretty good.
On NT though I found 
that you can get the image to show.  
You have to get the properties for your 
Desktop and then close it out.  It is 
like the picture has been set for your 
desktop but the screen just has not 
been updated.  F5 doesn't even do 
it.
If someone has a workaround let 
me know.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/28/1999 8:12:00 PM:Tom Williams
Ok Last Time...
When I close the 
Application on an NT system I get a 
Doctor Watson error stating; Could not 
attach to the application, Windows NT 
Error Code=87.
What's up with 
that????
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/23/1999 12:32:00 PM:Thorsten
Excellent code... I was wondering, how 
would you take this code and apply it 
to a page that has a gif image on it 
but the image is not archived. The 
image is reproduced by an external 
program. Email me if you need more 
info.
Thanks
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/19/1999 9:21:50 PM:Mouse
THANKS!!! this werks GREAT!!!!
you 
have made my life just that much 
easier! keep up the great werk!!!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/12/2000 4:36:21 PM:Zaid
hi there,
the wallpaper thingy 
does'nt work for winNT. any solutions???
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/16/2000 11:22:44 PM:LNZ
This Kode Roques, Keep ^ the good WERK.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/25/2000 7:15:30 PM:Benii
When I try to run it it give a pop up 
window that says "Compiler error: 
invalid outside procedure" and 
highlights 
"http://www.unitedmedia.com/comics/dilbe
rt/archive/" from Text1.Text = 
Inet1.OpenURL("http://www.unitedmedia.co
m/comics/dilbert/archive/") Does anyone 
know how I could fix this?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/8/2000 10:32:29 AM:Steven Denman
I have VB 6.0 and have loaded the inet 
transfer control. Although it doesn't 
set the text box (stays blank) so the 
prog gets baffed. any ideas ? 
thx
denmsd94@christs-hospital.org.uk
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/21/2000 3:06:56 PM:v0doo600
How exactly do i make this work?
as 
soon as i compile the program
and 
iopen it the thing hides or something.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/21/2000 3:10:38 PM:v0doo600
in other words the file will get saved 
to my drive C:
but it wont make my 
background the comic
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/1/2003 3:26:03 AM:
i keep trying this program and it 
doesnt seem to want to work. it keeps 
giving me "Inet1, variable not 
defined."
maybe it's just me, but i 
don't know how to get past this, i have 
Microsoft Internet Transfer Controls 
6.0 enabled.
please help a newbie in 
need :( :( :(
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.