Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


working with FormExDesktop_1.2


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-27-2008, 03:19 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default working with FormExDesktop_1.2

Hi,

I'm trying to make the "main" form of B4PPC a windows Like form, but can't get around to it...
Since the v1.2 Dll has no help file, and the v1 help file has no pratical examples other than the Demo file, I don't really know how to set the minimize and box to be enable, and the maximize to only restore to the form size...
Any help?
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #2 (permalink)  
Old 01-27-2008, 03:47 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,466
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by Cableguy View Post
Since the v1.2 Dll has no help file,
There IS an updated help file in the version 1.2 zip at post #20 here Build proper desktop apps in B4PPC with this awesome Forms library However the only difference over version 1 is that the resize event was added.

Code:
	FormEx1.MaximumHeight = 600
	FormEx1.MaximumWidth = 600
	FormEx1.MinimumHeight = 300
	FormEx1.MinimumWidth = 400
	FormEx1.HasMaximizeBox = false
	FormEx1.HasMinimizeBox = false
You will find these lines in App_Start in the "Build FormEx1" region of the demo app. Comment them all out and the defaults give you a fully resizable window with Maximize and Minimize boxes.
Reply With Quote
  #3 (permalink)  
Old 01-27-2008, 03:49 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

Ok, but should theese lines go before of after the show command.?
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #4 (permalink)  
Old 01-27-2008, 03:53 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

This is y code

Code:
Sub App_Start
LoadINI
XForm.New1("Main")
XForm.MaximumHeight = 600
	XForm.MaximumWidth = 600
	XForm.MinimumHeight = 300
	XForm.MinimumWidth = 400
	XForm.HasMaximizeBox = false
	XForm.HasMinimizeBox = false
Main.Show

End Sub
Main is a basic4ppc designer created form, 800x600
When I run the code, there's no error but the form shows has if the dll was not beeing called at all...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #5 (permalink)  
Old 01-27-2008, 04:18 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,466
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Main is a basic4ppc designer created form, 800x600
When I run the code, there's no error but the form shows has if the dll was not beeing called at all...
You are right, it is not being called because you are showing your original Main form with "Main.Show" not the XForm.

To show only your FormEx use "XForm.Run". This is documented in the comments in the "Start Application" region of the example and also under the help for Run in the "FormExDesktop advanced topic".

To get a window that Maximises and Minimises all you need is this
Code:
Sub App_Start
  LoadINI
  XForm.New1("Main")
  XForm.Run
End Sub
Reply With Quote
  #6 (permalink)  
Old 01-27-2008, 04:36 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

Thaks agraham, got it working...
It a great lib, but a bit confusing with all the available options...
An embeed dll option is starting to be needed in the Designer, a bit like VB,and to have a small panel/form were to seet the most commom props of the control...just a thought...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #7 (permalink)  
Old 01-27-2008, 04:43 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,466
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by Cableguy View Post
to seet the most commom props of the control...
I usually try to make the defaults the most common values so you don't need to worry too much about the properties.

A good simplifying tip is to not set any properties at all to begin with. Just try it using the defaults and if the behaviour is not what you want/expect then explore the help for inspiration!
Reply With Quote
  #8 (permalink)  
Old 01-27-2008, 04:44 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

one last question:

Since it is easyer to create the form in the designer and then pass it to the dll, can i have two froms inherited from the designer, show up with diferent sizes?
This second form not beeing the main form, what to use to show it? (show vs Run)
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #9 (permalink)  
Old 01-27-2008, 04:59 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,466
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by Cableguy View Post
can i have two froms inherited from the designer, show up with diferent sizes? This second form not beeing the main form, what to use to show it? (show vs Run)
You can have as many FormEx forms as you want, all inheriting from their own B4PPC Form object produced in the Designer.

You "Show" them, not "Run" them and they will all close when the main form (the first one that is "Run") is closed. Note that "Close" truly closes and disposes a FormEx and does not "Hide" it like a B4PPC Close does. If you want the Close button on the form to emulate B4PPC and let a form be reshown then check help for "Closing" and the comments in the example region "Closing events - makes it more like B4PPC" for more information.
Reply With Quote
  #10 (permalink)  
Old 01-27-2008, 05:09 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

you mean that if i close one form, i cannot show it again, if it was an inherit form?
But if I create a form in runtime I ccan create it any time I need, right?
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Working with VGA screens Erel Tutorials 18 06-01-2008 02:08 PM
working with date gjoisa Questions & Help Needed 3 03-29-2008 09:40 AM
Working ipac METER??? bGoody_iPAC_rx1950PPC Questions & Help Needed 2 03-20-2008 07:02 AM
Working with screen resolutions Nycran Questions & Help Needed 25 02-13-2008 02:04 PM
desktop ide quit working dennishea Questions & Help Needed 5 01-06-2008 07:31 PM


All times are GMT. The time now is 10:58 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0