Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21451

[RESOLVED] vb6 menu editor

$
0
0
Hi all,

Was wondering if someone could help me out?
through a 'View' menu, I'm trying to show/hide some things. Specifically, The AppTitle, Map Size and Present Tile coords.
I can show/hide them separately but not all at once. This is what I have now but it doesn't quite work right:


Private Sub mnuSHCoords_Click() 'show/hide tile coords
If mnuSHCoords.Checked And mnuSHSize.Checked Then
Form1.Caption = "AppTitle "
mnuSHCoords.Checked = False
ElseIf mnuSHCoords.Checked Then
Form1.Caption = "AppTitle " & " Size (" & mapwidth & " , " & mapheight & ")"
mnuSHCoords.Checked = False
ElseIf mnuSHCoords.Checked = True And mnuSHSize.Checked = True Then
Form1.Caption = "AppTitle " & " Size (" & mapwidth & " , " & mapheight & ")" & " Tile (" & coorda & " , " & coordb & ")"
mnuSHCoords.Checked = True
Else
Form1.Caption = "AppTitle " & " Tile (" & coorda & " , " & coordb & ")"
mnuSHCoords.Checked = True
End If
End Sub

Private Sub mnuSHSize_Click() 'show/hide map size
If mnuSHSize.Checked And mnuSHCoords.Checked Then
Form1.Caption = "AppTitle "
mnuSHSize.Checked = False
ElseIf mnuSHSize.Checked Then
Form1.Caption = "AppTitle " & " Tile (" & coorda & " , " & coordb & ")"
mnuSHSize.Checked = False
ElseIf mnuSHSize.Checked = True And mnuSHCoords.Checked = True Then
Form1.Caption = "AppTitle " & " Size (" & mapwidth & " , " & mapheight & ")" & " Tile (" & coorda & " , " & coordb & ")"
mnuSHSize.Checked = True
Else
Form1.Caption = "AppTitle " & " Size (" & mapwidth & " , " & mapheight & ")"
mnuSHSize.Checked = True
End If
End

BTW I am very much a beginner. I'm sure there will be an easier way, and one that works correctly for that matter, but I can't figure it out.

Many thanks in advance.

Viewing all articles
Browse latest Browse all 21451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>