Rank: Member
Groups: Guest
Joined: 8/1/2006(UTC) Posts: 33
|
How to implement the paging with a button click instead of scroll bar
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Hello San, There is no scrolling method in the control, but you can send WM_VSCROLL or WM_HSCROLL message to initiate scrolling. Here is small code sample as starting point: Code:[System.Runtime.InteropServices.DllImport("User32.Dll")]
internal static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
private const int WM_VSCROLL = 0x0115;
private const int WM_HSCROLL = 0x0114;
private const int SB_LINEUP = 0;
private const int SB_LINEDOWN = 1;
private const int SB_PAGEUP = 2;
private const int SB_PAGEDOWN = 3;
private void _scrollUpButton_Click(object sender, System.EventArgs e)
{
SendMessage(thumbnailListView1.Handle, WM_VSCROLL, SB_PAGEUP, 0);
}
private void _scrollDownButton_Click(object sender, System.EventArgs e)
{
SendMessage(thumbnailListView1.Handle, WM_VSCROLL, SB_PAGEDOWN, 0);
}
Edited by user Wednesday, December 19, 2007 3:19:13 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 8/1/2006(UTC) Posts: 33
|
Dear Alex, i have got the code,but i need in vb.net, i convert the entire code in vb.net but it gives some error in these two line Code:Private Const WM_VSCROLL As Integer = 0x0115
Private Const WM_HSCROLL As Integer = 0x0114
plz , Reply asp Thanx san Edited by user Wednesday, December 19, 2007 3:26:29 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member
Groups: Guest
Joined: 8/1/2006(UTC) Posts: 33
|
dear Alex , i got the solution, thanx san
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.