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: Kulwant Singh
  Where is Kulwant Singh?
 Shimla
 India
 Kulwant Singh
 Tags
Subject: RE: single form exe
Thread ID: 269032 Message ID: 269086 # Views: 41 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Friday, July 16, 2010 11:18:08 AM         
   


> Dear Experts,
>
> I need to run a single form EXE, the size of a Splash Screen. My problem is that I do not want the VFP Screen, just want the single form on the desktop. If I do not use "Read Events" the exe flashes and disappears but if I use read events, a disabled menu with four items appears automatically with the form in the centre of a VFP Screen.
>
> I do not want to maximize the Form, I do not want the menu to appear, just the form in the centre of the desktop.
>
> Please guide me.
>
> Thanks!
> kulwant
> (Help Save the TIGER. Save Wildlife. Live & let Live)

This is a funny programmatic project entierly packed in an output exe.Make only sur you have this picture in "graphics\gifs\morphfox.gif".
*!*--Author Yousfi Benameur El Bayadh Algeria
*!*--Time stamp vendredi 16 juillet 2010; 10:14:17
*!*--Subject :Funny programmatic proj with top level form
*!*--Version VFP9SP2

*!*Begin code
set safe off
local myvar
text to myvar noshow
yform=createObject("asup")
yform.show
read events
quit

DEFINE CLASS asup AS form
	Top = 72
	Left = 286
	Height = 250
	Width = 375
	ShowWindow = 2
	DoCreate = .T.
	backcolor=0
	Caption = "myForm...in exe"
	HalfHeightCaption = .T.
	Name = "form1"
	
 ADD OBJECT image1 AS image WITH ;
		Picture = home(1)+"graphics\gifs\morphfox.gif", ;
		Stretch = 2, ;
		Height = 204, ;
		Left = 36, ;
		Top = 24, ;
		Width = 300, ;
		anchor=15,;
		Name = "Image1"

ADD OBJECT timer1 AS timer WITH  interval=1000,enabled=.f.,name="timer1"
ADD OBJECT ysound1 AS commandbutton WITH  visible=.f.,name="ysound"


	PROCEDURE Init
		this.autocenter=.t.
		if file(home(1)+"graphics\gifs\morphfox.gif")
		this.image1.picture=home(1)+"graphics\gifs\morphfox.gif"
		else
		this.image1.visible=.f.
		endi
		this.timer1.enabled=.t.
	ENDPROC
	
	
procedure timer1.timer
thisform.ysound.click
endproc	

	Procedure ysound.click
thisform.windowstate=2	
DECLARE integer Beep IN WIN32API integer Freq, integer DurationMs
for f=200 to 3000 step 50
Beep(f,50)
endfor

for f=3000 to 200 step -50
Beep(f,50)
endfor
wait window "" timeout 0.4

thisform.timer1.enabled=.f.
endproc

	PROCEDURE DESTROY
	clea events
	ENDPROC

ENDDEFINE
endtext
set defa to c:\
strtofile(myvar,"my.prg")

text to myvar noshow
screen=off
endtext
strtofile(myvar,"config.fpw")

build proj my recompile from my.prg
BUILD EXE my FROM my RECOMPILE
oshell=createobject("shell.application")
oshell.toggleDeskTop
set safe on

run/n my.exe

*
*!*-- End Code


Regards
Yousfi Benameur

ENTIRE THREAD

single form exe Posted by kulwant singh @ 7/16/2010 7:16:21 AM
RE: single form exe Posted by Jun Tangunan @ 7/16/2010 7:56:23 AM
RE: single form exe Posted by kulwant singh @ 7/16/2010 9:54:58 AM
RE: single form exe Posted by tushar @ 7/16/2010 8:01:56 AM
RE: single form exe Posted by kulwant singh @ 7/16/2010 9:55:49 AM
RE: single form exe Posted by Yousfi Benameur @ 7/16/2010 11:18:08 AM
RE: single form exe Posted by kulwant singh @ 7/16/2010 2:29:46 PM