Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form not centering
Message
De
06/05/1998 11:47:53
Edward Crawford
City Facilities Management
Glasgow, Royaume Uni
 
 
À
06/05/1998 07:49:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00096887
Message ID:
00097372
Vues:
26
>>>>>>>I have Autocenter set to .T.. It does center on a 1024X768 screen, just
>>>>not a 800X600 screen
>>>>>>
>>>>>>You are not listening. Explicitly set AutoCenter to True *again* in the
>>>>form Init. The problem here is the internal event that calculates the
>>>>AutoCenter coordinates occurs too early for your needs. Force-feed it to
>>>>happen again.
>>>>>
>>>>>This has nothing to do with *not listening*, I simply did not understand
>>>>how it works. Since you can not place any code in the _Screen.Init()
>>>>method, how do I accomplish this with _SCREEN. Thank you.
>>>>
>>>>I got to this thread late. Perhaps Steven means:
>>>>
>>>>YOURFORM.INIT
>>>>thisform.autocenter=.t.
>>>
>>>I believe he wants to center the _SCREEN on the desktop, in which case he should be able to just before making the _SCREEN visible, set the AutoCenter:
>>>
>>>
>>>_SCREEN.AutoCenter = .T.
>>>_SCREEN.Visible = .T.
>>>
>>>
>>>Bill
>>
>>
>>I have a method that runs when an application starts. This is it:
>>
>>** make main Foxpro screen invisible
>>
>>_SCREEN.Visible = .F.
>>
>>** clear system menu
>>
>>SET SYSMENU TO
>>DEACTIVATE MENU _msysmenu
>>HIDE MENU _msysmenu
>>CLEAR MENUS
>>RELEASE MENU _msysmenu
>>
>>***** set up screen
>>
>>_SCREEN.AutoCenter = .T.
>>_SCREEN.Caption = this.ScreenCaption
>>_SCREEN.Icon = this.ScreenIcon
>>_SCREEN.Closable = this.ScreenClosable
>>_SCREEN.MinButton = this.ScreenMinButton
>>_SCREEN.MaxButton = this.ScreenMaxButton
>>_SCREEN.Height = this.ScreenHeight
>>_SCREEN.Width = this.ScreenWidth
>>
>>******* make _SCREEN visible
>>
>>_SCREEN.Visible = .T.
>>
>>
>>It centers fine on a 1024X768 machine ( same as development machine) , but not on 800X600 machines.
>>
>>Ed
>
>Hmmm ... I've never done this so I have no experience with it. have you tried putting the .AutoCenter statement after the .Height and .Width statements and immediately before the .Visible statement? In your case, what is the "This" referenced in your statements?
>
>Bill

The THIS's are properties in my format classes. The problem was setting autocenter first. I should havew done that last.

Ed
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform