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
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.
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
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!
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
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)
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
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",True, False, False, False) 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
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?)