473,564 Members | 2,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting Windows Forms Properties Design Time vrs Run Time

In VB6 my practice was to set control properties at Run Time rather than
Design Time. I found setting property values in the code provided better
documentation, since much of this was hidden - and if there were problems
with a control dll setting values were preserved and not "lost" to the
domain of searching code using a DOS editor.

However, as I start work in VB.Net I'm questioning if I should continue my
practice of avoiding Design Time properties or if the code would be easier
to read and manage if I begin to use Design Time properties.

Thanks for any and all opionions.


Nov 20 '05 #1
3 2125
Hi Cleo,

All your what you call design time properties are visable when you push on
the + in the designer hidden part of your program and you will see that it
are normal what you call run time properties.

So in my opinion the best way is to do it in a way that adds to the
documentation, however setting the wide of a textbox by hand does not add
much to that in my opinon.

I hope that this was the question and answers it?

Cor
Nov 20 '05 #2
"cleo" <cl**@missinfor mation.com> schrieb:
In VB6 my practice was to set control properties at Run Time
rather than Design Time. I found setting property values in the
code provided better documentation, since much of this was
hidden
Mhm... You could easily have a look by selecting the control in the form
editor and checking the properties. I never had a problem with that and
there were only a few cases where opening the form file with notepad, for
example, was necessary.
However, as I start work in VB.Net I'm questioning if I
should continue my practice of avoiding Design Time properties
or if the code would be easier to read and manage if I begin
to use Design Time properties.


As Cor says, the code can be shown inside the code editor (or in a partial
class in VB 2005). By removing '<System.Diagno stics.DebuggerS tepThrough()>'
from the 'Sub InitializeCompo nent' you can debug the code.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3
Cor and Herfried
Thanks for the input.

The Windows Designer Section does nicely expose the information and it does
seem to be a waste of time to repeat many settings manually.

Generally I've grown to avoid Designers and Wizards but I'd like to learn to
use them wisely. I'm still on the learning curve, but if I have any real
problems I'll post.

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
18333
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on a remote update of tables and fields and can't find enough information on these things. Also, how do you index a field in code?
0
1754
by: Shravan | last post by:
Hi, I have a Windows Forms Custom DataGrid, which is put in a usercontrol, which on setting DataSource is setting focus to grid. The call stack for setting the focus is as follows. This is not happened always whenever DataSource is set, only called sometimes, in a series of setting DataSource, I could get this setting focus only one time ....
3
6625
by: countd4 | last post by:
I have built a working user control. However, to make it work, I always have to set certian properties using the properties sheet for the control when using it on other forms. I want to be able to set default values for most properties so the control will work as-is without requiring the developer to set them. I notice in the compment...
0
1316
by: Severino | last post by:
Hi all, we have developed a .NET component for use inside Windows Forms: this component has been written using VC++.NET (2003) and is working perfectly when inserted inside VC#.NET or VB.NET projects; its generated assembly is inside MyAssembly.dll When used inside a VC++.NET project it appears correctly over forms at design time but when...
1
1978
by: Frank Yamrick | last post by:
I am trying to program an application that requires a large number of screnes that are very similar in the respect that all the bottons and labels interact with each other with the same relationship. If possible, it seems it would be easier to set up one standard page where the text is blank for each radiobutton, button, or label. The text...
5
3264
by: Alex Glass | last post by:
I have created a winforms application and I designed it with the normal display settings, (96DPI) however, when I set the font settings to 120 DPI, my application text labels look all messed up. Does anyone know a work-around for this problem? Thanks for any advice, Alex
7
1998
by: Ronald S. Cook | last post by:
In a .NET Windows app, if I set somehting like the title of the form to "MyApp" at run-time, will that make the app run slightly slower than if I had set the title at design-time? Thanks, Ron
1
2885
by: Will | last post by:
I am upsizing an access application to vb.net. In access textbox, combos and checkboxes can have default values, which are assigned in the properties for the control. How can I set a control's default value in bound and non bound forms? thanks
8
16087
by: Andrus | last post by:
..NET 2 Winforms application. How to create new setting and set it default value in userSettings section of app.config file or overwrite existing setting value ? I found code below in this list which modifies Application setting section but how to add new item to userSettings ? Andrus.
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.