Forum Topic: visual basic 0.6 - help!!!

(259 views • 4 replies)

This topic is 1 page long.

<< < > >>
None

thecoreman

Reply To Post Reply & Quote

Posted at: 3/28/06 07:07 AM

thecoreman EVIL LEVEL 17

Sign-Up: 01/17/06

Posts: 286

if someone can help me - how the hell i make a dim to by the same in all form
dim X

timer1_timer (blablabla)
if hits (a,b) then
x = x + 10
end if
so in form 1 x = 17
and form 2 x = 7
help!!!

visual basic 0.6 - help!!!

Clicky clicky... My site. It's really awesome, guitars and flash and pics and bands and so on.
-Link to the smoking kills collab in constroction-

BBS Signature

None

Claxor

Reply To Post Reply & Quote

Posted at: 3/28/06 12:44 PM

Claxor DARK LEVEL 10

Sign-Up: 10/21/05

Posts: 2,467

At 3/28/06 07:07 AM, thecoreman wrote: picture spam

Don't picturespam, make a sig.

BBS Signature

None

OmgLolLmaoRofl

Reply To Post Reply & Quote

Posted at: 5/10/06 11:34 AM

OmgLolLmaoRofl NEUTRAL LEVEL 15

Sign-Up: 03/25/06

Posts: 2

I don´t really understand your question but i´ll try to answer:

In the "option explicit" area post Dim blah As Integer

Or smthng. "X" is a predeclared var. I think, so it possibly can´t work.
And:

Private Sub Form_Load()
blah = 1
End Sub

Did you do something like this? it looks like you haven´t. Anyway, please explain your problem a bit more precisely.

Or you can simply say, that "blah= X"
If it´s that, what you want.


None

CronoMan

Reply To Post Reply & Quote

Posted at: 5/10/06 01:19 PM

CronoMan EVIL LEVEL 06

Sign-Up: 07/19/04

Posts: 2,727

you're thinking of global variables?

As far as I remember it's DIM SHARED... or is that qbasic?
global?

hmmm... it's been a while :P

"no sound in ass"


None

OmgLolLmaoRofl

Reply To Post Reply & Quote

Posted at: 5/11/06 11:45 AM

OmgLolLmaoRofl NEUTRAL LEVEL 15

Sign-Up: 03/25/06

Posts: 2

Umm, I don´t know. I found something useful in my VbBook :D

Example ( "(1) and (2) in both forms shouldnt be in the code ;) )

Option Explicit
Public blah As Integer

Private Sub Form(1)_Load()
Blah = 10
lbl.Caption = Blah
Form2.Visible = True
End Sub

Private Sub Form(2)_Load()
lbl.Caption = Form1.Blah
End Sub

A declaration in "Form1" causes the need to use it from there (baad english :P ) with "Form1.Blah".
You could also Declare it in the Public-Module part. But I don´t really understand this method.
Maybe you do...

I hope this helps in some way. I tried, and it worked ^^


All times are Eastern Standard Time (GMT -5) | Current Time: 01:12 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!