Solved

Suppress Vertical Scroll when resized form receives focus

Posted on 2013-05-10
2
288 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 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