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.

Can't get Formlib.Minimizebox to work right

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-20-2008, 04:40 PM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default Can't get Formlib.Minimizebox to work right

It has been 3 different applications and 3 different levels of failure with Formlib. Here's how my App_Start event is summed up:

Code:
Sub App_Start
 FrmMain.Show
 FrmLoading.Show 
'Loading screen
  FLMain.New1("frmMain",B4PObject(1))
  FLMain.MinimizeBox=
True
 FrmLoading.Show
 FrmMain.Focus
End Sub
I also tried closing with
Code:
FrmLoading.Close
FrmMain.Show
FLMAin.Minimizebox=
True
but the 'X' box still acts like a Ok box

And here's what happens when compiled with optimized compile

-FrmLoading doesn't disappear unless I use FrmMain.Show
-I close FrmLoading myself, see FrmMain with a 'X'
-I click the X and the app closes instead of minimizing (both in compile and IDE)


I spent days on this problem, rewrote my entire app, tried everything. It just doesn't work. The same technique makes the loading form disappear when I use it while downloading files but not otherwise. As for the 'X' box, it never works and it makes me mad.
__________________

Last edited by N1c0_ds : 12-20-2008 at 04:45 PM.
Reply With Quote
  #2 (permalink)  
Old 12-20-2008, 05:47 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

Quote:
Originally Posted by N1c0_ds View Post
It has been 3 different applications and 3 different levels of failure with Formlib. Here's how my App_Start event is summed up:

Code:
Sub App_Start
 FrmMain.Show
 FrmLoading.Show 
'Loading screen
  FLMain.New1("frmMain",B4PObject(1))
  FLMain.MinimizeBox=
True
 FrmLoading.Show
 FrmMain.Focus
End Sub
I also tried closing with
Code:
FrmLoading.Close
FrmMain.Show
FLMAin.Minimizebox=
True
but the 'X' box still acts like a Ok box

And here's what happens when compiled with optimized compile

-FrmLoading doesn't disappear unless I use FrmMain.Show
-I close FrmLoading myself, see FrmMain with a 'X'
-I click the X and the app closes instead of minimizing (both in compile and IDE)


I spent days on this problem, rewrote my entire app, tried everything. It just doesn't work. The same technique makes the loading form disappear when I use it while downloading files but not otherwise. As for the 'X' box, it never works and it makes me mad.
I trully DON'T understand your problem..
The sample code you gave alters NOTHING in the normal usage of the form...
Code:
Sub App_Start
 FrmMain.Show - <font color=
"SeaGreen">This shows the main form</font>
 FrmLoading.Show 
'Loading screen - <font color="seagreen">This shows a form named FrmLoading</font>
  FLMain.New1("frmMain",B4PObject(1)) - <font color="seagreen">This associates a Dll Ofbject to the Main Form</font>
  FLMain.MinimizeBox=
True - <font color="seagreen">This Forces the MainForm to have a "MinimizeBox"</font>
 FrmLoading.Show - <font color=
"seagreen">This shows the FrmLoading form, that should already be visisble</font>
 FrmMain.Focus - <font color=
"seagreen">This Should Not work as You are trying to set the focus to a hidden form...</font>
End Sub
It would be of great help to us if a piece of code with you problem ocourring could be posted...
__________________
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-20-2008, 06:55 PM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default

My entire app_start code, live and uncensored!

Code:
Sub App_Start
Screen.New1 
'Used to get screen resolution

FrmMain.Show 
'Show frmMain first. If it is closed, the application is closed too.

ProgressBar.New1("FrmLoading",79,35,FrmLoading.Width-89,10)
Progressbar.BringToFront
FrmLoading.DrawImage(
"icon.bmp",5,5)
AddLabel(
"FrmLoading","LblLoading",79,20,FrmLoading.Width-5,15,"Loading...")
 LblLoading.Color=
255,255,255
 
FrmLoading.Show 
'Show the "Loading" form
FrmLoading.Refresh

'COMMAND LINE MODE==========================================
'
If ArrayLen(args())>0 Then 'Check if there are arguments
'
  For Currentarg = 0 To ArrayLen(args())-1
'
   If args(Currentarg)="INSTALL" Then
'
     CommandLineMode("Install")
'
    Else If args(Currentarg)="UPDATEDB" Then
'
     CommandLineMode("UpdateDB")
'
    Else If args(Currentarg)="GET" Then
'
     CommandLineMode("Get")
'
   End If
'
  Next
'
Else 'If there are no commands, launch normally


'FORM PROPERTIES============================================

FLMain.New1(
"frmMain",B4PObject(1))
FLMain.MinimizeBox=
True

FrmList.ForeLayer=
True 'To list the applications

Flimage.New1(
"frmimage",B4PObject(1))
Flimage.FullScreen2(
True,True)
FrmImage.ForeLayer=
True

FrmInfo.ForeLayer=
True
FLInfo.New1(
"FrmInfo",B4PObject(1))

'SQL LIBRARIES==============================================

SQLConn.New1
SQLRead.New1
SQLCmd.New1(
"",SQLConn.Value)
If FileExist(AppPath & "\database.gdb"Then
 SQLConn.Open(
"Data source = " & AppPath & "\database.gdb"'Open the database
Else
 
Msgbox("Database not found"'REFINE
End If

'CONTROLS===================================================
Notif.New1 'Notification used to show error messages
Notif.InitialDuration=10000

'FRMMAIN

FrmMain.DrawImage(
"bg.jpg",FrmMain.Width/2-225/2,25)

  FrmMain.Line(
0,0,FrmMain.Width,30,cRed,BF) 'Top bar
  FrmMain.Line(0,FrmMain.Height-30,FrmMain.Width,FrmMain.Height,cRed,BF) 'Bottom bar
  FrmMain.DrawString("Gecko Core 3.1",7,0,FrmMain.Height-30,240,FrmMain.Height,cWhite)
  FrmMain.DrawString(
"Please report bugs at GetGecko.org",7,0,FrmMain.Height-15,240,FrmMain.Height,cWhite)
  
AddTextBox(
"frmMain","txtSearch",5,2,FrmMain.Width-75,25,""'Search box
 TxtSearch.Fontsize=10
 Cmenu.New1
 Cmenu.AddItem(
"Search")
 Cmenu.AddItem(
"-")
 Cmenu.AddItem(
"Copy")
 Cmenu.AddItem(
"Paste")
 Cmenu.AddItem(
"-")
 Cmenu.AddItem(
"Help")
 FlMain.AddContextMenu(
"txtsearch",Cmenu.Value)

AddButton(
"frmMain","btnSearch",Frmmain.Width-70,2,65,TxtSearch.Height,"Go"'Search button
 BtnSearch.Height=Txtsearch.Height
 BtnSearch.Color=cRed
 BtnSearch.FontColor=cWhite
AddTable(
"frmMain","TblList",0,0,10,10'Where SQL data is temporarily loaded
 TblList.Visible=False
 
 
'FRMLIST

FrmList.Line(
0,0,FrmList.Width,20,cRed,BF)
FrmList.Line(
0,frmlist.height-30,FrmList.Width,FrmList.Height,cRed,BF)
 Limit=
Int((FrmMain.Height-(50))/26'checking how many records can be shown in the given screen space
 Spaceheight=((FrmMain.Height-50)-(Int(FrmMain.Height-(50))/26)*26)/2+4
Scrollbarlist.New1(
"frmList",FrmList.Width-20,20,20,FrmList.Height-50,True'Create the scrollbar control, 20 pixels wide
Scrollbarlist.Minimum=0 'Minimum value
Scrollbarlist.SmallChange=Limit 
Scrollbarlist.LargeChange=Limit
 
 
'FRMINFO
  
 FrmInfo.Line(
0,0,FrmInfo.Width,20,cRed,BF) 'Top bar
 FrmInfo.Line(0,frminfo.height-30,FrmInfo.Width,FrmInfo.Height,cRed,BF) 'Bottom bar

AddPanel(
"FrmInfo","PanelMain",0,20,FrmInfo.Width,FrmInfo.Height-50'The main info panel
 AddPanel("PanelMain","PanelMain2",0,0,PanelMain.Width,1000)
  
'Developer
  AddLabel("PanelMain2","LblDev",0,0,PanelMain2.Width,15,"Author")
   FlInfo.SetFontStyle(
"LblDev",TrueFalseFalseFalse)
   Flinfo.TextAlignment(
"LblDev",FlInfo.alCenter)
   LblDev.Color=
255,200,200
   LblDev.Fontsize=
9
  AddLabel(
"PanelMain2","LblDev2",0,17,PanelMain2.Width,20,"...")
   Flinfo.TextAlignment(
"LblDev2",FlInfo.alCenter)
   LblDev2.Color=
255,255,255
   LblDev2.Fontsize=
12    
  
'Updated
  AddLabel("PanelMain2","LblWeb",0,45,PanelMain2.Width,15,"Website")
   FlInfo.SetFontStyle(
"LblWeb",TrueFalseFalseFalse)
   Flinfo.TextAlignment(
"LblWeb",FlInfo.alCenter)
   LblWeb.Color=
255,200,200
   LblWeb.Fontsize=
9
  AddLabel(
"PanelMain2","LblWeb2",0,62,PanelMain2.Width,20,"...")
   Flinfo.TextAlignment(
"LblWeb2",FlInfo.alCenter)
   LblWeb2.Color=
255,255,255 
   LblWeb2.Fontsize=
12
  
'AppID
  AddLabel("PanelMain2","LblAppID",0,90,PanelMain2.Width,15,"AppID")
   FlInfo.SetFontStyle(
"LblAppID",TrueFalseFalseFalse)
   Flinfo.TextAlignment(
"LblAppID",FlInfo.alCenter)
   LblAppID.Color=
255,200,200
   LblAppID.Fontsize=
9
  AddLabel(
"PanelMain2","LblAppID2",0,107,PanelMain2.Width,20,"...")
   Flinfo.TextAlignment(
"LblAppID2",FlInfo.alCenter)
   LblAppID2.Color=
255,255,255 
   LblAppID2.Fontsize=
12
    
AddPanel(
"FrmInfo","PanelText",0,20,FrmInfo.Width,FrmInfo.Height-50'Description panel
  AddTextBox("PanelText","TxtInfo",5,15,PanelText.Width-5,PanelText.Height-15,"")
  TxtInfo.Multiline=
True
  Txtinfo.FontSize=
10
   TxtEx.New1(
"TxtInfo")
    TxtEx.BorderStyle=bsNone
  AddLabel(
"PanelText","LblDesc",0,0,PanelText.Width,15,"Description")
   FlInfo.SetFontStyle(
"LblDesc",TrueFalseFalseFalse)
   Flinfo.TextAlignment(
"LblDesc",FlInfo.alCenter)
   LblDesc.Color=
255,200,200
   LblDesc.Fontsize=
9
  PanelText.Visible=
False

AddPanel(
"FrmInfo","PanelPics",0,20,FrmInfo.Width,FrmInfo.Height-50'Screenshot preview panel
  obj.New1(False'Door library object
  objArray.New1(1'Door library objectarray
  Img.New1 'Img is an ImageClass object used to resize pictures to fit the thumb
  AddImage("PanelPics","Thumb",0,15,PanelPics.Width,PanelPics.Height-15'The picture preview (not fullscreen)
   Thumb.Color=255,255,255
   Thumb.Mode=cCenterImage
  PanelPics.Visible=
False
  AddLabel(
"Panelpics","LblScreenshot",0,0,PanelText.Width,15,"Screenshot")
   FlInfo.SetFontStyle(
"LblScreenshot",TrueFalseFalseFalse)
   Flinfo.TextAlignment(
"LblScreenshot",FlInfo.alCenter)
   LblScreenshot.Color=
255,200,200
   LblScreenshot.Fontsize=
9

'FRMIMAGE
AddButton("frmImage","btnClose",FrmMain.Width-100,0,100,20,"Click to close")
 BtnClose.Color=
0,0,0
 BtnClose.FontColor=
255,255,255
AddImage(
"frmImage","Screenshot",0,0,Screen.Width,Screen.Height) 'The fullscreen picture
 Screenshot.Color=0,0,0
 Screenshot.Mode=cCenterImage
'===========================================================
'
THE END
FrmLoading.Close
FrmMain.Show
FLMain.MinimizeBox=
True
End Sub
__________________
Reply With Quote
  #4 (permalink)  
Old 12-20-2008, 09:40 PM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default

Well well well... my problem again.

I tried to change some settings on WkTask (excellent program!) and probably checked the wrong checkbox because the application does minimize.

Since I want to make that thread useful, here is some information about formlib:

-In order to show up in the minimized apps, the Text property of the form must not be empty. That's why the Comm Manager doesn't show up on HTC devices.

-In order to activate the minimizebox, the form must be active (right?)
__________________
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.fullscreen(false) doesn't work Byak@ Code Samples & Tips 3 08-13-2008 06:35 PM
Fullscreen,MinimizeBox,ShowToDayScreen Bobbes German Forum 1 04-03-2008 12:54 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


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


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