B4J Question Containing Child Forms in A parent Window

Discussion in 'B4J Questions' started by codie01, Jul 2, 2015.

  1. codie01

    codie01 Member Licensed User

    Hi Guys, I am trying to write a program that pops up an entry form as a child of the main window. If you can view my code this would be good and advise.

    I have viewed a lot of the threads on this and to be honest it is very frustrating when suggestions are made without sample code and the person works it out and just types 'SOLVED'. I would like this post to finish with myself uploading the working code with an explanation and completed code example.

    Also doing it this way I do not contain the code for the Popup within the MODULE. So help on this would be good. Also I wish to pass a single variable when calling the popup.

    Thanks In advance.


    #Region  Project Attributes 
    #MainFormWidth: 600
    #MainFormHeight: 400 
    #End Region

    Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
    Private SiteEdit As Form
    Private MenuClose As MenuItem
    Private edit_site As MenuItem
    End Sub

    Sub AppStart (Form1 As Form, Args() As String)
        MainForm = Form1
    "simFOLD_MainScreen"'Load the layout file.
    End Sub

    Sub CenterFormOnScreen(Frm As Form)
    'Centers a form on the primary screen
       Dim ps As Screen = fx.PrimaryScreen
       Frm.WindowTop = (ps.MaxY - ps.MinY) / 
    2 - Frm.Height / 2
       Frm.WindowLeft = (ps.MaxX - ps.MinX) / 
    2 - Frm.Width / 2
    End Sub  

    Sub MenuClose_Action
    End Sub

    Public Sub SiteInputStart
    "SiteEdit", -1, -1)
    "simFOLD_SiteInput"'Load the layout file.
    End Sub

    Sub edit_site_Action
    End Sub
  2. Erel

    Erel Administrator Staff Member Licensed User

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice