For the DataGridview
DataGridview dgvSearch;
Win32API. SetScrollInfo (dgvSearch. Handle, (int) ScrollBarDirection. SB_VERT, ref info, true);
Win32API. PostMessage (dgvSearch. Handle, Win32API. WM_VSCROLL, Win32API MakeLong ((short) Win32API SB_THUMBTRACK, (short) (info. NPos)), 0).
Don't use the API to control DataGridview mobile
For the ListBox
ListBox listBox1;
Win32API. SetScrollInfo (listBox1. Handle, (int) ScrollBarDirection. SB_VERT, ref info, true);
Win32API. PostMessage (listBox1. Handle, Win32API. WM_VSCROLL, Win32API MakeLong ((short) Win32API SB_THUMBTRACK, (short) (info. NPos)), 0).
Scroll bar with the API in the ListBox mobile instead,
Have to solve the problem or you have other better way, if you can, send a demo to me [email protected], refer to the https://blog.csdn.net/wzk456/article/details/48167753 this article
CodePudding user response:
Answer, add cent, topCodePudding user response:
The top ah, come and help resolveCodePudding user response:
Come and help to solve the ah