Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Algeria
 Yousfi Benameur
 To: Nandkishor Lande
  Where is Nandkishor Lande?
 Pune
 India
 Nandkishor Lande
 Tags
Subject: RE: Running Strip Bottom of Form
Thread ID: 310442 Message ID: 310771 # Views: 27 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Friday, June 24, 2011 9:02:48 AM         
   


> please
> I have 'JPG' Directory on C drive, i want to change main form pictures setting by timer. in directory there are 16 pictures how can code it. When i running my application
> L. Nandkishor

publi yform
yform=newobject("asup")
yform.show(1)
return

DEFINE CLASS asup AS form
    Top = 12
	Left = 259
	Height = 320
	Width = 514
	Caption = "Form1"
	Name = "Form1"

	ADD OBJECT timer1 AS timer WITH ;
		Top = 24, ;
		Left = 456, ;
		Height = 23, ;
		Width = 23, ;
		Enabled = .F., ;
		Interval = 30000, ;  && adapt the interval as you want-few large to dont slow your form.
		Name = "Timer1"

	PROCEDURE Init
		publi yrep
		yrep=addbs(getdir())   &&can put the folder in your project folder and point it with relative path
		*Point here to a folder where you have stored images.these must fill all the form 
		*otherwise you can have multiple images in form (not stretched).
		

		create cursor ycurs (yimage c(200))
		for i=1 to adir(gabase,yrep+"*.jpg")   &&here all jpg pictures in a folder you choiced...can put any number of pictures.
		insert into ycurs values (yrep+gabase(i,1))
		endfor
		locate
		this.picture=yrep+gabase(1,1)
		this.timer1.enabled=.t.
	ENDPROC

	PROCEDURE timer1.Timer
		sele ycurs
		try
		skip
		catch
		if eof()
		locate
		endi
		endtry
		thisform.picture=yimage
	ENDPROC


ENDDEFINE


Regards
Yousfi Benameur

ENTIRE THREAD

Running Strip Bottom of Form Posted by Nandkishor Lande @ 6/21/2011 12:59:57 PM
RE: Running Strip Bottom of Form Posted by subhankar pandey @ 6/21/2011 5:56:34 PM
RE: Running Strip Bottom of Form Posted by sri kishan @ 6/22/2011 5:21:08 AM
RE: Running Strip Bottom of Form Posted by sri kishan @ 6/22/2011 6:25:02 AM
RE: Running Strip Bottom of Form Posted by Nandkishor Lande @ 6/22/2011 7:53:35 PM
RE: Running Strip Bottom of Form Posted by Yousfi Benameur @ 6/23/2011 12:55:27 AM
RE: Running Strip Bottom of Form Posted by andrew kabz @ 6/23/2011 7:26:58 AM
RE: Running Strip Bottom of Form Posted by Yousfi Benameur @ 6/23/2011 6:16:07 PM
RE: Running Strip Bottom of Form Posted by Nandkishor Lande @ 6/24/2011 5:09:43 AM
RE: Running Strip Bottom of Form Posted by Nandkishor Lande @ 6/24/2011 5:33:08 AM
RE: Running Strip Bottom of Form Posted by Yousfi Benameur @ 6/24/2011 9:02:48 AM
RE: Running Strip Bottom of Form Posted by Nandkishor Lande @ 6/24/2011 10:08:54 AM
RE: Running Strip Bottom of Form Posted by Yousfi Benameur @ 6/24/2011 10:40:43 AM