Implicit Loading of Form

forms , implicit , loading India
  • 6 years ago

    If I try to access any property of a child form ( still NOT loaded in memory ) from a MDI Form, the child form is automatically loaded into memory.

    I wish to access these property WITHOUT the form automatically loading.

    Refer to below code.

    in the line " If objForm.Name = Then", the result is always true because the moment VB engine encounters "", it automatically loads this form into memory and returns "True". Thus I am unable to determine if "" was loaded in memory before execution of this procedure or not.

    Public Sub CheckFormStatus(Myform As Form) ' This procedure determines if "frmbycode" is open in the background when ' "frmbyname" is exited. If yes, it displays "frmbycode" before exiting. Dim objForm As Form Dim FormLoaded As Boolean Dim FormShown As Boolean FormLoaded = False FormShown = False For Each objForm In VB.Forms If objForm.Name = Then FormLoaded = True If objForm.Visible Then FormShown = True MsgBox "Load Status: " & FormLoaded & vbCrLf & "Show Status:" & FormShown ' Myform.Show End If Exit For End If Next End Sub

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The trouble with programmers is that you can never tell what a programmer is doing until it's too late.” - Seymour Cray