quien necesita drag drop ? en picture
mover el picture ?? en todo sentido
todo eso esta para visual 6 pero en net ?? alguien tiene el fuente
[email protected]
no entrego todo ya que es mi trabajo y necsito otro trabajo que me de mas $$$
ojala en chile
---
' Declaraciones Api
' Api que recupera el estilo de la ventana, en este caso el control picturebox
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" ( _
ByVal hwnd As Long, _
ByVal nIndex As Long) As Long
' Api que establece el nuevo estilo al control picturebox
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" ( _
ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
' Constante para el api GetWindowLong
Const GWL_STYLE = (-16)
Private Declare Function SetWindowPos Lib "user32" ( _
ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, _
ByVal X As Long, ByVal Y As Long, _
ByVal Cx As Long, ByVal cy As Long, _
ByVal wFlags As Long) As Long
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const WS_THICKFRAME = &H40000
Const SWP_DRAWFRAME = &H20
Const SWP_NOZORDER = &H4
Private Sub Form_Load()
'picture1 es fijo y los otros dos van dentro del picture1 principal
Call Cambiar_Estilo(picture2)
Call Cambiar_Estilo(picture3)
End Sub
Private Sub Cambiar_Estilo(Picturebox As Picturebox)
Dim ret As Long
Dim Estilo As Long
Dim Flags As Long
Flags = SWP_NOZORDER Or SWP_NOSIZE Or SWP_NOMOVE Or SWP_DRAWFRAME
' Opcional
Picturebox.BorderStyle = 0
Estilo = GetWindowLong(Picturebox.hwnd, GWL_STYLE)
Estilo = Estilo Or WS_THICKFRAME
' Cambia el estilo
Estilo = SetWindowLong(Picturebox.hwnd, GWL_STYLE, Estilo)
ret = SetWindowPos(Picturebox.hwnd, Picturebox.Parent.hwnd, _
0, 0, 0, 0, Flags)
End Sub