How to structure such as topic, VB initialized to zero, there is such a function?
CodePudding user response:
In VB6, members of the "default" is "0",
CodePudding user response:
Structure to create a VB will automatically "reset", convenient!
CodePudding user response:
VB6 does not provide function, can use the API: RtlZeroMemory clear the designated "memory" 0, RtlFillMemory with a specified byte value "" fill the specified memory area,
CodePudding user response:
If the original poster is to want to will have used structure called a user-defined types (VB) variables to empty, just let it is equal to a new statement of the similar structure variables,
'A user - defined type: Private Type udtSomeType SubVariableOne As Integer SubVariableTwo As String SubVariableThree As Long End Type
To send 'A class - level user - defined type variables: Private TypeVariableOne As udtSomeType Private TypeVariableTwo As udtSomeType
'A method in the class: Private Sub ResetData () Dim CleanTypeVariable As udtSomeType TypeVariableOne=CleanTypeVariable TypeVariableTwo=CleanTypeVariable End Sub