Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #11770

Re: Save ShellWindow size position and reset for opening

From JohnMartens <martens@tennishulp.info>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Save ShellWindow size position and reset for opening
Date 2018-07-18 21:55 +0200
Organization A noiseless patient Spider
Message-ID <pio5uk$ca$1@dont-email.me> (permalink)
References <d8b57156-b369-426e-8b99-b2665daa7efa@googlegroups.com> <pinqq5$knn$1@dont-email.me> <8f509520-49da-494e-aadc-8711f37be172@googlegroups.com> <b8dbc75e-b53b-405b-97ce-8dd21b57f036@googlegroups.com>

Show all headers | View raw


Is this the only place in your app where you write to the Register ?
I'm nog familiar with storing in the register. I store these kind of 
parameters in de data folder of my app

Is that an option to you ?

John

Op 18-7-2018 om 19:49 schreef Ramazan YETİŞİR:
> On Wednesday, 18 July 2018 19:58:19 UTC+3, Ramazan YETİŞİR  wrote:
>> On Wednesday, 18 July 2018 19:44:54 UTC+3, JohnMartens  wrote:
>>> Can you tell till which part it works ?
>>> John
>>>
>>> Op 18-7-2018 om 18:09 schreef Ramazan YETİŞİR:
>>>> Hi programers…
>>>>
>>>> I'm actually using VOSP4 with bBrowser
>>>>
>>>> I want my programs shellwindow position and reset in the opening.
>>>> I found the belove  codes in Google.clipper-visual-objects but could not do it work allready. Please help.
>>>>
>>>>
>>>> SysObject(self) in the init method of the shellwindow
>>>>
>>>>
>>>>
>>>> METHOD SaveScreenSizePos() CLASS SShellWindow
>>>>
>>>>      LOCAL ScrLeft   as LONG
>>>>      LOCAL ScrTop    as LONG
>>>>      LOCAL ScrWidth  as LONG
>>>>      LOCAL ScrHeight as LONG
>>>>
>>>>      LOCAL lpRect is _winRECT
>>>>      LOCAL wTop, wLeft as int
>>>>      
>>>>      LOCAL sTotStr as STRING
>>>>      LOCAL oASReg as Class_HKLM
>>>>           
>>>>      oASReg := Class_HKLM{}
>>>>      oASReg:Working_Subkey := "Software\AgriSoft_Int\OKPSetings"
>>>>      
>>>>      SysObject():PutSet(ScrWidth, NTrim(SysObject():Size:Width))
>>>>      SysObject():PutSet(ScrHeight, NTrim(SysObject():Size:Height))
>>>>       
>>>>      GetWindowRect( SysObject():Handle(), @lpRect )
>>>>      wTop  := Max( lpRect.top, 0 )
>>>>      wLeft := Max( lpRect.Left,0 )
>>>>       
>>>>      SysObject():PutSet(ScrTop,  NTrim(wTop))
>>>>      SysObject():PutSet(ScrLeft, NTrim(wLeft))
>>>>      
>>>>      sTotStr := Str( ScrLeft, -1, 0 ) + "," + Str( ScrTop, -1, 0 ) + "," + Str( ScrWidth, -1, 0 ) + "," + Str( ScrHeight, -1, 0 )
>>>>      oASReg:WriteString( "", "OKScrPos", sTotStr )
>>>>
>>>> RETURN nil
>>>>
>>>> for retrieve I use the registry
>>>>
>>>> FUNCTION ReSetShellPosition( oMain )
>>>>      
>>>>      LOCAL ScrLeft   as int
>>>>      LOCAL ScrTop    as int
>>>>      LOCAL ScrWidth  as int
>>>>      LOCAL ScrHeight as int
>>>>      LOCAL sTotStr   as STRING
>>>>      LOCAL oASReg    as Class_HKLM
>>>>      
>>>>      oASReg := Class_HKLM{}
>>>>      oASReg:Working_Subkey := "Software\AgriSoft_Int\OKPSetings"
>>>>      sTotStr := oASReg:GetString( "", "OKScrPos" )
>>>>       
>>>>      IF !Empty( sTotStr )
>>>>         ScrLeft := int( _cast, SubStr( sTotStr, 1, At(",", sTotStr) - 1 ) )
>>>>         sTotStr := SubStr( sTotStr, At(",", sTotStr) + 1 )
>>>>      
>>>>         ScrTop := int( _cast, SubStr( sTotStr, 1, At(",", sTotStr) - 1 ))
>>>>         sTotStr := SubStr(sTotStr,  At( ",", sTotStr) + 1 )
>>>>    
>>>>         ScrWidth := int( _cast, SubStr( sTotStr, 1, At(",", sTotStr) - 1 ))
>>>>         sTotStr := SubStr( sTotStr, At(",", sTotStr) + 1 )
>>>>      
>>>>         ScrHeight := int( _cast, sTotStr )
>>>>        
>>>>         SetWindowPos( oMain:Handle(), null_ptr, Val(oMain:GetSet(ScrLeft)), Val(oMain:GetSet(ScrTop)),;
>>>>                       Val(oMain:GetSet(ScrWidth)), Val(oMain:GetSet(ScrHeight)), SWP_SHOWWINDOW )
>>>>      ENDIF
>>>>      
>>>> RETURN nil
>>>>
>>>> any idea is valuable for me,
>>>> thanks many
>>>>
>>
>>
> John;
> in line SysObject():PutSet(ScrWidth, NTrim(SysObject():Size:Width))    PutSet method is not working
> 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Save ShellWindow size position and reset for opening Ramazan YETİŞİR <ryetisir@gmail.com> - 2018-07-18 09:09 -0700
  Re: Save ShellWindow size position and reset for opening JohnMartens <martens@tennishulp.info> - 2018-07-18 18:44 +0200
    Re: Save ShellWindow size position and reset for opening Ramazan YETİŞİR <ryetisir@gmail.com> - 2018-07-18 09:58 -0700
      Re: Save ShellWindow size position and reset for opening Ramazan YETİŞİR <ryetisir@gmail.com> - 2018-07-18 10:49 -0700
        Re: Save ShellWindow size position and reset for opening JohnMartens <martens@tennishulp.info> - 2018-07-18 21:55 +0200
          Re: Save ShellWindow size position and reset for opening Ramazan <ryetisir@gmail.com> - 2018-07-18 20:09 -0700
  Re: Save ShellWindow size position and reset for opening Leo_Bond <l.bond@bk.ru> - 2018-07-18 14:25 -0700
    Re: Save ShellWindow size position and reset for opening Ramazan <ryetisir@gmail.com> - 2018-07-18 20:14 -0700
      Re: Save ShellWindow size position and reset for opening James Martin <james@northwoodlumber.com> - 2018-07-19 10:37 -0400
      Re: Save ShellWindow size position and reset for opening JohnMartens <martens@tennishulp.info> - 2018-07-19 17:01 +0200

csiph-web