|
|
Hello,
I apologize for posting this here but I can't get any response to a question on the VStudio group so I thought I would post this question here. The Access groups are usually the best source of help for any kind of question under the sun. I want to do a website slideshow (it was easy with Access) and can't get the images to refresh. Here is the VB code I used:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim i As Integer
'For i = 1 To 812 For i = 1 To 6 txtImageNumber.Text = i imgMain.ImageUrl = "~/Chucky/pics/" & i & "small.jpg"
'Control the speed Dim start, finish As Double start = Microsoft.VisualBasic.DateAndTime.Timer 'Set end time for 1-second duration. finish = start + 2.0 Do While Microsoft.VisualBasic.DateAndTime.Timer < finish ' Nothing Loop Beep() 'Test
Next i End Sub
The images are labeled 1small.jpg to 812small.jpg. The file name is constructed and updates the ImageURL property of a pictureframe control (like an unbound picture frame in Access)
The problem is that the picture frame doesn't refresh during the iteraration, but on the last picture. In this case the 6th picture. If I itereated through all 812 pics it would refresh on 812small.jpg. There doesn't seem to be any method like Me.Repaint available to repaint the screen. Does anyone have any experience in this area?
Thank you for any help and God Bless,
Mark A. Sam
|
|
hi Mark,
Mark A. Sam wrote:
[Quoted Text] > The problem is that the picture frame doesn't refresh during the > iteraration, but on the last picture. In this case the 6th picture. If I > itereated through all 812 pics it would refresh on 812small.jpg. There > doesn't seem to be any method like Me.Repaint available to repaint the > screen. Does anyone have any experience in this area?
I would guess that you need an analog to
Function DoEvents() As Integer Member of VBA.Interaction
mfG --> stefan <--
|
|
Stefan,
It would seem like it, however to my knowledge and experience. DoEvents in Access halts execution to allow outside programs to run, not processes in Access. The closest thing in .Net that I could find is Postback, but I can't find a way to use it. Maybe it can't be done.
God Bless,
Mark
"Stefan Hoffmann" <ste5an[ at ]ste5an.de> wrote in message news:uIcksjHYJHA.652[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text] > hi Mark, > > Mark A. Sam wrote: >> The problem is that the picture frame doesn't refresh during the >> iteraration, but on the last picture. In this case the 6th picture. If >> I itereated through all 812 pics it would refresh on 812small.jpg. There >> doesn't seem to be any method like Me.Repaint available to repaint the >> screen. Does anyone have any experience in this area? > I would guess that you need an analog to > > Function DoEvents() As Integer > Member of VBA.Interaction > > > mfG > --> stefan <--
|
|
hi,
Mark A. Sam wrote:
[Quoted Text] > It would seem like it, however to my knowledge and experience. DoEvents in > Access halts execution to allow outside programs to run, not processes in > Access. The closest thing in .Net that I could find is Postback, but I > can't find a way to use it. Maybe it can't be done.
What about that:
Public Shared Sub DoEvents() Member of System.Windows.Forms.Application
mfG --> stefan <--
|
|
I guess I'm not following you. It looks like you are offering a solution, but I don't know how to implement it. My app is on a website, not a desktop.
"Stefan Hoffmann" <ste5an[ at ]ste5an.de> wrote in message news:O216MOIYJHA.1324[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text] > hi, > > Mark A. Sam wrote: >> It would seem like it, however to my knowledge and experience. DoEvents >> in Access halts execution to allow outside programs to run, not processes >> in Access. The closest thing in .Net that I could find is Postback, but >> I can't find a way to use it. Maybe it can't be done. > What about that: > > Public Shared Sub DoEvents() > Member of System.Windows.Forms.Application > > > mfG > --> stefan <--
|
|
hi,
Mark A. Sam wrote:
[Quoted Text] > I guess I'm not following you. It looks like you are offering a solution, > but I don't know how to implement it. My app is on a website, not a > desktop.
Ok. What kind of application do you have? ASP.NET?
mfG --> stefan <--
|
|
Just browsing through trying to solve a problem of my own, but I will take a stab at an answer - which you probably won't like...
Rendering of your images takes place after you exit your routine, which can be overcome fairly easily in a Windows application. But, as you stated, you are writing a web application, and that is a little more problematic because it hard to trade control back and forth between the browser and your .NET script. What you need is a control that renders independently from your browser.
PowerPoint has a viewer that will do this for you on a web page. Have you considered putting individual slides into a PowerPoint presentation and run the slideshow with a timer between each slide?
-- Clay Watson Lockheed Martin Aeronautics Company Ft. Worth, Texas
"Mark A. Sam" wrote:
[Quoted Text] > Hello, > > I apologize for posting this here but I can't get any response to a question > on the VStudio group so I thought I would post this question here. The > Access groups are usually the best source of help for any kind of question > under the sun. I want to do a website slideshow (it was easy with Access) > and can't get the images to refresh. Here is the VB code I used: > > Protected Sub Button1_Click(ByVal sender As Object, ByVal e As > System.EventArgs) Handles Button1.Click > Dim i As Integer > > 'For i = 1 To 812 > For i = 1 To 6 > txtImageNumber.Text = i > imgMain.ImageUrl = "~/Chucky/pics/" & i & "small.jpg" > > 'Control the speed > Dim start, finish As Double > start = Microsoft.VisualBasic.DateAndTime.Timer > 'Set end time for 1-second duration. > finish = start + 2.0 > Do While Microsoft.VisualBasic.DateAndTime.Timer < finish > ' Nothing > Loop > Beep() 'Test > > Next i > End Sub > > The images are labeled 1small.jpg to 812small.jpg. The file name is > constructed and updates the ImageURL property of a pictureframe control > (like an unbound picture frame in Access) > > The problem is that the picture frame doesn't refresh during the > iteraration, but on the last picture. In this case the 6th picture. If I > itereated through all 812 pics it would refresh on 812small.jpg. There > doesn't seem to be any method like Me.Repaint available to repaint the > screen. Does anyone have any experience in this area? > > Thank you for any help and God Bless, > > Mark A. Sam > > > >
|
|
There are so many .Net's that I don't really know how to classify it. I use Visual Web Developer 2005 and publish onto a server which used .Net Framework 3.0.
"Stefan Hoffmann" <ste5an[ at ]ste5an.de> wrote in message news:%23X3GmJJYJHA.552[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text] > hi, > > Mark A. Sam wrote: >> I guess I'm not following you. It looks like you are offering a >> solution, but I don't know how to implement it. My app is on a website, >> not a desktop. > Ok. What kind of application do you have? ASP.NET? > > > mfG > --> stefan <--
|
|
Clay,
This started out at a Powerpoint slideshow, but I couldn't get that to Autorun and no one from the Powerpoint group had an answer so I did it in Access. I should have done that in the first place, but didn't know enough about Powerpoint to know that I couldn't have done it much better in Access. Then the client asked for it to be on a website. No problem, except getting it to autorun. I don't really need this functionality, but I thought I'd like to be consistent and have the same functionality. My web app as it stands is as good as a powerpoint presentation, and if I couldn't get powerpoint to autorun on a desktop, I doubt it will on the website.
God Bless,
Mark
"Clay_LMCO" <ClayLMCO[ at ]discussions.microsoft.com> wrote in message news:4F82B323-B92C-40F1-B828-F55AE20F1093[ at ]microsoft.com...
[Quoted Text] > Just browsing through trying to solve a problem of my own, but I will take > a > stab at an answer - which you probably won't like... > > Rendering of your images takes place after you exit your routine, which > can > be overcome fairly easily in a Windows application. But, as you stated, > you > are writing a web application, and that is a little more problematic > because > it hard to trade control back and forth between the browser and your .NET > script. What you need is a control that renders independently from your > browser. > > PowerPoint has a viewer that will do this for you on a web page. Have > you > considered putting individual slides into a PowerPoint presentation and > run > the slideshow with a timer between each slide? > > -- > Clay Watson > Lockheed Martin Aeronautics Company > Ft. Worth, Texas > > > "Mark A. Sam" wrote: > >> Hello, >> >> I apologize for posting this here but I can't get any response to a >> question >> on the VStudio group so I thought I would post this question here. The >> Access groups are usually the best source of help for any kind of >> question >> under the sun. I want to do a website slideshow (it was easy with >> Access) >> and can't get the images to refresh. Here is the VB code I used: >> >> Protected Sub Button1_Click(ByVal sender As Object, ByVal e As >> System.EventArgs) Handles Button1.Click >> Dim i As Integer >> >> 'For i = 1 To 812 >> For i = 1 To 6 >> txtImageNumber.Text = i >> imgMain.ImageUrl = "~/Chucky/pics/" & i & "small.jpg" >> >> 'Control the speed >> Dim start, finish As Double >> start = Microsoft.VisualBasic.DateAndTime.Timer >> 'Set end time for 1-second duration. >> finish = start + 2.0 >> Do While Microsoft.VisualBasic.DateAndTime.Timer < finish >> ' Nothing >> Loop >> Beep() 'Test >> >> Next i >> End Sub >> >> The images are labeled 1small.jpg to 812small.jpg. The file name is >> constructed and updates the ImageURL property of a pictureframe control >> (like an unbound picture frame in Access) >> >> The problem is that the picture frame doesn't refresh during the >> iteraration, but on the last picture. In this case the 6th picture. If >> I >> itereated through all 812 pics it would refresh on 812small.jpg. There >> doesn't seem to be any method like Me.Repaint available to repaint the >> screen. Does anyone have any experience in this area? >> >> Thank you for any help and God Bless, >> >> Mark A. Sam >> >> >> >>
|
|
|