How to refer to a variable in VB6?

Is it possible in Visual Basic 6 to make some variable to refer to another variable, so when it changes, another different?

I know that an operator can be used for objects Set. But how to make this work for integer type variables? The only way I know is to wrap a variable inside an object.

+3
source share
4 answers

Not through the language itself. You could use a class, as you mentioned, another way is to use the Win32 API.

In particular

HeapAlloc for memory allocation. You will store the returned address in a Long variable.

Then use RTLMoveMemory, renamed CopyMemory, to transfer data to and from allocated memory.

Public Declare Sub CopyMemory Lib "kernel32" Alias _
    "RtlMoveMemory" (Destination As Any, Source As Any, _
    ByVal Length As Long)

- VB6.

+2

A , . B.

textbox1.text = A

onchgange textbox1 B = textbox1.text

wat im using.,

0

. , . . !

0

All Articles