Hi,
I am trying to move from Console to Windows Form. I have a workable program in Console but I wish to send it Windows Form. There is a problem over the "static void .... () {}" blocks and I wish also to know how to easily find a way to locate labels starting points, clear the form of all its label, controls.
Thank you very much.
Nicolas MARIE.

1 answers
A label has two properties which determine its position relative to its container. The container is the form itself or any other container (such as a panel) on which it's been placed. These properties are:
1. Left - the number of pixels from the left edge of the container's client area to the left edge of the label.
2. Top - the number of pixels from the top edge of the container's client area to the top edge of the label.
The properties are combined into the Location property which you see in the label's Properties Box.
The client area is that part of the form or other container in which controls can be placed. It excludes stuff such as the title bar.
If all of your labels have been placed directly on the form (and not on some other container) then you can clear them all as follows:
What other problems are you having?
answered one year ago by:
17279
30
Thank you very much for the information. As a matter of fact, I am working on a marking system in console. But at the end the same problem will need to be in windows mode. I have to study both at the same time but console seemed much easier due to my familiarity with Qbasic and Dbase many years ago. One issue is that I want to create methods that for example will clear all the label controls on the form as you have listed above but within a method viz. clear_label(). Can this be done in windows form or is the environment altogether different that this can't be done?
17279
Yes, a form is just a class and so you can add any methods, properties etc. you like to it including a clear_label() method. You can then call that method from say an eventhandler (such as a button click) within the same form.