|
-
Dec 25th, 2009, 04:26 PM
#1
Thread Starter
Fanatic Member
-
Dec 25th, 2009, 04:32 PM
#2
Re: Professional layout code problem
you could use code regions to keep your code organized into 'regions'
vb Code:
Public Class Form1
#Region "panel1 code"
'put code related to panel1 in this region
#End Region
#Region "panel2 code"
'put code related to panel2 in this region
#End Region
end class
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Dec 25th, 2009, 04:38 PM
#3
Thread Starter
Fanatic Member
Re: Professional layout code problem
Yeah I love regions (I probably already use them too much). So I guess that its normal to just have lots of code in a form, and that is a quite normal way to have lots of content through one form.
Thanks
If you find a response helpful then remember to Rate it
Personal website Sam Jenkins
-
Dec 25th, 2009, 05:15 PM
#4
Re: Professional layout code problem
What is wrong with using multiple forms? Showing everything on a single form may be possible with small applications, but if it gets a little larger most applications really require multiple forms. And why shouldn't they?
Anyway, without more information on what your application should do, and how you want it to look, we can't really help you; we can't tell you how to design a user interface if we have no clue what it should do!
-
Dec 25th, 2009, 05:19 PM
#5
Fanatic Member
Re: Professional layout code problem
You can use controls aswell.
The problem with panels is that if you have 3 panels and you want to edit Panel1, you can't, you'd have to resize your form and "move away" Panel2 and Panel3 to get to Panel1.
When using controls, you can put all controls on the main form and edit them separately =).
*EDIT* This also solves your code problem 
All controls can have their own Code.vb =)
-
Dec 25th, 2009, 05:45 PM
#6
Thread Starter
Fanatic Member
Re: Professional layout code problem
The application is a piece of software that deals with keeping a record of children attending a school, when they're supposed to be attending, the government funding that the school receives for the child attending, and works out the amount that the parents need to pay for what the government funding doesn't cover.
Although while I am using this application as an opportunity for me to learn about how to create professional looking layout, I'm more interested in the actual methods suggested for creating large applications UI.
Like for example the controls suggestion by Zeelia, which I assume means making each of the different screens into a control and then put that on the form, I hadn't thought about that and that's something that I will have to look into further to see if that would be appropriate for what I want to do.
If you find a response helpful then remember to Rate it
Personal website Sam Jenkins
-
Dec 25th, 2009, 05:54 PM
#7
Addicted Member
Re: Professional layout code problem
One thing to consider is that some controls can be replaced by other controls. Like, a bunch of buttons can be replaced by one dropdown list when a user right clicks. Or you could replace a few listviews or something by using a TabControl and put them in different tabs (unless you need to view them at the same time).
Just some things I learned when I started to focus on layout
-
Dec 25th, 2009, 06:08 PM
#8
Frenzied Member
Re: Professional layout code problem
While you may not have the time now, I would suggest you look at WPF. This new set of extensions to the .net framework allow you to really separate out the interface from the business code.
WPF uses a new language called XAML to control the interface, while XAML can seem "magical" at first, as if it doesn't follow a structure once you get the hang of how it works you will find that its "magical" features are little more than shortcut's that are designed to make functional and dynamic interfaces easier to work with.
-
Dec 25th, 2009, 06:14 PM
#9
Fanatic Member
Re: Professional layout code problem
Yes, XAML is really great and you get a wider option of layout and graphics with it.
For example, gradient colors which are great for buttons.
-
Dec 25th, 2009, 06:22 PM
#10
Re: Professional layout code problem
All controls can have their own Code.vb =)
Another alternative is to use partial classes - you can separate logical groups of code into partial classes which at compile time all become part of the same class.
VB actually already uses this to keep the designer code separate from the user code.
-
Dec 25th, 2009, 06:35 PM
#11
Frenzied Member
Re: Professional layout code problem
If you are not keen on WPF I would at least second keystone paul's idea and split the design code into a partial class if at least for readability.
-
Dec 25th, 2009, 07:17 PM
#12
Thread Starter
Fanatic Member
Re: Professional layout code problem
@keystone_paul, ooow I hadn't thought about that, yes that sounds like a good idea.
@DeanMc sounds like MVC for desktop applications, I will definitely have to look into this.
Thank you everyone for your suggestions they have been very useful, although if you do have any other suggestions then I will more than welcome them
If you find a response helpful then remember to Rate it
Personal website Sam Jenkins
-
Dec 25th, 2009, 07:21 PM
#13
Frenzied Member
Re: Professional layout code problem
Actually it is a different concept all together but once you get the hang of it you will understand why it is gaining popularity so fast!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|