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 8751245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:00:38+00:00 2026-06-13T13:00:38+00:00

my application is Windows Forms (VS2010 C#); I set a double variable at the

  • 0

my application is Windows Forms (VS2010 C#); I set a double variable at the beginning of the form as:

private double Wwidth;

Then I change the its value when I open a file:

 Wwidth = image.WindowWidth;

The value of Wwdith equals 265.0. When I select a trackbar,

private void tbrWidth_Scroll(object sender, System.EventArgs e)
        {
            double newWidth = tbrWidth.Value;
            double wd = Wwidth - newWidth;
...}

the value of Wwdith changes to 0.0?

Any suggestions. Thanks in advance.

  • 1 1 Answer
  • 0 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-06-13T13:00:39+00:00Added an answer on June 13, 2026 at 1:00 pm

    Variables don’t change themselves. So there are two possibilities:

    1. some bit of code you’ve forgotten about changed it
    2. it is a different instance

    To rule out 2, you could put (in the two places):

    Debug.WriteLine(
        System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(this));
    

    If you get the same number printed from both places, you’re probably still in the same instance. To rule out 1 – change it and put a break-point in:

    private double _wwidth;
    private double Wwidth {
        get { return _wwidth; }
        set { _wwidth = value; } // <==== put a breakpoint here
    }
    

    Now you should stop automatically at any code that is changing the value

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

Sidebar

Related Questions

I am building a Windows forms application using VS2010. I want to read the
I have been tasked to create a form designer application in Windows Forms. The
I have VS2010 and I'm working on a windows form application. So, I have
I'm working on a windows forms application (.NET 4.0). My form contains a 'Fast
I have a windows forms application written in VS2010 with C# and get the
As comparison, making the same basic Windows Forms application from VS2010 C# is literally
I am trying to use SSE instruction in Windows form application in VS 2010.
Am building window form application for a clinic using VS2010. On the form in
I'm a professional Windows application developer in VB.NET and C# with Windows Forms, and
In a Windows Forms application I kill a process like this: Process[] ps =

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.