473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Scrolling for two controls

Hello.

I have a listview and a listbox. If the listbox gets vertically scrolled,
the listview should make the same movement.
So I have extended the listbox control:

public class ExListBoxScrolling : ListBox
[...]
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_VSCROLL)
{
// will be put in the scrolling event args
this.vScrollV = GetScrollPos(this.Handle, 1);
// will be put in the scrolling event args
this.message = m;

this.listBoxScrolled();
}

base.WndProc (ref m);
}
[...]

And every time this event is called, I execute the following:
PostMessage(handleFromListView, m.Msg, m.WParam, IntPtr.Zero);

This code is working if the user only clicks on the little arrows to scroll
up and down!
But if the user drags the thumb or clicks beside the thumb to make a large
change,
neither the listviewContent gets updated correctly nor is the thumb from the
listview set correct.

Has anyone an idea?
Searching the internet, I often found (SB_THUMBPOSITION + 0x10000 *
postion) instead of m.WParam as a PostMessage parameter but that is not
working for me!!??

Thanks really a lot for any help!
Greetings,
Tim.

P.S.: Is it possible to scroll the listview without showing the scrollbars?
Nov 16 '05 #1
0 1339

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Wesman | last post by:
Threads, textboxes and scrolling Thanks in advance for any information on this matter. I have run into a small richtextbox, scrolling and tread issue. Which has me totally confused. Instead of...
2
by: craig | last post by:
I have two questions that I was hoping to get some input on: 1. How can I synchronize the horizontal scrolling of two controls on my form? I realize that I will have to use the Windows API to...
2
by: chris | last post by:
hi all, i need to create vertical scrollbar dynamically for the controls that are created dynamically in the form. (i'm not adding any controls to the panel). when the form exceeds(coz of...
2
by: James CC | last post by:
I have a strange bug in C# using windows forms. To make sure it's not some bug with my code, I've gone back to a simple test app, and still see the same behavior. I have created a simple C#...
3
by: Oddball | last post by:
Hello again, I have a problem that I can't seem to find any help for. I'm probably not typing the correct words into goo... *cough*... MSN. I have created a user control which I would like to...
1
by: Tim Frawley | last post by:
I have a large form with many controls, almost like legal size paper in height. Just so I can head these off, I am not looking for suggestions to the effect of using Tab controls, multi-window...
1
by: Oberfuhrer | last post by:
Hello all VB.net friends ! i have done most of my programming in assembly, at least so far. Recently i decided to learn a high level language for windows programming. I didnt take long to...
1
by: atif | last post by:
Hi, I m new to CSharp.. so may be my preliminary questions look stupid.. but plz help me.. I want to drag controls like buttons or some other user controls over form.. i have set form's...
2
by: Rob Pollard | last post by:
Hi All, I am using the flow control (can't remember its full name), to display a few dynamically created controls based on the tags the user has added to my system. This works fine, except when a...
0
by: Assam | last post by:
I am developing a custom control which would act as a PDF viewer. I am extending this control from the Panel control(Please note i have enabled double buffering of controls). I am not using the auto...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.