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: andrew kabz
  Where is andrew kabz?
 kampala
 Uganda
 andrew kabz
 Tags
Subject: RE: Running Strip Bottom of Form
Thread ID: 310442 Message ID: 310714 # Views: 37 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Thursday, June 23, 2011 6:16:07 PM         
   


> >
> > If i understand your request you need a sort of marquee on your dashboard grid.this is a prototype
> >
> > publi yform
> > yform=newObject("asup")
> > yform.show
> > read events
> > return
> > 
> > DEFINE CLASS asup AS form
> > 	Height = 502
> > 	Width = 997
> > 	ShowWindow = 2
> > 	AutoCenter = .T.
> > 	BorderStyle = 2
> > 	Caption = "My  sales dashboard    -ESC to release form-"
> > 	MaxButton = .F.
> > 	KeyPreview = .T.
> > 	Name = "Form1"
> > 
> > 	ADD OBJECT grid1 AS grid WITH ;
> > 		FontSize = 8, ;
> > 		DeleteMark = .F., ;
> > 		GridLines = 0, ;
> > 		Height = 456, ;
> > 		Left = 0, ;
> > 		RowHeight = 17, ;
> > 		Top = 0, ;
> > 		Width = 996, ;
> > 		HighlightBackColor = RGB(255,146,36), ;
> > 		HighlightForeColor = RGB(128,0,64), ;
> > 		AllowCellSelection = .F., ;
> > 		Themes = .F., ;
> > 		Name = "Grid1"
> > 
> > 	ADD OBJECT text1 AS textbox WITH ;
> > 		FontSize = 14, ;
> > 		Alignment = 2, ;
> > 		Value = "Wait a short moment Please .....", ;
> > 		Height = 36, ;
> > 		Left = 111, ;
> > 		Top = 463, ;
> > 		Width = 876, ;
> > 		OpenWindow = .T., ;
> > 		ForeColor = RGB(255,255,255), ;
> > 		BackColor = RGB(0,0,160), ;
> > 		Name = "Text1"
> > 
> > 	ADD OBJECT text2 AS textbox WITH ;
> > 		FontSize = 14, ;
> > 		Height = 36, ;
> > 		Left = 0, ;
> > 		Top = 463, ;
> > 		Width = 108, ;
> > 		OpenWindow = .T., ;
> > 		ForeColor = RGB(255,0,0), ;
> > 		BackColor = RGB(0,0,0), ;
> > 		Name = "Text2"
> > 
> > 	ADD OBJECT timer1 AS timer WITH ;
> > 		Top = 444, ;
> > 		Left = 732, ;
> > 		Height = 23, ;
> > 		Width = 23, ;
> > 		Enabled = .F., ;
> > 		Interval = 4000, ;
> > 		Name = "Timer1"
> > 
> > 	PROCEDURE KeyPress
> > 		LPARAMETERS nKeyCode, nShiftAltCtrl
> > 		if nkeycode=27
> > 		thisform.timer1.enabled=.f.
> > 		thisform.release
> > 		endi
> > 	ENDPROC
> > 
> > 	PROCEDURE Load
> > 		local oshell
> > 		oshell=newObject("shell.application")
> > 		oshell.toggleDesktop()
> > 
> > 		close data all
> > 		local mytable,xx,myvar
> > 		mytable=home()+"samples\data\customer"
> > 		use (mytable) in 0 shared
> > 		xx=" "
> > 		for i=1 to 10     &&fcount()
> > 		if i<10
> > 		xx=xx+(field(i))+","
> > 		else
> > 		xx=xx+field(i)
> > 		endi
> > 		endfor
> > 		use in (mytable)
> > 
> > 		text to myvar textmerge noshow
> > 		select  <<xx>> from "<<mytable>>" into cursor ycurs
> > 		endtext
> > 		execscript(m.myvar)
> > 
> > 		declare integer Sleep in Kernel32 integer
> > 	ENDPROC
> > 
> > PROCEDURE Init
> > 	with this.grid1
> > 		.recordsource="ycurs"
> > 		.recordsourcetype=1
> > 		.deletemark=0
> > 		.headerHeight=25
> > 		.setall("fontname","Comic sans MS","header")
> > 		.setall("backcolor",rgb(128,128,28),"header")
> > 		.setall("fontsize",12,"header")
> > 		.setall("fontItalic",.t.,"header")
> > 		.autofit()
> > 		.SetAll("DynamicBackColor", "IIF(MOD(RECNO( ), 2)=0,RGB(255,255,155), RGB(70,175,140))", "Column")
> >         .column1.dynamicBackcolor="rgb(128,128,28)"
> > 	endwith
> > 	this.text2.value=nvl(evaluate(field(1)),"")
> > 		this.timer1.enabled=.t.
> > ENDPROC
> > 
> > 	PROCEDURE grid1.KeyPress
> > 		LPARAMETERS nKeyCode, nShiftAltCtrl
> > 		if nkeycode=27
> > 		thisform.release
> > 		endi
> > 	ENDPROC
> > 
> > 	PROCEDURE timer1.Timer
> > 		sele ycurs
> > 		skip
> > 		if lastkey()=27
> > 		this.enabled=.f.
> > 		endi
> > 		if eof()
> > 		locate
> > 		endi
> > 		thisform.grid1.refresh
> > 		local x
> > 		x=""
> > 		thisform.text2.value=nvl(evaluate(field(1)),"")
> > 		for i=2 to fcount()  && or limited fields number
> > 		x=x+allt(trans(nvl(evaluate(field(i)),"")))+spac(5)
> > 		endfor
> > 		for j=1 to len(x)
> > 		thisform.text1.value=substr(x,1,j)       
> > 		sleep(40)
> > 		endfor
> > 	ENDPROC
> > 	
> > 	PROCEDURE DESTROY
> > 	CLEA EVENTS
> > 	ENDPROC
> > 
> > ENDDEFINE
> > 

> > NB: but you must give a feed back (i already tested you).
> >
> >
> > Regards
> > Yousfi Benameur
>
> Youfsi, this is really great, one of the great things i have seen here on foxite, would you consider creating that strip as a class that can be dropped on a form, so that it can display any information?
>
> Regards
> Andrew

You can do that easily.
extract the controls textbox+timer and put them in a class with PEM's.
you can in init make a parameter as string to display and make a call to.
you can also make these in a top level form (alwaysontop=.t.)....
you can also select the controls (textbox+timer" and in menu save them as class...


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