Generally speaking a definition actually creates something while a declaration just tells the compiler it exists.
This can be done for both variables and functions. A variable definition can also include a value for initialisation.
So for variables
// Assume all at file scope
int i; // This is a definition, you'd expect to find it in a .c file
int ii = 5; // This is a definition with initialisation , you'd expect to find it in a .c file
extern int i; // This is a declaration, you'd expect to find it in a .h file
extern int iii = 5; // This is a definition with initialisation, you'd expect to find it in a .c file
The definitions on lines 3 and 5 cause the compiler to reserve memory for the variable, line 5 also provides an initialisation value. Either of these can also be written with the static keyword to limit the variables scope to the current file, otherwise the variable implicitly has global scope.
Line 7 is a declaration, it says only that the variable exists, the compiler will not reserve memory, the linker will have to resolve this symbol.
However line 9 is a definition again because it contains an initialiser, the compiler will reserve memory. Additionally it is explicitly declared as have global scope.
For a function
int Myfunction(int g); // This is a declaration
// This is a function definition
int Myfunction(int g)
return (g + 375) % 1000;
The function declaration on line 1 tells the compiler the function exists, normally appearing at the top of a .c file or in a header. However does not cause the compiler to generate any output to the object file.
The is a function definition on line 4 causes the compiler to output the object code for this function to the object file presumably for use in the program.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...