having some trouble.

Posts 1–11 of 11 · Page 1 of 1
having some trouble.
Im trying to make it so when a button is pressed it shows a different menu on the same form. Sort of like tabs, without tabs. Get what im saying? Ive tried using multiple group boxes for each menu/screen but that doesnt work.

example :



one one of those buttons on the tab is pressed it clears the screen and the appropriate menu/ options are shown.
Unless I am not understanding, there are a few ways, but the easiest way is to have 2 menus

(Using Menu Strip)


and use

Code:
  MenuStrip1.Visible = True
        MenuStrip2.Visible = False
and reverse it

Code:
  MenuStrip1.Visible = false
        MenuStrip2.Visible = true
if both are docked left then they will replace each other seamlessly in your application
Quote Originally Posted by NextGen1 View Post
Unless I am not understanding, there are a few ways, but the easiest way is to have 2 menus

and use

Code:
  MenuStrip1.Visible = True
        MenuStrip2.Visible = False
and reverse it

Code:
  MenuStrip1.Visible = false
        MenuStrip2.Visible = true
if both are docked left then they will replace each other seamlessly in your application
I didnt mean menu as in menu strip, but like an option screen. You know how each tab is a different screen? Well thats what im trying to do, without the tabs.

like lets say i press the "System Clean" button, then it brings my to the right screen with the right set of options.


I was thinking Vb6, and PictureBox's forgot picturebox's are more like vb6 image box's now


(i Let me test something)

Quote Originally Posted by NextGen1 View Post
Group Box's Should Work, but if not have you tried Picture Boxes


If you use Picture Boxes, You can enlarge the project , add everything into different picture boxs,

create one picture box that is blank

(im thinking VB6, Let me test something)

Ive tried GroupBox's. It makes it hard to work with when there's so many GroupBox's everywhere. Also, if i say Groupbox1.visible = False, Then it hides the other GrouBox's which are inside of it. Even the ones that hold the other option screens. Even if i set them to visible. So...that doesnt work..

no i haven't tried picturebox's.
I have a Idea, One Sec

Picture Boxes used to store content ( I dont work with picture box's) in vb6, not sure if that concept still works in vb, but I have a better idea, Im working out the code now

btw- I agree, it's very messy, You could always widen the form, use group boxes and a panel to keep things clean , but Like I said, trying something

(or MdiParents )

Use... PANELS!!!

When you click the first button on the side, you can have it like this

[php]panel1.visible = true
panel2.visible = false
etc..[/php]

And you can keep doing it like that, so every button on the side, shows the panels, and disables the button your just clicked, and enables the rest. Same thing i used in my multitool.

Its very basic actually. And simple to do.

EDIT: I saw your Groupbox problem where it hides the rest, what you have to do, is set the location of each of them the SAME, but just paste them anywhere on the form. As long as there in the same location, there not in each other, thus you can do the rest safely, of course, if you modify something and a different groupbox is preset, you gotta move all of them out of the way... blah blah blah.
Panels with have the same messiness of groupbox's , but like groupbox's should work, Im looking for a clean alternative.

I remember helping you with that, it's because you (unintentionally) docked a groupbox inside another one)

I have no problem with mine.. but hm... let me think of an "alternative".

Also nextgen, in the CA section, i released a 2 day period of my tool, go check it out, i need some feedback.


EDIT: I was thinking, is it possible to open a new form, and lock it in the same location as another one? So when that one loads, it closes the other form?

If thats possible, whenever they click the button, the other form pops up, in the same position, and it looks like its the same form, but its not.
Got It

Add a Tabbed Control, Make as many tabs as you need , fill in the content

then change the settings to

Appearance = Buttons.
SizeMode = Fixed.
ItemSize = (0,1)

Then You control which tab is showing programatically

You now have a multipage Control that is clean, works , and no tabs

@mugnuf

You can use fancy manipulation like inherits windows.forms.form2
and remove form1 components programatically and create different forms, similar to the way in asp.net you create multiple applications and have them run in one window using components, but I think it's to complex for this type of situation, The tabs concept should work great, It wont be tabbed, but allow multiple pages in one form


Or you can add tabs, hide the tab part and add to the button or w/e
TabControl1.SelectedTab = TabPage1
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Talk with us