0

I have a question. Is it possible to change X and Y point values type from int to Int32? I have panel 50 000 pixels wide and I can only recognize the X dimension up to about 32k.

public void pictureBox2_Click(object sender, EventArgs e)
    {

       Point point = pictureBox2.PointToClient(MousePosition);
       MessageBox.Show(point.ToString());
       MessageBox.Show(point.X.ToString()); 
    }

This is my code, I need change X to Int32. Any solution? Thanks in advance,

2
  • 2
    int and Int32 are the same.
    – DaveShaw
    May 26, 2015 at 20:53
  • If it's stopping at 32k, then you probably have a 16 bit int (short) somewhere. 16 bit signed ints only go up to 32,767, which would make sense. Without a MCVE though, we can't really help you.
    – Kaslai
    May 26, 2015 at 21:23

1 Answer 1

5

An int is Int32, it is just an alias for it. The max value for an int is 2,147,483,647, which you are well within.

(An int is a 32 bit number, it does not mean it can only go to 32,000.)

5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.