Hi,
I have a Windows Forms application which uses multiple child forms (MDI
interface).
The height of one of the child forms is larger than the height of the MDI
client area, so when this form is visible, the vertical scroll bar of the MDI
parent appears automatically.
What I want to do is write a routine within the MouseWheel event of the MDI
parent to scroll the window so that the lower half of the child form comes
into view. At the moment, my users have to click the scroll bar to do this.
Regards,
James 7 11515
Post it here when you've done it. I'm sure that others will be interested.
"James" <Ja***@discussi ons.microsoft.c om> wrote in message
news:6B******** *************** ***********@mic rosoft.com... Hi,
I have a Windows Forms application which uses multiple child forms (MDI interface).
The height of one of the child forms is larger than the height of the MDI client area, so when this form is visible, the vertical scroll bar of the MDI parent appears automatically.
What I want to do is write a routine within the MouseWheel event of the MDI parent to scroll the window so that the lower half of the child form comes into view. At the moment, my users have to click the scroll bar to do this.
Regards,
James
I can't figure how to do it, which is why I have posted it here. I was rather
hoping you would tell me...
"Stephany Young" wrote: Post it here when you've done it. I'm sure that others will be interested.
"James" <Ja***@discussi ons.microsoft.c om> wrote in message news:6B******** *************** ***********@mic rosoft.com... Hi,
I have a Windows Forms application which uses multiple child forms (MDI interface).
The height of one of the child forms is larger than the height of the MDI client area, so when this form is visible, the vertical scroll bar of the MDI parent appears automatically.
What I want to do is write a routine within the MouseWheel event of the MDI parent to scroll the window so that the lower half of the child form comes into view. At the moment, my users have to click the scroll bar to do this.
Regards,
James
Then I suggest that you rephrase your problem and actually ask for some
help.
All your original post did was make 2 very vague statements.
"James" <Ja***@discussi ons.microsoft.c om> wrote in message
news:E8******** *************** ***********@mic rosoft.com... I can't figure how to do it, which is why I have posted it here. I was rather hoping you would tell me...
"Stephany Young" wrote:
Post it here when you've done it. I'm sure that others will be interested.
"James" <Ja***@discussi ons.microsoft.c om> wrote in message news:6B******** *************** ***********@mic rosoft.com... > Hi, > > I have a Windows Forms application which uses multiple child forms (MDI > interface). > > The height of one of the child forms is larger than the height of the > MDI > client area, so when this form is visible, the vertical scroll bar of > the > MDI > parent appears automatically. > > What I want to do is write a routine within the MouseWheel event of the > MDI > parent to scroll the window so that the lower half of the child form > comes > into view. At the moment, my users have to click the scroll bar to do > this. > > Regards, > > James
Stephany,
I gave some background information to the problem to put it in context. I
belive I stated the problem quite clearly: "What I want to do is write a
routine within the MouseWheel event of the MDI parent to scroll the window so
that the lower half of the child form comes into view."
Perhaps it is not phrased as well as it could have been, but nevertheless, I
need help in writing a routine to scroll the parent window when the
MouseWheel event fires. The MouseWheel event exposes a MouseEventArgs object
that I can use to detect how much the user has moved the wheel, but how do I
then scroll the window in response to this? The form does not expose Scroll
method.
Regards,
James
"Stephany Young" wrote: Then I suggest that you rephrase your problem and actually ask for some help.
All your original post did was make 2 very vague statements.
"James" <Ja***@discussi ons.microsoft.c om> wrote in message news:E8******** *************** ***********@mic rosoft.com...I can't figure how to do it, which is why I have posted it here. I was rather hoping you would tell me...
"Stephany Young" wrote:
Post it here when you've done it. I'm sure that others will be interested.
"James" <Ja***@discussi ons.microsoft.c om> wrote in message news:6B******** *************** ***********@mic rosoft.com... > Hi, > > I have a Windows Forms application which uses multiple child forms (MDI > interface). > > The height of one of the child forms is larger than the height of the > MDI > client area, so when this form is visible, the vertical scroll bar of > the > MDI > parent appears automatically. > > What I want to do is write a routine within the MouseWheel event of the > MDI > parent to scroll the window so that the lower half of the child form > comes > into view. At the moment, my users have to click the scroll bar to do > this. > > Regards, > > James
You set the scroll postion using Me.AutoScrollPo sition:
Me.AutoScrollPo sition = New Point(0,0)
"James" <Ja***@discussi ons.microsoft.c om> wrote in message
news:26******** *************** ***********@mic rosoft.com... Stephany,
I gave some background information to the problem to put it in context. I belive I stated the problem quite clearly: "What I want to do is write a routine within the MouseWheel event of the MDI parent to scroll the window so that the lower half of the child form comes into view."
Perhaps it is not phrased as well as it could have been, but nevertheless, I need help in writing a routine to scroll the parent window when the MouseWheel event fires. The MouseWheel event exposes a MouseEventArgs object that I can use to detect how much the user has moved the wheel, but how do I then scroll the window in response to this? The form does not expose Scroll method.
Regards,
James "Stephany Young" wrote:
Then I suggest that you rephrase your problem and actually ask for some help.
All your original post did was make 2 very vague statements.
"James" <Ja***@discussi ons.microsoft.c om> wrote in message news:E8******** *************** ***********@mic rosoft.com... >I can't figure how to do it, which is why I have posted it here. I was >rather > hoping you would tell me... > > "Stephany Young" wrote: > >> Post it here when you've done it. I'm sure that others will be >> interested. >> >> >> "James" <Ja***@discussi ons.microsoft.c om> wrote in message >> news:6B******** *************** ***********@mic rosoft.com... >> > Hi, >> > >> > I have a Windows Forms application which uses multiple child forms >> > (MDI >> > interface). >> > >> > The height of one of the child forms is larger than the height of >> > the >> > MDI >> > client area, so when this form is visible, the vertical scroll bar >> > of >> > the >> > MDI >> > parent appears automatically. >> > >> > What I want to do is write a routine within the MouseWheel event of >> > the >> > MDI >> > parent to scroll the window so that the lower half of the child form >> > comes >> > into view. At the moment, my users have to click the scroll bar to >> > do >> > this. >> > >> > Regards, >> > >> > James >> >> >>
Thanks Rocky,
How do I convert the delta value from the MouseEventArgs object to a Point
object?
Regards,
James
"Rocky" wrote: You set the scroll postion using Me.AutoScrollPo sition: Me.AutoScrollPo sition = New Point(0,0)
"James" <Ja***@discussi ons.microsoft.c om> wrote in message news:26******** *************** ***********@mic rosoft.com... Stephany,
I gave some background information to the problem to put it in context. I belive I stated the problem quite clearly: "What I want to do is write a routine within the MouseWheel event of the MDI parent to scroll the window so that the lower half of the child form comes into view."
Perhaps it is not phrased as well as it could have been, but nevertheless, I need help in writing a routine to scroll the parent window when the MouseWheel event fires. The MouseWheel event exposes a MouseEventArgs object that I can use to detect how much the user has moved the wheel, but how do I then scroll the window in response to this? The form does not expose Scroll method.
Regards,
James "Stephany Young" wrote:
Then I suggest that you rephrase your problem and actually ask for some help.
All your original post did was make 2 very vague statements.
"James" <Ja***@discussi ons.microsoft.c om> wrote in message news:E8******** *************** ***********@mic rosoft.com... >I can't figure how to do it, which is why I have posted it here. I was >rather > hoping you would tell me... > > "Stephany Young" wrote: > >> Post it here when you've done it. I'm sure that others will be >> interested. >> >> >> "James" <Ja***@discussi ons.microsoft.c om> wrote in message >> news:6B******** *************** ***********@mic rosoft.com... >> > Hi, >> > >> > I have a Windows Forms application which uses multiple child forms >> > (MDI >> > interface). >> > >> > The height of one of the child forms is larger than the height of >> > the >> > MDI >> > client area, so when this form is visible, the vertical scroll bar >> > of >> > the >> > MDI >> > parent appears automatically. >> > >> > What I want to do is write a routine within the MouseWheel event of >> > the >> > MDI >> > parent to scroll the window so that the lower half of the child form >> > comes >> > into view. At the moment, my users have to click the scroll bar to >> > do >> > this. >> > >> > Regards, >> > >> > James >> >> >>
Dim pt As New Point(Me.AutoSc rollPosition.X, Me.AutoScrollPo sition.Y +
e.Delta)
Me.AutoScrollPo sition = pt
"James" <Ja***@discussi ons.microsoft.c om> wrote in message
news:2E******** *************** ***********@mic rosoft.com... Thanks Rocky,
How do I convert the delta value from the MouseEventArgs object to a Point object?
Regards,
James
"Rocky" wrote:
You set the scroll postion using Me.AutoScrollPo sition: Me.AutoScrollPo sition = New Point(0,0)
"James" <Ja***@discussi ons.microsoft.c om> wrote in message news:26******** *************** ***********@mic rosoft.com... > Stephany, > > I gave some background information to the problem to put it in context. > I > belive I stated the problem quite clearly: "What I want to do is write > a > routine within the MouseWheel event of the MDI parent to scroll the > window > so > that the lower half of the child form comes into view." > > Perhaps it is not phrased as well as it could have been, but > nevertheless, > I > need help in writing a routine to scroll the parent window when the > MouseWheel event fires. The MouseWheel event exposes a MouseEventArgs > object > that I can use to detect how much the user has moved the wheel, but how > do > I > then scroll the window in response to this? The form does not expose > Scroll > method. > > Regards, > > James > > > > "Stephany Young" wrote: > >> Then I suggest that you rephrase your problem and actually ask for >> some >> help. >> >> All your original post did was make 2 very vague statements. >> >> >> "James" <Ja***@discussi ons.microsoft.c om> wrote in message >> news:E8******** *************** ***********@mic rosoft.com... >> >I can't figure how to do it, which is why I have posted it here. I >> >was >> >rather >> > hoping you would tell me... >> > >> > "Stephany Young" wrote: >> > >> >> Post it here when you've done it. I'm sure that others will be >> >> interested. >> >> >> >> >> >> "James" <Ja***@discussi ons.microsoft.c om> wrote in message >> >> news:6B******** *************** ***********@mic rosoft.com... >> >> > Hi, >> >> > >> >> > I have a Windows Forms application which uses multiple child >> >> > forms >> >> > (MDI >> >> > interface). >> >> > >> >> > The height of one of the child forms is larger than the height of >> >> > the >> >> > MDI >> >> > client area, so when this form is visible, the vertical scroll >> >> > bar >> >> > of >> >> > the >> >> > MDI >> >> > parent appears automatically. >> >> > >> >> > What I want to do is write a routine within the MouseWheel event >> >> > of >> >> > the >> >> > MDI >> >> > parent to scroll the window so that the lower half of the child >> >> > form >> >> > comes >> >> > into view. At the moment, my users have to click the scroll bar >> >> > to >> >> > do >> >> > this. >> >> > >> >> > Regards, >> >> > >> >> > James >> >> >> >> >> >> >> >> >> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Niranjan |
last post by:
I have a data entry form. I am trying to avoid users accidentally using
the mouse wheel and saving an incomplete record (or saving record that
skips the validation routine).
In Mousewheel event, I have a boolean variable (blnMousewheel) that is
set to true. In the beforeupdate form event, an If statement cancels
any changes if the blnMousewheel is true. It also sets the boolean
variable to false.
It works most of the time, but some...
|
by: Rud |
last post by:
The documentation clearly explains the MouseWheel event for a picturebox.
Unfortunately I am not able to select this from the declarations dropdown
list for the picturebox control on my form. It's not listed...
Any ideas? Is this a bug? What else can I do to react on a mousewheel
event...?
Thanks, Rud.
|
by: Dennis |
last post by:
I have a usercontrol I'm working on and it has several rows of data. I would
like to scroll the data when the Mouse moves onto the control and the scroll
wheel is turned without setting the focus to my control. If my control
doesn't have the focus, the MouseWheel event isn't fired for mycontrol. I
don't want to set the focus to my control whenever the mouse moves over or
even hovers over it. it as that would be impolite to the enduser...
|
by: Qwert |
last post by:
Hello,
when a NumericUpDown control has the focus, the mousewheel
increases/decreases its value. How does one prevent this from happening? How
does one turn off its mousewheel event?
Thanks.
|
by: tlemcenvisit |
last post by:
Hi,
I program a windows form application with VC++.NET, I wish to program an
event which occurs when the user uses the mouse wheel in a pictureBox
control. Which event should I use? And how can I program that?
Thanks in advance
| |
by: Neeraj |
last post by:
Hi
I have panel and inside the panel i have many picturebox,if number of
picturebox increase ,i have set panel's autoscroll property to true,but
as and when i click on any of the picturebox ,i want to stop default
scrollmoving property of panel,so that i can use this event for my
picturebox.
I donot want to set its autoscroll to false,i want panel's scrollbar
to be visible ,but they should'nt function when i scroll mousewheel on
|
by: Dave K |
last post by:
I seem to be missing something... I want to use a mousewheel event in my
VB.NET app... and there's a lot of example code on the net showing how to use
the mousewheel event... and the .NET docs discuss the mousewheel event...
but there doesn't seem to BE a mousewheel event. in VS 2003 or 2005, in C#
or in VB.NET... and on the couple systems I've checked. I can't find a
single control that gives me a "MouseWheel" event option in it's...
|
by: WaterWalk |
last post by:
Hello. When I tried to make Tkinter canvas widget respond to
MouseWheel event on Windows XP, I failed. The canvas just doesn't
receive MouseWheel event. I used bind_all to find out which widget
receives this event and the result showed that only the top Tk widget
gets it. This is really annoying. I wonder if this problem exists on
other platform. I googled, but found no appliable solution, so I wrote
one as following. It's not perfect,...
|
by: Tomy Rodrigue |
last post by:
Hi everyone,
I display some data in a propertygrid using different TypeConverters that I created. Those TypeConverters have different behaviors but they all support the Mouse wheel event to change the property.
If you scroll the mouse wheel, the selected property change as it should, no problem there. But if there are enough properties to generate a vertical scroll bar on the propertygrid, the property change as it should but the scroll...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |