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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:22:56+00:00 2026-06-07T20:22:56+00:00

In WinForms and C#, it seems I cannot create a control wider than 65535.

  • 0

In WinForms and C#, it seems I cannot create a control wider than 65535. If I set it to 70.000, the value gets reset to 65535.
Digging through the source of Control.Size with ILSpy, I couldn’t immediately find the code responsible for clamping the size.

So is this a limit of the Win32 API or of Windows Forms? Is there any way around this, e.g. with unmanaged interop?

The reason I need such a large control is that I draw music waveform of very long audio files onto it. (Yes, I could draw the waveform directly, without a containing control; but that would require lots of refactoring). I am not talking about the drawing code here. Clearly it’s necessary to draw only the visible part, but the thing is that I’d like to have a control as wide as 200.000 pixels.

  • 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-07T20:22:57+00:00Added an answer on June 7, 2026 at 8:22 pm

    It is a winapi restriction. A pretty hard one, the mouse position is reported with, say, the WM_MOUSEMOVE message with the mouse position packed into the LPARAM argument. With 16 bits for the X- and 16-bits for Y-location.

    You’ll have to deal with it. It is not a limitation on for example the AutoScrollMinSize property of a panel. Which is what you’d always use in this case anyway, start painting at AutoScrollPosition.

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

Sidebar

Related Questions

In WinForms, to set focus to a specific control, I always seem to wind
It seems like calling Invoke on a winforms control in a callback from a
It seems like when you have a WinForms .NET application, and a ComboBox (set
The TextBox control (in a .NET winforms application) seems to hard limit line lengths
I have a winforms datagridview that seems to always have at least one row
In WinForms, you have Control.BeginInvoke() , which means you can marshall a call from
Why is it, that in the Visual Studio WinForms designer I cannot increase the
I have written a custom control in C# (inherited from Forms.Control) and it seems
I have a WinForms application with a user control in which I change the
Seems simple enough, but I cannot figure out any way to determine what the

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.