|
-
Jun 20th, 2000, 09:50 PM
#1
Thread Starter
Lively Member
I have two forms one is frmMain, it is the main form, the second is frmAdvanced, it is to set the advanced settings. What I'm trying to do is when the settings are changed on the advanced settings form, I want to see the changes on the main form. It is things like turning a toolbar or statusbar from visible to not visible. I can get it to work if I exit the enitre program and re-open the program. I'm saving all of the settings to a text file. But I want to see the changes with out exiting the program. This is the code from the frmAdvanced form to turn on or off the status bar if the the box is checked:
Private Sub chkStatusbar_Click()
If chkStatusbar.Value = 1 Then
frmMergeMain.mnuViewStatusBar.Checked = True
frmMergeMain.mnuViewStatusBar.Visible = True
Else
frmMergeMain.mnuViewStatusBar.Checked = False
frmMergeMain.mnuViewStatusBar.Visible = False
End If
End Sub
When I leave the advanced form and return to the main form the status bar is either still there, if it was there in the first place or not there if it was not there.
HELP please.
-
Jun 20th, 2000, 09:55 PM
#2
Lively Member
i'm not sure exactly what you want to do, but are you making the variables global so they can be used by both forms?
-
Jun 20th, 2000, 10:03 PM
#3
Thread Starter
Lively Member
Do I have to make them global when I'm calling the form that they are part of and changing the information that way?? If I want to turn the toolbar off so that I don't see it, from an other form how would you do it??
Using VB6 Still Pluging away
-
Jun 20th, 2000, 10:13 PM
#4
_______
public myVar as boolean
if checked then myVar = false
if myVar = true then
do whatever
else
whatever
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 20th, 2000, 10:18 PM
#5
Thread Starter
Lively Member
HeSaidJoe
Where will this code go on the main form or the advanced form?? This could be where I'm going wrong, I might have the code on the wrong forms
Using VB6 Still Pluging away
-
Jun 20th, 2000, 10:27 PM
#6
_______
I add my public declares in a bas module
then it's available everywhere
in the form activateof main i would put
if whatever is checked then myVar = false
if myVar = ture then do
bla bla
else
bla bla
endif
in the frmActivae of the advance
if myVar = false do whatever
else
do
something else
endif
in the check box
if chkMe = chekced then myVar =
gotta go...system crash...
will check later on thei
should have the idea from this
later
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 20th, 2000, 10:31 PM
#7
Thread Starter
Lively Member
HeSaidJoe, Thank you very much. I'll let you know how it goes.
Using VB6 Still Pluging away
-
Jun 20th, 2000, 10:36 PM
#8
_______
sorry
...I'm at work so I had to go...
Basically, you want to set the value of myVar in your checked and unchecked states and that makes it available to both forms..then you want to check the value in both form activates and act on it at that point.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 20th, 2000, 10:52 PM
#9
Thread Starter
Lively Member
Okay, I see what I'm doing wrong. I'm missing that myVar part. A bas module is just a basic module right?? Thank you ever so much for all of your help. One more question, ini files have you ever used them??
I'm at work too so I understand. :-)
Using VB6 Still Pluging away
-
Jun 20th, 2000, 10:55 PM
#10
_______
over and out...
yes..add module ..saves as .bas
no..never played with them
good luck
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 20th, 2000, 11:01 PM
#11
Thread Starter
Lively Member
Thanks again for all your help!!!!!!!!!!!
Using VB6 Still Pluging away
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|