General information
Category:
Windows Presentation Foundation (WPF)
Environment versions
Network:
Windows 2000 Server
>>>Hi all, I just installed an app of mine on a laptop and guess what ? the main opening form ( which has a lot of info on it ) is way too large for the laptop. I seem to recall in VFP there was a maximum design area which gave you a pretty good idea what would fit - is there something like this in VS ? or is this the wrong way to go ? ( I have a feeling it is :-( ) All suggestions gratefully received
>>
>>As John suggests *never*, unless you have very good reasons, hard code a Height or Width for a window (or, for that matter, anything else). If you do want to constrain the upper limits use MaxWidth/MaxHeight. Otherwise, If you want the window to fill the current screen you can just set WindowState to WindowState.Maximized.
>>
>>HTH
>Hi Viv, I never hard code Height or Width , what I was trying ( badly ) to say was, is there a way of knowing if a form will spill over on a smaller monitor than the one used in VS, I guess I will have to add the dreaded scrollbars to this one screen ( all the rest are fine )
I see this is actually a WinForms rather than a WPF issue. And there was me thinking you'd seen sense :-} g,d&r
Well there's always the concisely named System.Windows.Forms.SystemInformation.PrimaryMonitorMaximizedWindowSize for you to play with ......
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only