Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shared variables in VB4
#1
I just dled Visual Basic 4 and am learning how to use it. I noticed that variables created in subs dont are earased after the sub ends (just like qb). I was wondering how i could prevent this.

Also there seems to be some gliches in VB4 whenever i change an objects font or font size and save it it says that there is an error and it wont let me open it. i was wondering if there was somthing i could do to fix that.
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply
#2
To share variables, just Dim them in the top part of the file (globals/declarations or something like that). For globals shared among files, use Global in a module (.bas).

Not sure what the problem is with the fonts - are you using the 32-bit VB4 or the 16-bit? Not sure if that would make a difference, but I would recommend using the 32-bit version on 32-bit OSes...
Reply
#3
yeah im usin the 32-bit
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)