I'm a Electrical engineer working in an automation company, recently i'm require to do a PC base HMI. So i decide to use VB to do it(I'm a newbie in VB, just learn/use VB6 in Uni). So far, Im able to read/write to the PLC through serial port. There problem now is, to do HMI, it has many screen/page(or Form) like page to display Alarm message, to display result, to login..etc and a Header/footer which will share/display in all page.When button in the footer is pressed, page will display.

I have no idea how to start with,should i do each page in seperate form and hide/shows them, or Do all in a single form?
Actually i like to do all in single form, so the header and footer will be there,what control should i use, any suggestion to me?

If i do in a single Form, got any tools to group those control, so it wont so messy? i think it will have 8 to 9 pages/screen@@i tries to use tools-->Panel then call the form to show within the panel, but the visual effect is bad. Any other idea?

if i do each screen in a individual form, then how should i put the header/footer so every screen can see/press them? Does it have a auto ways, or i need to manually put all the button label on it? I try to use "Me.Controls.Add(Form1.Panel1)" when form2 load,where panel1 is the header in form1, Me is form2.So, panel1 header shows on form2.

Any advise? Is there any tactic so the end-user wont feel the form is changing?

if i understand that right, what you could do is using a MDI form and some children forms...

Hope i helped :)

Thanks for reply.
Ya, I try something like that

Dim f As New Form2()
f.TopLevel = False
Me.Panel2.Controls.Add(f)
f.Show()

So,Form2 will show within the Panel.
But, the problem is:1) The Form2 will show with the Title Bar
2)The Form2 can be Drag to move around
I dont want this neither.

Below show the effect I want, went Application open it shows Screen1, when i press Alarm button it will change to Alarm page which is screen 2. Other button will bring the user to corresponding pages.
1)With the header/footer shows always in each page
2)The children should'd show title bar, and Position must be fix/cannot be moves. So it seem like one page.

Any help/advise will be really appreciated^^Thanks in advance.

P/s:Sorry for my poor language^^.

If you want, you could add me on my IM, so i can provide more assistance... :)

What is an "IM",and how to add? Im new here^^

however, i think my problem solve..at least for these moment╮(╯_╰)╭
By putting code below,Seem work fine.
Just unsure this is the best practice to do HMI or not@@ im pretty new in proggramming. Lot to learn ~~~~(>_<)~~~~

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        Dim f As New Form2()
        f.TopLevel = False
        With f
            .Width = SplitContainer1.Panel1.Width
            .Left = SplitContainer1.Panel1.Left
            .Top = SplitContainer1.Panel1.Top
            .Height = SplitContainer1.Panel1.Height
            .FormBorderStyle = Windows.Forms.FormBorderStyle.None
        End With
        Me.SplitContainer1.Panel1.Controls.Add(f)
        f.Show()

    End Sub

IM = Instant messenger = MSN :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.