2

We have developed POS system using windows application ,but there is a requirement to make it responsive ,which is not possible.

We have tried to use Flow panel but 100% responsive not done.

we have another option to convert it into WPF but it will require more time.

any one have suggestion to make windows form application which adjust according to screen resolution.

Kiya
  • 168
  • 1
  • 17
  • It is pretty hard to make a winforms app unresponsive. You'd have to do stuff like executing a query on a dbase that produces a lot of results. What programmers *usually* mean is making it less obvious that they have too many controls on their form. That is very easy to do, [it only takes 3 lines of code](https://stackoverflow.com/a/2613272/17034). – Hans Passant Apr 25 '18 at 09:45
  • 1
    @HansPassant I'm pretty sure that the OP is talking about a [different kind of responsiveness](https://en.wikipedia.org/wiki/Responsive_web_design) (the one that deals with different screen resolutions). The possible ambiguity makes the question even vaguer. – default locale Apr 25 '18 at 12:27
  • solution achieved using WPF .it is better solution to make POS software responsive. – Kiya Sep 08 '18 at 06:47

2 Answers2

2

You can evaluate TableLayoutPanel and ensure that columns and rows are defined as percentage instead of absolute values. You would also need to work out docking and anchoring for individual controls.

If you are looking for layout to switch from, say, horizontal to vertical, then you will need to work with resizing event of the form.

danish
  • 5,550
  • 2
  • 25
  • 28
1

Pretty much, you can't make a WinForms app respond well to different resolutions: it's possible, but it's a heavy amount of work and probably won't be too wonderful when you are finished. The problem is that although all controls can be Anchored and Docked so they resize automatically, that doesn't have any effect on text within the controls: so you end up with a large button with tiny unreadable text in the middle, or a tiny button with huge unreadable text in the middle.

While it's possible to get round this by handling the Resize event for each control and working out what font size to use based on the new display area, that's not trivial and generally takes a fair amount of trial and error, plus the odd "fudge factor" thrown in to deal with strange cases.

You can do it, but it's serious work - WPF handles it a lot better!

The other solution is to redesign your UI to work well at multiple resolutions in the same way tat Visual Studio does: a central "work space" with all the tools in panels which float or dock round the edges. But for a POS system, that probably isn't practical!