A few questions regarding FormLib

N1c0_ds

Active Member
Licensed User
I just started messing with formlib and I have a few questions the help file doesn't really answer.

-Do I have to add a new FormLib object for every form and context menu? Can't I just make a new Flb1.New1("form",B4PObject(1)) for each form with the same object?

-What is the B4PObject(1) argument?

Thanks in advance!
 

Ricky D

Well-Known Member
Licensed User
formlib

Hi,

I started to use it too.

I am using context menus on my forms.

You only need to initialise the formlib object once. I do it in AppStart.

I'm not sure what the B4PObject(1) argument is. Here is a snippet of my code


flb.New1("frmMain",B4PObject(1))

contextMain.New1
contextMain.AddItem("Set Shift Date")
contextMain.AddItem("Suburbs")
contextMain.AddItem("Owners")
contextMain.AddItem("Fare Types")
contextMain.AddItem("Toll Wheres")
contextMain.AddItem("Exit")
flb.AddContextMenu("frmMain",contextMain.Value)

ctxtFares.New1
ctxtFares.AddItem("Add New")
ctxtFares.AddItem("Edit")
ctxtfares.AddItem("Delete")
ctxtFares.AddItem("Close")
ctxtFares.AddItem("Exit Application")
flb.AddContextMenu("frmFares",ctxtFares.Value)


flb is a FormLib object and contextMain & ctxtFares are ContextMenu objects

here is the _Click event for contextMain

Sub contextMain_Click
Select contextMain.SelectedText
Case "Set Shift Date"
frmChangeShiftDate.show
Case "Suburbs"
frmSuburbs.Show
Case "Owners"
frmOwners.Show
Case "Fare Types"
frmFareTypes.Show
Case "Toll Wheres"
frmTollWheres.Show
Case "Exit"
mnuExitMain_Click
End Select
End Sub


regards, Ricky
 

N1c0_ds

Active Member
Licensed User
Thanks a lot!

Now I can't manage to make MinimizeBox work.

This is in my AppStart menu:

Flb1.New1("Form1",B4PObject(1))
Flb1.MinimizeBox = True
I don't yet use formlib anywhere else except for Flb1_Resize

:sign0085:
 

N1c0_ds

Active Member
Licensed User
But what about MinimizeBox? I don't see where things went wrong :(

The rest works well, :D

UPDATE:
Suddenly works o_0

I might have done something wrong somewhere :)

Odd.

UPDATE 2:
Only on one of my apps!
 
Last edited:

N1c0_ds

Active Member
Licensed User
Okay I got it working on both apps.

Apparently you have to stick the two lines together without anything between them... I think...

Anyway I should upload my apps soon :D
 
Top