Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Visual Basic 6 Help
#1
Whats the use of:

xform:
xboton:
xvalor:
Dim:

and what does this comand line does:

"Private Sub cmdbuscar_Click()
act_des_botones "Buscar", False, Me
End Sub"

(Having trouble with the "False, Me" part mostly)

My teacher is a total dickwad so asking is out of the question (Already tried :S).

I more or less know what they do but i need some part by part explanation of what each word/command do so i know exactly how to use it and when to use it.
#2
dante9898 Wrote:Whats the use of:

xform:
xboton:
xvalor:
Dim:
Are there colons in the actual code? If so, then they're labels, used with goto statements. If not, then xform, xboton, and xvalor are identifier names for variables or functions or subroutines or something, can't say without any context. Dim is a keyword used to declare variables. Variables must be declared before they can be used if Option Explicit is on.

dante9898 Wrote:and what does this comand line does:

"Private Sub cmdbuscar_Click()
act_des_botones "Buscar", False, Me
End Sub"

(Having trouble with the "False, Me" part mostly)

My teacher is a total plantainwad so asking is out of the question (Already tried :S).

I more or less know what they do but i need some part by part explanation of what each word/command do so i know exactly how to use it and when to use it.

Private: This subroutine is not accessible from other code files(?)
Sub: This is a subroutine. A subroutine is a piece of code that other code can use that does not return a value.
cmdbuscar_Click(): The name of the subroutine. Judging by the name, it will be called when the button called "cmdbuscar" is clicked. The parentheses are empty, so the subroutine does not accept any parameters.
act_des_botones "Buscar", False, Me: I can't tell without the rest of the code, but I think act_des_botones is probably some subroutine. "Buscar", False, and Me are parameters passed to to the subroutine. "Buscar" is a string. False is the boolean value that is the opposite of True. Me refers to the form the button is on(?).
End Sub: Marks the end of the subroutine.
#3
Spaz Wrote:Are there colons in the actual code? If so, then they're labels, used with goto statements. If not, then xform, xboton, and xvalor are identifier names for variables or functions or subroutines or something, can't say without any context. Dim is a keyword used to declare variables. Variables must be declared before they can be used if Option Explicit is on.



Private: This subroutine is not accessible from other code files(?)
Sub: This is a subroutine. A subroutine is a piece of code that other code can use that does not return a value.
cmdbuscar_Click(): The name of the subroutine. Judging by the name, it will be called when the button called "cmdbuscar" is clicked. The parentheses are empty, so the subroutine does not accept any parameters.
act_des_botones "Buscar", False, Me: I can't tell without the rest of the code, but I think act_des_botones is probably some subroutine. "Buscar", False, and Me are parameters passed to to the subroutine. "Buscar" is a string. False is the boolean value that is the opposite of True. Me refers to the form the button is on(?).
End Sub: Marks the end of the subroutine.

Thank you very much, even though i just ended facekeybording myself until i learned what each of these do exactly using trial and error.
#4
dante9898 Wrote:Thank you very much, even though i just ended facekeybording myself until i learned what each of these do exactly using trial and error.

That's how all programmers learned at some point. Welcome to the crowd.


Forum Jump:


Users browsing this thread: 1 Guest(s)