Hello
I cant figure out how to simulate a scroll effect instead of using a scrollbar, but being able to drag the picture box up and down..!?!
I have a picture box within a picture box...!!
How can i achieve this..?
Printable View
Hello
I cant figure out how to simulate a scroll effect instead of using a scrollbar, but being able to drag the picture box up and down..!?!
I have a picture box within a picture box...!!
How can i achieve this..?
Here's a nice sample with scrolling picture in picture, but with the scrool bar.
http://www.vbforums.com/showthread.php?t=390294
Thank you but this is not what i need... I already hve this and this is how i Currently scroll up n down, but i want to replace it with a drag method...
Try this:
(From here)VB Code:
Option Explicit Private Const WM_NCLBUTTONDOWN = &HA1 Private Const HTCAPTION = 2 Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Declare Function ReleaseCapture Lib "user32" () As Long Private Sub Picture2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = vbLeftButton Then ReleaseCapture SendMessageLong Picture2.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0& End If End Sub