Solved

Suppress Vertical Scroll when resized form receives focus

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

810 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