|
-
Apr 8th, 2001, 04:08 PM
#1
Thread Starter
Member
Hi There,
How can I Implement a banner system in VB, just like the download accelearator has?
If you anyone has some code it would be nice.
Thanks,
João Pinto
-
Apr 8th, 2001, 04:15 PM
#2
-
Apr 8th, 2001, 04:28 PM
#3
Thread Starter
Member
I'me getting a error type mismatch in the line:
d = Inet.openurl("http://www.site.com/images/banners/banner.gif")
Do you know why?
Thanks,
João Pinto
-
Apr 8th, 2001, 04:33 PM
#4
Use a WebBrowser control for this, then use the following method to navigate.
Code:
WebBroswer1.Navigate "www.site.com/banner1.html"
-
Apr 8th, 2001, 04:39 PM
#5
Frenzied Member
You can use:
Code:
Dim bData() As Byte ' Data variable
Dim intFile As Integer ' FreeFile variable
intFile = FreeFile() ' Set intFile to an unused
' file.
' The result of the OpenURL method goes into the Byte
' array, and the Byte array is then saved to disk.
bData() = Inet1.OpenURL(strURL, icByteArray)
Open "C:\banner.gif" For Binary Access Write _
As #intFile
Put #intFile, , bData()
Close #intFile
OR:
Code:
Dim intFile As Integer ' FreeFile variable
intFile = FreeFile() ' Set intFile to an unused
' file.
' The result of the OpenURL method goes into the Byte
' array, and the Byte array is then saved to disk.
Open "C:\banner.gif" For Output As #intFile
Put #intFile, , Inet1.OpenURL(strURL)
Close #intFile
Then use
Code:
image1.picture = loadpicture("C:\Banner.gif")
The last code is not debugged, so that's why it's wrong.
Last edited by Microbasic; Apr 8th, 2001 at 04:45 PM.
MicroBasic
Dragon Shadow Trainer
There is no good or evil in the world...only programmers and fools .
-
Apr 8th, 2001, 04:43 PM
#6
Frenzied Member
Originally posted by Decepticon Megatron, whose authority is being questioned.
Use a WebBrowser control for this, then use the following method to navigate.
Code:
WebBroswer1.Navigate "www.site.com/banner1.html"
Megatron, it's better to use an inet control, because a WebBrowser
1) Takes more resources
2) Looks clumsy - Won't even DISPLAY inages if the feature is turned off in IE
3) Slow
4) By Microsoft
5) Has a 3D border and right-click context menus
MicroBasic
Dragon Shadow Trainer
There is no good or evil in the world...only programmers and fools .
-
Apr 8th, 2001, 04:55 PM
#7
1) Can't argue with that
2) huh??
3) You can compensate by loading your banner first, then showing your App after the loading is done.
4) So?
5) 3D borders look nice. It's a matter of preference
PictureBoxes cannot display HTML files, a WebBroswer can.
-
Apr 8th, 2001, 06:21 PM
#8
Addicted Member
1) works only when the user has ie 4 or above
2) in internet explorer there's an option to turnoff images (only alt-text would be visible)
3) slow vs. safe way to show an image... 
4) Microsoft Internet Controls and Microsoft Internet Transfer Control... Isn't it both by MS???
5) just put it in another container... move it to -30, -30, Parent's Scalewidth+60, Parent's Scaleheight+60 ...
5b) Microsoft has provided us with a "powerful" dll that disables the rightclick and allows many other things...
Wouldn't it be a nice question for a poll??
Code that I author is neither elegant nor efficient. It is, however, functional. Once I get something that works, I'm generally satisfied with myself - I mean, if it works, that's good enough, right?
Originally posted by aknisely
Sorry, but I feel uncomfortable on CC with clothes on
__________________
The truth ... is out there!
-
Apr 8th, 2001, 06:28 PM
#9
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|