Como manejar Estructuras en VFP

159 views
Skip to first unread message

ZeRoberto

unread,
Jan 21, 2012, 2:57:41 PM1/21/12
to publicesvfoxpro
Tengo una funcion api llamada SetScrollInfo() y uno de los parametros es una estructura
 
CODIGO VB PARA PASAR A VFP
 
*/--- Constantes
Const SBS_HORZ = 0
Const SBS_VERT = 1
Private Const SIF_RANGE = &H1
Private Const SIF_PAGE = &H2
Private Const SIF_POS = &H4
Private Const SIF_DISABLENOSCROLL = &H8
Private Const SIF_TRACKPOS = &H10
Private Const SIF_ALL = (SIF_RANGE Or SIF_PAGE Or SIF_POS Or SIF_TRACKPOS)
 
*/--- Estructura
Public Structure SCROLLINFO
        Public cbSize As Integer
        Public fMask As Integer
        Public nMin As Integer
        Public nMax As Integer
        Public nPage As Integer
        Public nPos As Integer
        Public nTrackPos As Integer
End Structure
 
*/--- Funciones api
Declare Function GetScrollInfo IN "user32.dll" Integer hWnd, Integer nBar, SCROLLINFO lpScrollInfo
Declare Function SetScrollInfo Lib "user32.dll" Integer hWnd, Integer nBar, SCROLLINFO lpScrollInfo, Boolean fRedraw
 
*/--- Codigo
Private Sub rtb1_VScroll(ByVal sender As Object, ByVal e As System.EventArgs) Handles rtb1.VScroll
        Dim SInfo As New SCROLLINFO
        SInfo.cbSize = SizeOf(SInfo)
        SInfo.fMask = SIF_ALL
        GetScrollInfo(rtb1.Handle, SBS_VERT, SInfo)
        SetScrollInfo(pNumber.Handle, SBS_VERT, SInfo, True)
End Sub
 
 
Saludos

Marco Plaza

unread,
Jan 22, 2012, 9:59:18 AM1/22/12
to Comunidad de Visual Foxpro en Español
Aqui puedes ver todo sobre como se manejan las estructuras usando vfp:
http://www.news2news.com/vfp/?article=1

Saludos.

Marco.

ZeRoberto

unread,
Jan 22, 2012, 10:41:58 AM1/22/12
to publice...@googlegroups.com
Buen dato gracias Marco
 
Saludos

Luis Maria Guayan

unread,
Jan 22, 2012, 7:06:34 PM1/22/12
to publice...@googlegroups.com
Puedes descargar STRUCT.ZIP de Christof Lange (ahora Christof Wollenhaupt) que seguro te ayudará



 
Luis María Guayán
Tucumán, Argentina
_________________________
http://www.PortalFox.com
Nada corre como un zorro
_________________________



2012/1/21 ZeRoberto <zero...@gmail.com>

ZeRoberto

unread,
Jan 22, 2012, 9:09:37 PM1/22/12
to publice...@googlegroups.com
Gracias Luis Maria lo probare
 
Saludos

2012/1/22 Luis Maria Guayan <luism...@gmail.com>
Reply all
Reply to author
Forward
0 new messages