after searching on the web, i know that Me keyword is use to Refer to the Current Instance of an Object, but if i want to Refer to the others Instance of an Object, what is the keyword that i need to use?
Dim dt As New DataTable
'fill data to datatable
'offer data in data table into datagridview
Me.DataGridView1.DataSource = dt
Me keyword is use to Refer to the Current Instance of an Object,for example,the coding above will show the data in datagrid inside the current form. but what if i want to show the datagrid on another form inside the same project?
In your case, Me is not necessary, since you have this code on the same form as the datagridview control. You use Me in cases where is possible that comes to an ambiguity.
Like this example:
Public Class Employee
Private name As String
Public Sub New(name As String)
'this.name refers to private variable in the Employee class, while name refers to the method`s parameter
Me.name = name
Each object (control) that you create is given a unique name by default, such as TextBox1, TextBox2, etc. which you are free to change as long as it remains unique. You can see that name in the properties view. Just refer to the object by that name.