Solved

Suppress Vertical Scroll when resized form receives focus

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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 …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now