Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Gráficos
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 29-06-2004
senpiterno senpiterno is offline
Miembro
 
Registrado: abr 2004
Posts: 112
Poder: 23
senpiterno Va por buen camino
vic_ia, aqui esta el codigo en VB:

Código:
'Declaracion de tipo
 
Public Type LOGFONT
  lfHeight As Long
  lfWidth As Long
  lfEscapement As Long
  lfOrientation As Long
  lfWeight As Long
  lfItalic As Byte
  lfUnderline As Byte
  lfStrikeOut As Byte
  lfCharSet As Byte
  lfOutPrecision As Byte
  lfClipPrecision As Byte
  lfQuality As Byte
  lfPitchAndFamily As Byte
  lfFaceName As String * 33
End Type
 
'Funciones de la api win
 
Public Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (lpLogFont As LOGFONT) As Long

Public Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long

Public Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
 
 
'Procedure que crea el texto vertical
 
Public Sub StringVertical(ByVal Titulo As String, picMain As PictureBox)
	
On Error GoTo GetOut
	Dim f As LOGFONT
	Dim hPrevFont As Long
	Dim hFont As Long
	Dim FontName As String
	Dim FONTSIZE As Integer
	
	FONTSIZE = 10
	
	f.lfEscapement = 10 * 90 
	FontName = "Tahoma" + Chr$(0) 'caracter nulo
	f.lfFaceName = FontName
	f.lfHeight = (FONTSIZE * -20) / Screen.TwipsPerPixelY
	hFont = CreateFontIndirect(f)
	hPrevFont = SelectObject(picMain.hdc, hFont)
	
	picMain.CurrentX = 3
	   
	picMain.CurrentY = picMain.Height - 10
	picMain.Print Titulo
	
	'  Restauramos el estado original
	hFont = SelectObject(picMain.hdc, hPrevFont)
	DeleteObject hFont
	
	Exit Sub
GetOut:
	Exit Sub
End Sub

Espero lo entindas...Saludos.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 18:07:17.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi