473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How do I stop AutoScroll position from changing?

I am creating a Windows application and I have a TabControl control with some other non-interactive controls above it. On the TabControl there are buttons that trigger an event. The problem that I am having is that whenever I go from clicking a button to clicking the TabControl, the AutoScroll position on my main panel changes so that the TabControl is at the very top of the visible area of the form (it should be the non-interactive controls at the top).

I had this problem immediately when loading the form, and I fixed it using this line in the Form1_Shown event:

Panel1.AutoScrollPosition = New Point(0, 0)

I have been trying to use this line of code in other events such as Button1_LostFocus, TabControl1.GotFocus, TabControl1_Click, TabControl1_Selected with moderate success in the TabControl1_Selected event. However, the AutoScroll still changes when I select the same tab that the button is on, after clicking the button. Also, if I select a different tab after clicking the button, it changes very quickly, as if it changes before the TabControl1_Selected event fires.

Any help would be appreciated on how to fix the position changing on the AutoScroll property!
Nov 4 '16 #1
0 892

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: amit bharadwaj | last post by:
hi all am using a panel , now i want to programitally set the thumb of autoscroll. for tht i have override wndproc() and try to set it .. ant it does .. but after that autoscroll too modify...
1
by: fh | last post by:
Hello, I use some web user control in my page I changed some button defintion from protected to public so that I can register their click on the main page... but sort of randomly I...
5
by: Frank | last post by:
Hello, if autoscroll is true in a form. Is there a way to detect the scrollbars are active? Thanks Frank
1
by: malcolm | last post by:
I have a scrollable vb.net form with a web browser (axWebBrowser) instance on it. All is well until I try to change the left/top (and perhaps height/width) of the web browser on the form. If...
1
by: Workgroups | last post by:
Not having much luck tracking this down... I'm working with a form, Form1, which contains a panel called pnlParent. Both Form1 and pnlParent have AutoScroll = False. pnlParent contains a panel...
0
by: eweaver | last post by:
Hello, I have a problem with getting an autoscrollbar to end up where I want it. Things to know about the prob: I have an imagebox inside of a Panel for (inheritance of) autoscroll capabilities....
5
by: marton | last post by:
Hi there, I'm new to posting on the forum, and I've been working with MS Access for a couple of years, but and other than that know nothing about programming. I have a fairly simple, networked,...
0
by: subhash9 | last post by:
Hi, Have an XML file with this element <File Name="" Description="" CreatedBy="" CreatedDate="" LastModifiedBy="" ModifiedDate=""> i converted DOm to string using : TransformerFactory...
4
by: hawaiijeff | last post by:
Is there any way to stop access (Access 2000) from changing the syntax of my SQL queries? For example, I don't always put the table_name. because it makes it hard to read. Access doesn't have a...
0
by: nicky77 | last post by:
This is a long shot, but I have no idea why my navbar is being temperamental in IE6. Everything looks ok on page load, but when you fill out the online form and click Submit, the navbar either...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.