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.

Strange Form behaviour at start

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-31-2008, 01:50 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default Strange Form behaviour at start

Hi.

A program has 4 forms, each with a flb object. The program uses the following libraries: FormLib, ImageLib, dzHW, RegistryDevice, FilesEx, ControlsExDevice, Hardware, ControlsEx and GPSdriver.

In App Start quite some objects are initialised; then the screen orientation is changed to landscape with Lndsc90.exe.

Then the form1 is shown and focus is set to it. Then for each form a number of flb settings are done, and a number of AddEvents are issued.

Next a number of bmp, drawer, rectangle objects are initialised on form2 and with AddTable a table is created on form1 and on form2.

Then a file is read to fill those tables. At filling time they are set to invisible. When filling is finished those tables are sorted, set to visible and a cell is selected in the table on the panel of form1.
Finally the focus is set to form1 and it is refreshed.

Now, how it behaves.

At start up during a while only a label on Form 1 is visible and the menu bar with Menu and SIP. The WaitCursor stops, 10 seconds later form1 becomes completely visible during a second or so and then disappears.

Pressing the icon in the titlebar shows Form1 as it should be and the program can run.

Does somebody have an explanation for this behaviour?

Harry
Reply With Quote
  #2 (permalink)  
Old 12-31-2008, 03:20 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

You should only execute the show method after all initialization is done, so probably in the last line of app_start...
when showing a form, it get the focus automatically...
Since you are first showing the form, and then initializing some object, your visible form takes some time to redraw completly untill all other "functions" are completed...
IF you must show the form before all object are initialized, the add a few "DoEvents" keywords and test the results...
placing a doevents alow the screen to be drawn, while the cpu is busy with other things...
The place were it lays is very important,thats why I said, put a few of them..
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #3 (permalink)  
Old 12-31-2008, 03:50 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Netherlands
Posts: 222
Default Strange Form behaviour at start

Hallo Paulo,

Thanks for your fast and helpfull reply. Postponing show to the very last moment and introducing some DoEvents have solved the problem.
Thanks again,

Harry
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
Strange cast error agraham Beta Versions 1 10-11-2008 06:43 PM
Different behaviour DeskTop and Device HARRY Questions (Windows Mobile) 2 02-22-2008 12:36 PM
CSV file generates strange start in file sunnyboyj Questions (Windows Mobile) 9 12-21-2007 08:38 PM
Strange characters pmu5757 Questions (Windows Mobile) 2 09-30-2007 08:56 AM
Start Form Designer without pda connected Cor Basic4ppc Wishlist 1 08-30-2007 08:22 AM


All times are GMT. The time now is 03:34 AM.


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