Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #11767
| 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 18:44 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <pinqq5$knn$1@dont-email.me> (permalink) |
| References | <d8b57156-b369-426e-8b99-b2665daa7efa@googlegroups.com> |
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
>
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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