VB6 Tutorial 10: Common Properties 2 of 3

Posted On 2018-03-24 by VB6Boy
Keywords: visual,basic,vb6,visualbasic,tutorial,basic,beginner,common,properties,part2
Tags: VB6 Tutorials Windows
Views: 62


Looking for the more of the VB6 Tutorial? Here is the tutorial index.

In this second part of three of the common properties section, we'll take a quick look at nine more properties that are common to most default VB6 objects.

The Left, Top, Width and Height properties

  • The Left Property sets the distance between the internal left edge of an object and the left edge of its container.
  • The Top Property sets the distance between the internal top edge of an object and the top edge of its container.
  • The Width Property sets the width of an object.
  • The Height Property sets the height of an object.

Example

Private Sub cmdChange_Click()
     Form1.Left = 12000
     Form1.Top = 7000
     Form1.Height = 10000
     Form1.Width = 12000
End Sub

The Container property

Moves an object into another container. You don't see it in the Properties Window, it is a run-time only property.

In this case, you need to start with the 'Set' keyword.

Example

Set Command1.Container = Frame1

The command1 control will be moved into frame1.

The Visible property

Determines whether an object is visible or hidden.

Example

Label1.Visible = False

The Enabled property

Determines whether an object can respond to user generated events.

Example

Text1.enabled=False

MousePointer and MouseIcon

The MousePointer property sets the type of mouse pointer over an object. The values of MousePointer property are

  • 0- Default
  • 1- Arrow
  • 2- Cross
  • 3- I-Beam
  • 4- Icon
  • 5- Size
  • ...etc...

The MouseIcon property sets a custom mouse icon from your files.

In the next and final section on common properties, we'll take a quick look at nine more.

Looking for the more of the VB6 Tutorial? Here is the tutorial index.


About the Author

has posted a total of 101 articles.


Comments On This Post

No comments on this post yet!


Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.


Your IP address is:54.81.71.68

Before you can post, you need to prove you are human. If you log in, this test goes away.


Code Links