program,Downloads,archive,page,from,extracts,
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
RentACoder Stats

 Code:  lines
 Jobs: 0 postings

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for RentACoder.
Wrapping Scrolling Text
By Paranoid_Androi d on 7/2


Create A Dummy File
By AML on 7/2


Click here to see a screenshot of this code!Captionbar manipulation!
By Peter Hebels on 7/2

(Screen Shot)

A Game Of War
By Co0nest on 7/2


Click here to see a screenshot of this code!KeyGen Example
By Bengie|NET on 7/2

(Screen Shot)

Click here to see a screenshot of this code!OpenBrowser v1.9
By Orlando Jerez on 7/2

(Screen Shot)

SendMessageBySt ring() Example
By Jaime Muscatelli on 7/2


Click here to see a screenshot of this code!FirstSunday
By Jan Paul Penning on 7/2

(Screen Shot)

Click here to see a screenshot of this code!Ikonz v1.0
By Gaurav Creations 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
 
VB icon
Submitted on: 8/24/1999
By: Bjorn Larsson 
Level: Not Given
User Rating: By 109 Users
Compatibility:

Users have accessed this code 8209 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.
 

Windows API/Global Declarations:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

    //**************************************
    //     
    //Windows API/Global Declarations for :D
    //     aily Dilbert
    //**************************************
    //     
    Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
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 langauges 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 th
    //     e 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.
    // By: Bjorn Larsson
    //
    // Returns:2 files on c:\ dilbert.gif an
    //     d dilbert.bmp
    ' A changed wallpaper.
    //
    // Assumes:You must have an internet con
    //     nection..
    //
    // Side Effects:Sometimes the desktop wa
    //     llpaper is not visible 
    ' unless you refresh the desktop yourself 
    ' or select it manually. I don't know why this happends...
    //
    //This code is copyrighted and has    // limited warranties.Please see http://
    //     www.Planet-Source-Code.com/xq/ASP/txtCod
    //     eId.3201/lngWId.-10/qx/vb/scripts/ShowCo
    //     de.htm    //for details.    //**************************************
    //     
    
    ' 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

 
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:

 
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 | RentACoder 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.