Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting
Message
From
20/04/2005 13:55:12
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Formatting
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01006649
Message ID:
01006649
Views:
111
Hello

I need to display in a messagebox some text, but i would like to know if i can format the text return by my messagebox, for exemple :
1-Changing the color of text
2-if the field is numeric an negative ,displaying ex: -4.00 or (-4.00)

my code is like this one an my database in SQL SERVER 2000 :

texto= " "
select bo
u_sqlexec([select eplafond from cl where cl.no=']+str(bo.no)+['],[tempcl])
u_sqlexec([select sum(edeb-ecred) as saldo from cc where cc.no=']+str(bo.no)+['],[tempcc])
u_sqlexec([select sum(evalor) as predatados from ch where ch.jadepo=0 and ch.no=']+str(bo.no)+['],[tempch])
u_sqlexec([select sum(etotaldeb) as reservas from bo where bo.fechada=0 and bo.ndos=7 and bo.no=']+str(bo.no)+['],[tempbo])
u_sqlexec([select sum(edeb-ecred) as saldoft from cc where cc.no=']+str(bo.no)+['and cc.dataven <= getdate()],[tempft])

if bo.ndos=7
if tempcl.eplafond<(iif(isnull(tempbo.reservas),0,tempbo.reservas)+iif(isnull(tempcc.saldo),0,tempcc.saldo)+iif(isnull(tempch.predatados),0,tempch.predatados))
texto="Plafonds ultrapassados..........!!! " + chr(13)+chr(13)
else
texto="Plafonds OK..........!!! , "+chr(13)+chr(13)+"Veja valor das facturas vencidas..!!" + chr(13)+chr(13)
endif

texto=texto+"Plafond :" + str(tempcl.eplafond)+chr(13)+"Pendentes:"+str(tempcc.saldo)+chr(13)
texto=texto+"Ord.Sep.:"+str(iif(isnull(tempbo.reservas),0,tempbo.reservas))+chr(13)+"Chq.PDat.: "
texto=texto+str(iif(isnull(tempch.predatados),0,tempch.predatados))+chr(13)
texto=texto+"Facturas Vencidas:"+str(iif(isnull(tempft.saldoft),0,tempft.saldoft))

messagebox(texto,"AVISO...! ",6)

&&messagebox("Atenção plafond ultrapassado...!!",64,"AVISO",0)
return .t.
endif
return .f.


Many thanks
Luis Santos
Next
Reply
Map
View

Click here to load this message in the networking platform