1 / 8

VB6 Forms and menus

VB6 Forms and menus. Forms. Project.. Add form Project Properties – startup object Forms other than startup default to not shown Form2.show Form2.hide Event sequence – life history of a form create = init event load = load event (start-up processes) show (get loose focus) / hide

arcelia
Download Presentation

VB6 Forms and menus

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VB6 Forms and menus

  2. Forms • Project.. Add form • Project Properties – startup object • Forms other than startup default to not shown • Form2.show • Form2.hide • Event sequence – life history of a form • create = init event • load = load event (start-up processes) • show (get loose focus) / hide • queryunload (closedown processes) • unload • could then load again • terminate

  3. Or another way.. Dim f As Form2 ' f is of type Object Set f = New Form2 ' causes init f.Show ' causes load then show ' when user closes form2, get queryunload, ' then unload Set f = nothing ' causes terminate

  4. MDI Application • Multiple Document Interface • Add to project MDI Form • Add another form • Set MDIChild property of second form true

  5. Menus • Tools – Menu Editor • Double-click to code

  6. Creating a popup menu

  7. Displaying a popup menu Private Sub MDIForm_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu popUp End If End Sub

  8. Forms and menu exercise • Make an MDI Form • With a menu File.New.Exit and Help • New produces new child window forms • Give child window a popup menu • Exit ends (use End) • Help displays an About dialog box:

More Related