| Visual Basic (Declaration) | |
|---|---|
Public Overridable Property MarginLeft As Integer | |
| Visual Basic (Usage) | Copy Code |
|---|---|
| |
| C# | |
|---|---|
public virtual int MarginLeft {get; set;} | |
Return Value
Integer number of pixels in margin| C# | Copy Code |
|---|---|
control.Picture = Image.FromFile(Application.StartupPath + "\\smokes.bmp"); | |
| Visual Basic | Copy Code |
|---|---|
control.Picture = Image.FromFile(Application.StartupPath & "\smokes.bmp") | |
The margin value represents the amount of space between the edge of the control and the text. Specify the margin in pixels.
Set the bottom, right, and top margins by setting the MarginBottom, MarginRight, and MarginTop properties.
| Note: A controls contents are aligned inside the margins. Therefore, if you define unequal margins, the control might not align its contents as you expect. For example, if you define unequal top and bottom margins and set the AlignVert property to Center, the contents will not appear vertically centered. |