Solved

Suppress Vertical Scroll when resized form receives focus

Posted on 2013-05-10
2
289 Views
Last Modified: 2013-05-14
Hi,

When my main form is visible on the desktop, and I re-size it to some smaller size, thereby showing the Vertical + Horizontal Scroll bars (Auto Scroll was set to true for the form).  Then using the Vertical Scroll bar that's now visible, if I manually scroll the current form view say half way down to show me a certain region of the form that I want to monitor for incoming data.

And then...

After the form loses focus and then when the form receives focus back, it automatically scrolls the contents of the form to bring whatever control within the form has focus (basically brings that focused control into view).  

I want to suppress this automatic "when form comes into focus and then scrolls the contents so that the focused control is in view..." thing...

How do I do that...
0
Comment
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 39164398
0
 

Author Comment

by:RobertFromSecretWeapons
ID: 39166685
You're bang on here....

Here is the actual solution to the issue:

Protected Overrides Function ScrollToControl(ByVal activeControl As Control) As Point
        Return DisplayRectangle.Location
End Function
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question