Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

A few questions regarding FormLib

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-17-2008, 02:01 AM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default A few questions regarding FormLib

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!
Reply With Quote
  #2 (permalink)  
Old 09-17-2008, 06:35 AM
Basic4ppc Veteran
 
Join Date: Sep 2008
Location: Brisbane, Australia
Posts: 317
Default 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
Reply With Quote
  #3 (permalink)  
Old 09-17-2008, 11:43 AM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default

Thanks a lot!

Now I can't manage to make MinimizeBox work.

This is in my AppStart menu:

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

Reply With Quote
  #4 (permalink)  
Old 09-17-2008, 04:00 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You should create a FormLib object for each form. The memory footprint of each object is very small.
B4PObject(1) is a reference to an internal structure which is accessed by FormLib.
Reply With Quote
  #5 (permalink)  
Old 09-17-2008, 08:55 PM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default

But what about MinimizeBox? I don't see where things went wrong

The rest works well,

UPDATE:
Suddenly works o_0

I might have done something wrong somewhere

Odd.

UPDATE 2:
Only on one of my apps!

Last edited by N1c0_ds : 09-18-2008 at 12:20 AM.
Reply With Quote
  #6 (permalink)  
Old 09-18-2008, 04:06 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

If it still doesn't work please upload your code and I'll check it.
Reply With Quote
  #7 (permalink)  
Old 09-19-2008, 02:34 AM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default

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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
FormLib and modules Cableguy Questions (Windows Mobile) 3 10-23-2008 09:26 PM
Formlib problem enonod Questions (Windows Mobile) 6 04-28-2008 12:12 PM
where's formlib? Cableguy Questions (Windows Mobile) 2 09-23-2007 04:09 PM
add to formlib Cableguy Basic4ppc Wishlist 0 05-14-2007 07:25 PM
Formlib TextAlignment Jendy Questions (Windows Mobile) 1 05-08-2007 05:17 AM


All times are GMT. The time now is 02:23 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0