Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form not centering
Message
From
06/05/1998 07:49:13
 
 
To
05/05/1998 17:12:26
Edward Crawford
City Facilities Management
Glasgow, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00096887
Message ID:
00097263
Views:
25
>>>>>>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
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform