Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is affected by Set-step-on command
Message
De
16/08/2017 08:49:08
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01653346
Message ID:
01653347
Vues:
86
>Hi there,
>
>un my POS-app is a class which setps up a window for a second monitor.
>It uses Doug Hennigs sfmonitors- class. The class checks if there is a second monitor and loads the form from a form-class and sets its size. In my main app is a peice of code shich does the final setup which is loading a background-image and setting some labels text. This is the code:
>
>
>*SET STEP ON
>IF oApp.cKDMode = "M"
>      kdisp.loadkdisplay()
>      kdisp.cKopfimage =  oSkin.cthead
>      kdisp.nFontColor = 8454143
>      kdisp.setupkdisplay()
>      kdisp.cZ1 = oApp.cWerbetext1
>      kdisp.cZ2 = oApp.cWerbetext2
>      kdisp.setwerbetext()
>Endif   
>
>
>But after removing all debugger statements it does not work anymore and my second window is just gray.
>When I activate the set-step-on-command again, it works within the IDE.
>I tried to replace the set-step-on-statement with doevents andor the windows apu-function sleep but without any success.
>So my question ist, what else rhe set-step-on-command is doing and how can I get it working.

I use sfMonitors for my screen savior, so it displays photos on both monitors:
loSfMon=Newobject("SFMonitors", "sfMonitors.prg")
llImaUspravnih=.F.
For i=1 To lnKolikoMonitora
	loMon=goZb.Item(i)
	Do Case
		Case 	i=1
			loSize=loSfMon.GetPrimaryMonitorSize()
		Otherwise
*Set Step On
			With goZb.Item(1)
*[2015/01/17 17:12:40] nDragan - ispitaj jednog dana ostale kombinacije, zasad proveravamo samo jo� jedan monitor.
				llKreniLevuOd=Iif(.Left=0 And loSfMon.nright> .Width, .Width+10, .Left-10)
				llKreniGornjuOd=Iif(.Top<100, loSfMon.nbottom-.Height-10, .Top/2)
			Endwith
			loSize=loSfMon.GetMonitorSize(llKreniLevuOd, llKreniGornjuOd)
	Endcase
	With loMon
		.BackColor=0
		.Move(loSize.nLeft, loSize.nTop, loSize.nWidth, loSize.nHeight)
		.Resize()
		.AddProperty("razmera", .Height/.Width)
		llImaUspravnih=llImaUspravnih Or .razmera>1
		.AddProperty("uslov", ".t.")
		.AddProperty("dc", GetWindowDC(.HWnd))
	Endwith
Endfor
Then later, when I retrieve a path to a .jpg file, I set it as the .picture property of an image object, and .show() the form. Don't remember why I .Resize() after .Move() - it should call .resize() automatically. Perhaps a leftover line from earlier versions... it just sets the size of the image and the label on the bottom to 100% width of the form, and height of the image to label.top, so there's nothing else on the form. If that matters, the properties of the form class are
	BorderStyle=0
	TitleBar=0
	ShowWindow=2
*	WindowState=2
	BackColor=0
*	ALWAYSONTOP=.T.
*	BORDERSTYLE=1
	Closable=.F.
	ControlBox=.F.
	ColorSource=0
	Desktop=.T.
	MaxButton=.F.
	MinButton=.F.
	sizebox=.F.
	ShowInTaskbar=.F.
	zoombox=.F.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform