Visual Basic - Cambiar tipo de letra

Life is soft - evento anual de software empresarial
 
Vista:

Cambiar tipo de letra

Publicado por José Manuel García Enríquez (1 intervención) el 06/12/2006 02:57:30
hola estoy haciendo un mini word , cree un fichero en el que le puse la opcion fuente le puse el siquiente codigo pero no me corre me marca errorno se por que agradesere si me pueden ayudar , este es el codigo:

Private Fuente As New StdFont
Private Sub fue_Click()
On Error GoTo RutinaDeError
CommonDialog1.Flags = cdlCFBoth Or cdlCFEffects
CommonDialog1.CancelError = True
CommonDialog1.ShowFont
With Fuente
.Name = CommonDialog1.FontName
.Bold = CommonDialog1.FontBold
.Italic = CommonDialog1.FontItalic
.Strikethrough = CommonDialog1.FontStrikethru
.Size = CommonDialog1.FontSize
End With
Set Text1.Font = Fuente
Text1.Cls
Call formatoTexto(Text1.Text)
Exit Sub
RutinaDeError:
If Err.Number = cdlCancel Then Exit Sub
MsgBox Err.Description
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
sin imagen de perfil

RE:Cambiar tipo de letra

Publicado por ricaurtem (313 intervenciones) el 07/12/2006 13:42:06
Creo que tienes que dimensionar la variable Fuente como algo, no se si como objeto o algo asi, pero yo que tu resumiria algo asi mejor.

Dim fuente as Textbox


Set Text1.Font = Fuente.Font

Text1.Cls

Call formatoTexto(Text1.Text)

Exit Sub
RutinaDeError:
If Err.Number = cdlCancel Then Exit Sub
MsgBox Err.Description
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