Is there a way to do animation in a PictureBox?
can I just flip through pics in an imagelist?
is there a better way?
Printable View
Is there a way to do animation in a PictureBox?
can I just flip through pics in an imagelist?
is there a better way?
Yes, Use a Timer to flip through an Imagelist
You can use a timer and a command button to make a image or picture move or you can you just use a timer and add a Loop
Im msut be tired....
I cant get it to work!???
How do i set the picbox.picture = Imagelist.????
:rolleyes:
You always could try BitBlt. Here's a good example:
http://www.planetsourcecode.com/xq/A...s/ShowCode.htm
Sweet! Thats Perfect!
hey Bloodeye...that focus problem is still a problem...
What happening is...when I am typing a response (or anything) in the webpage, and the timer goes to refresh the list of members online, the main Webbroser loses focus.
I have WB1 & WB2
WB1 Main window
when I call:
Wb2.Navigate "http://www.vbforums.com"
wb1 loses focus...and I cant seem to capture the activeElement in the page, and retrun focus to it.
:) any hints would be MOST apreciated!
I haven't looked at VBForums Browser in a while. So let me see if I have this correct. WB1 is the main browser for (surfing, browsing, etc...), and WB2 is just being used to navigate to the main page so that it can determine who's online?
If that's the case, I think your best bet would be to replace WB2 with URLDownloadToFile API. Then there would be no chance of losing focus. As far as capturing the ActiveElement in a page.....I'm sure it can be done, I don't have any ideas on how to do it though.
ok sounds good...
I have never tried URLDownloadtofile....
is there a way to determine its done?
Here's some code from Matthew Gates. Looks like he set's a boolean condition on the file being downloaded or not.
VB Code:
Private Declare Function URLDownloadToFile Lib "urlmon" _ Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL _ As String, ByVal szFileName As String, ByVal dwReserved As Long, _ ByVal lpfnCB As Long) As Long Private Function DownloadFile(URL As String, _ LocalFilename As String) As Boolean Dim lngRetVal As Long lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0) If lngRetVal = 0 Then DownloadFile = True End Function Private Sub Command1_Click() Dim Success As Boolean Success = DownloadFile("http://www.vbsquare.com/images/vbsquare.gif", "C:\vbsquare.gif") If Success = True Then Picture1.Picture = LoadPicture("C:\vbsquare.gif") Else Msgbox "Could not load image!", 16 End If End Sub
insert this code in the timer and set the timer's interval for 5000.
You can edit this the best way you see fit.
Do until Picture1.top= > stopPoint
Picture1.top=Picture1.top+40
Loop
walter...thanks but i was lookin to make an Picbox act like and animated gif...not move around.
BitBlt was the perfect answer.
BTW...BloodEye..I have created the Picture in the COOLBOAR!!
Like IE!!
I have attached the EXE below...This is a So far... Like..hmmm...lets say a Beta I release :rolleyes:
Hey, Looks good. What are you going to do about the menu at the top. Too bad you couldn't make that a child of the coolbar. I thought about using a coolbar, but then ran into that problem. :(
well...I scoured Microsofts site...and of the 8 or so examples using webbrowsers and coolbars...they ALL had a regular menu at the top....So my guess is i'll have to do that.
or..I may create actual pictures of the menu words and make them dropdown buttons...Not sure yet..
so features that you may not notice.
the "forums" butoon will remember the current group..so after you choose the grop from the list...you can just click the main button to jump back to it(tooltip will show which group is chosen) :)
in the code window...you can drag/drop the code from the browser. (sohow it keeps the font and coloring too!..so if there are red words..they stay red...for the moment at least. until its edited or saved/re-loaded)
the bold button..is Toggle on off..but does not "tag" it yet...
and the image for the "busy" in the coolbar is not finished..I just threw it together quickly...sooo.
Glad you like it so far.
:D
I couldn't find the code window at first....and then I noticed the button on the toolbar. Nice rollup effect. :cool: Maybe you could get by with using regular buttons and using the CreatePopupMenu API for your menu. As a matter of fact that's what vbapi.com uses for an example for that API. You may have to play around with it to make it look right. Maybe I'll give the coolbar another chance and use the CreatePopupMenu API for my menus. :D
hmmm..thats a good idea!
but I dont think you would need the api?
just create the popups and call them by the click of the button.
time to play!