Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 12 OCT 2004 03:14:39PM Blair Massey wrote:

Gentlemen,

I've always used the code below to open all windows in our 16-bit application. Now, with OI32 bit, when a form is opened, there is no focus. It seems to be tied to setting the size property to make the form visible. All forms are created with VISIBLE set to false initially.

Here the code:

Utility('CURSOR','H')

if Assigned(parent) else

parent=Get_Property( @Window, 'PARENT' )

end

* Get the size of the system (Resolution)

sysRes=Get_Property("SYSTEM" , "SIZE")

sysW=sysRes

sysH=sysRes

retval=Start_Window( window, parent, ) * If want Buyer to close all open windows * use this statement rather than above. Only * promblem is loose flexibility * retval=Start_Window( window, 'BUYER', )

* Get the size of the window to center

winSize=Get_Property(window , "SIZE" )

winWidth=winSize

winHeight=winSize

* Get the coordinates for the new window.

* The window should be first set to not visible

winOffsetFromTop=(sysH - winHeight) / 2

winOffsetFromLeft=(sysW - winWidth) / 2

* Set the size of the window which will also make the form visible

x=Set_Property( window , "SIZE" , winOffsetFromLeft:@FM:winOffsetFromTop:@FM:winWidth:@FM:winHeight)

Utility('CURSOR','A')

return


Anyway seen this behavior. The user can press F8 to set the focus, but this starts a fairly long chain of events.

Thanks,

Blair

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/df2a69278981591a85256f2b0069b628.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1