Afnan Bashir
Afnan Bashir

Reputation: 7419

Please tell what approach should be used for desktop application

I am planing to develop desktop application that will have multiple logins and according to that login type options/From view will be displayed.

I have done database login part now its turn of view

How can i establish that what i have in my mind that

  1. Drag and drop all required controls and make them visible = false and check which type of login is that and display accordingly
  2. Create separate forms and display one by one as required

Upvotes: 1

Views: 103

Answers (3)

Tassadaque
Tassadaque

Reputation: 8199

You need to make one form and make control visible/invisible or enable/disable control.

Create separate forms and display one by one as required

it will be very difficult for you to manage and extend in future.

Upvotes: 1

zgorawski
zgorawski

Reputation: 2727

For me it depends on numbers.

If u have many diffrent user roles and they share only a few controls then it would be easier to make diffrent form / panel for each user type. This approach is quite dangerous since when you want to change common control u would be forced to do it in all forms / panels.

Thats why i would recommend to group application logic into custom controls and then build GUI from them. For example: if you have two user types ( let's say boss and employee ) then you can build form with shared controls / logic and two user controls (bossControl, employeeControl) with functions for boss and employee. Then after login check you add matching user control to GUI.

Upvotes: 1

Wix
Wix

Reputation: 2214

You sound like you are new to C# forms programming. I suggest looking at some tutorials or a book like this Windows Forms Programming

Upvotes: 3

Related Questions