FoxPro/Visual FoxPro - Formato en Messagebox

 
Vista:

Formato en Messagebox

Publicado por brigi (172 intervenciones) el 20/03/2007 13:37:24
Hola a todos,

En una aplicación he puesto un messagebox pero quiero cambiar los formatos de los textos que aparecen. Se puede hacer?

Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Formato en Messagebox

Publicado por Plinio (7841 intervenciones) el 20/03/2007 14:54:42
Que deceas que aparezca?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:Formato en Messagebox

Publicado por Hector R. De los Santos (270 intervenciones) el 20/03/2007 15:14:30
Saludos...
El commando messagebox envia el mensaje con su formato de letra predeteminado por el Windows, ya si deseas cambiar el formato de Fuente(size,name,style) debes usar APIS's, lo cual es un poco complicadillo, por si quieres saber como se hace aqui te pasteo el link:
http://www.news2news.com/vfp/?function=73
(How to change font name and size in the MessageBox dialog)

Suerte!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:Formato en Messagebox

Publicado por Ernesto Hernandez (4623 intervenciones) el 20/03/2007 23:55:06
Puedes crear tu propia caja de texto y asi le personalizas todo lo que quieras

? msgboxvfp("mensaje",1,2)
function msgboxvfp
parameters letras,icono,numbot
retorno=0
do case
case numbot=1
mensaje = createobject('form')
mensaje.closable = .t.
mensaje.autocenter=.t.
mensaje.minbutton=.f.
mensaje.maxbutton=.f.
mensaje.caption='mensaje del sistema'
mensaje.borderstyle=3
mensaje.height=100
mensaje.alwaysontop=.t.
mensaje.addobject('imagen','icono')
mensaje.imagen.visible=.t.
mensaje.addobject('etiqueta','eti')
mensaje.etiqueta.caption=alltrim(letras)
mensaje.etiqueta.visible=.t.
mensaje.addobject('aceptar','boton1')
mensaje.aceptar.visible=.t.
mensaje.show
read events
return retorno
case numbot=2
mensaje = createobject('form')
mensaje.closable = .t.
mensaje.autocenter=.t.
mensaje.minbutton=.f.
mensaje.maxbutton=.f.
mensaje.caption='mensaje del sistema'
mensaje.borderstyle=3
mensaje.height=100
mensaje.alwaysontop=.t.
mensaje.addobject('imagen','icono')
mensaje.imagen.visible=.t.
mensaje.addobject('etiqueta','eti')
mensaje.etiqueta.caption=alltrim(letras)
mensaje.etiqueta.visible=.t.
mensaje.addobject('si','boton1')
mensaje.si.visible=.t.
mensaje.addobject('no','boton2')
mensaje.no.visible=.t.
mensaje.show
read events
return retorno
case numbot=3
mensaje = createobject('form')
mensaje.closable = .t.
mensaje.autocenter=.t.
mensaje.minbutton=.f.
mensaje.maxbutton=.f.
mensaje.caption='mensaje del sistema'
mensaje.borderstyle=3
mensaje.height=100
mensaje.alwaysontop=.t.
mensaje.addobject('imagen','icono')
mensaje.imagen.visible=.t.
mensaje.addobject('etiqueta','eti')
mensaje.etiqueta.caption=alltrim(letras)
mensaje.etiqueta.visible=.t.
mensaje.addobject('si','boton1')
mensaje.si.visible=.t.
mensaje.addobject('no','boton2')
mensaje.no.visible=.t.
mensaje.addobject('cancelar','boton3')
mensaje.cancelar.visible=.t.
mensaje.show
read events
return retorno
otherwise
messagebox('error',48,'sistema')
endcase
endfunc

define class eti as label
top=30
left=65
height=25
autosize=.t.
caption=alltrim(letras)
enabled=.t.
procedure init
thisform.width=(this.width)+(mensaje.imagen.width)+67
endproc
enddefine

define class icono as image
top=20
left=10
height=80

procedure init
do case
case icono=1
this.picture='c:\prestamos personales\iconitos.bank00a'
case icono=2
this.picture='c:\prestamos personales\iconitos\bill00b'
case icono=3
this.picture='c:\prestamos personales\iconitos\bill00d'
endcase
enddefine

define class boton1 as commandbutton
top = 75
height = 23
width = 100
procedure init
if numbot=1
this.left=(mensaje.width/2)-(this.width/2)
else
if numbot=2
thisform.width=(this.width*2)+4
if ((mensaje.etiqueta.width)+(mensaje.imagen.width)+67)>thisform.width
thisform.width=((mensaje.etiqueta.width)+(mensaje.imagen.width)+67)
this.left=(mensaje.width/2)-(this.width)
else
thisform.width=(this.width*2)+4
this.left=(mensaje.width/2)-(this.width)
endif
else
if numbot=3
thisform.width=(this.width*3)+4
if ((mensaje.etiqueta.width)+(mensaje.imagen.width)+67)>thisform.width
thisform.width=((mensaje.etiqueta.width)+(mensaje.imagen.width)+67)
this.left=(mensaje.width/2)-(this.width)-2-(this.width/2)
else
thisform.width=(this.width*3)+4
this.left=(mensaje.width/2)-(this.width)-2-(this.width/2)
endif
endif
endif
endif
endproc
procedure valid
retorno=1
mensaje.removeobject('etiqueta','eti')
letras=''
clear windows
clear events
endproc
enddefine

define class boton2 as commandbutton
top = 75
height = 23
width = 100
procedure init
this.left=(mensaje.si.left)+(mensaje.si.width)+2
endproc
procedure valid
retorno=2
clear windows
clear events
endproc
enddefine

define class boton3 as commandbutton
top = 75
height = 23
width = 100
procedure init
this.left=(mensaje.no.left)+(mensaje.no.width)+2
endproc
procedure valid
retorno=3
clear windows
clear events
endproc
enddefine


Suerte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar