Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1107441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:56:13+00:00 2026-05-17T01:56:13+00:00

How to detect if the Autoscrollposition value changes in the panel1? For example, textbox1

  • 0

How to detect if the Autoscrollposition value changes in the panel1?

For example,

textbox1 and textbox2.

which added in panel1. The autoscroll property is set to true.

I am only interested in detecting when the value of panel autoscrollposition changes.

The above for dynamic textboxes which are incremented.

Software in use: C#, Visual Studio 2005.

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:56:14+00:00Added an answer on May 17, 2026 at 1:56 am

    The Component required for it. is:

    1. ListBox1
    2. ListBox2
    3. Panel
    4. Button.

    The Namespace for Class:

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.Collections;
    

    Here is the Complete Solution Code:

    namespace detectpanelvalue
    {
    
    public partial class Form1 : Form
    
    {
    
        private Point tbpoint  = new Point(10, 14);
    
        private Point tbbpoint = new Point(300, 14);
    
        private ArrayList arylst;
    
        private ArrayList arylst1;
    
        public Form1()
        {
            InitializeComponent();
        }
    
        private void Form1_Load(object sender, EventArgs e)
        {
            panel1.Paint += new PaintEventHandler(panel1_Paint);
    
        }
    
        void panel1_Paint(object sender, PaintEventArgs e)
        {
            System.Drawing.Point pnlpt;
            pnlpt = panel1.AutoScrollPosition;
            if (tbpoint !=null  || pnlpt != null ) 
            {
                pnlpt = tbpoint;
            }
            arylst1 = new ArrayList();
            arylst1.Add(pnlpt);
    
        }
    
        private void runtime() 
        {
            foreach (Point pt in arylst) 
            {
                listBox1.Items.Add(pt);
    
            }
    
            foreach (Point ptt in arylst1) 
            {
                listBox2.Items.Add(ptt);
    
            }
        }
    
    
        private void button1_Click(object sender, EventArgs e)
        {
            TextBox tb = new TextBox();
            tb.Location = tbpoint;
            this.panel1.Controls.Add(tb);
            tbpoint.Y += 30;
            TextBox bb = new TextBox();
            bb.Location = tbbpoint;
            this.panel1.Controls.Add(bb);
            tbbpoint.Y += 30;
            arylst = new ArrayList();
            arylst.Add(tbpoint);
            runtime();
    
        }
    }
    }
    

    It is helpful for adjust the panel autoscrollposition.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How to detect true Windows version I have an application which uses
I am trying to detect groups which contain the difference between first age and
For detect undefined variable which have been declared in javascript there at least two
I want to detect if one canvas object for example - circle crosses another
How to detect the value of useCapture from an event object? I made a
Is it possible to detect when a property in a propertyGrid is selected? And
I'm trying to detect a particular string value in an external txt file. In
Cannot Detect Margin with JavaScript DOM While It Is Set in CSS: <div> <div
I want to detect faces on camera previews. I saw this example in OpenCV
I detect if a user has chrome frame by placing this in teh body

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.