FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Windows 10: Lock Screen Images
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Windows 10: Lock Screen Images
Posted: Thu Apr 30, 2020 02:56 PM
In case you are using Windows 10, we suggest trying out this small program on your Windows 10 PC for diversion:

fwh\samples\lockscrn.prg:
Code (fw): Select all Collapse
/*
* Program to view and save Windows 10 LockScreen Images
*
*/

#include "fivewin.ch"

//----------------------------------------------------------------------------//

function Main()

   local cPath := GETENV( "userprofile" ) + "\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets\"
   local aImages  := {}
   local oWnd, oBar, oImage, cSave, nImages, n := 1

   AEval( DIRECTORY( cPath + "*.*", "H" ), { |a| If( a[ 2 ] < 200000,, ( a[ 1 ] := cPath + a[ 1 ], AAdd( aImages, a ) ) ) } )
   ASort( aImages,,,{ |x,y| x[ 2 ] > y[ 2 ] } )
   nImages  := Len( aImages )

   DEFINE WINDOW oWnd STYLE WS_POPUP + WS_MAXIMIZE

   DEFINE BUTTONBAR oBar SIZE 32,32 LEFT
   oBar:SetColor( CLR_BLACK, CLR_BLACK )

   DEFINE BUTTON RESOURCE 0xE112 OF oBar CENTER ACTION ( If( --n < 1, n := nImages, ), oWnd:Update() )
   DEFINE BUTTON RESOURCE 0xE111 OF oBar CENTER ACTION ( n := ( n % nImages ) + 1, oWnd:Update() )
   DEFINE BUTTON RESOURCE 0xE105 OF oBar CENTER ACTION ( ;
      If( !Empty( cSave := cGetFile( "Jpg file(*.jpg)|*.jpg|", ;
      "Select File to Save", CurDir(), .t. ) ), ;
      HB_MEMOWRIT( cFileSetExt( cSave, "jpg" ), MEMOREAD( aImages[ n, 1 ] ) ), MsgInfo( "Not selected" ) ) )
   DEFINE BUTTON RESOURCE FWBitmap( "exit2" ) OF oBar CENTER ACTION oWnd:End()

   oBar:Float()

   @ 0,0 XIMAGE oImage SOURCE MEMOREAD( aImages[ n, 1 ] ) SIZE 0, 0 OF oWnd NOBORDER UPDATE
   oImage:SetColor( CLR_WHITE, CLR_BLACK )
   oImage:bLClicked := { || n := ( n % nImages ) + 1, oWnd:Update() }
   oImage:bRClicked := { || If( MsgYesNo( "Exit program?" ), oWnd:End(), ) }

   oWnd:oClient := oImage

   ACTIVATE WINDOW oWnd MAXIMIZED

return nil

//----------------------------------------------------------------------------//


We would be glad to have your comments.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Windows 10: Lock Screen Images
Posted: Thu Apr 30, 2020 03:09 PM
Hi Mr. Rao,

with buildh32 this gives an error.


Code (fw): Select all Collapse
Application
===========
   Path and name: C:\fwh\samples\testrao.exe (32 bits)
   Size: 4,219,392 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 20.03
   C compiler version: Microsoft Visual C++ 19.20.27508 (32-bit)
   Windows version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 0 secs 
   Error occurred at: 04/30/20, 18:07:11
   Error description: Error BASE/1132  Bound error: array access
   Args:
     [   1] = A   { ... } length: 0
     [   2] = N   1

Stack Calls
===========
   Called from: testrao.prg => (b)MAIN( 37 )
   Called from: .\source\classes\XIMAGE.PRG => TXIMAGE:DEFAULT( 216 )
   Called from: .\source\classes\XIMAGE.PRG => TXIMAGE:NEW( 161 )
   Called from: testrao.prg => MAIN( 37 )

System
======
   CPU type: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz 2208 Mhz
   Hardware memory: 16268 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Windows total applications running: 3
      1 , C:\fwh\samples\testrao.exe                                                                          
      2 G, C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.18362.778_none_5f5ee11d821bf28 
      3 LOGI_RAWINPUT_WND,                                                                                                     

Variables in use
================
   Procedure     Type   Value
   ==========================
   (b)MAIN
     Param   1:    O    Class: ERROR
   TXIMAGE:DEFAULT
     Local   1:    S    
     Local   2:    U    
     Local   3:    A    Len:    0
     Local   4:    N    1
     Local   5:    U    
     Local   6:    U    
   TXIMAGE:NEW
     Local   1:    O    Class: TXIMAGE
     Local   2:    S    
     Local   3:    O    Class: TXIMAGE
   MAIN
     Param   1:    N    0
     Param   2:    N    0
     Param   3:    N    100
     Param   4:    N    100
     Param   5:    B    {|| ... }
     Param   6:    O    Class: TWINDOW
     Param   7:    L    .T.
     Param   8:    L    .T.

Linked RDDs
===========
   DBF
   DBFFPT
   DBFBLOB
   DBFNTX

DataBases in use
================

Classes in use:
===============
     1 ERROR
     2 HBCLASS
     3 HBOBJECT
     4 TWINDOW
     5 TBRUSH
     6 TFONT
     7 TREG32
     8 TCONTROL
     9 TBAR
    10 TRECT
    11 TBTNBMP
    12 TMENU
    13 TMENUITEM
    14 TXIMAGE
    15 TCLIPBOARD
    16 TSTRUCT

Memory Analysis
===============
      583 Static variables

   Dynamic memory consume:
      Actual  Value:     917504 bytes
      Highest Value:     917504 bytes
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Windows 10: Lock Screen Images
Posted: Thu Apr 30, 2020 04:01 PM

Thanks. We'll check this.

Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Windows 10: Lock Screen Images
Posted: Thu Apr 30, 2020 04:57 PM
NO errors

the results on image change



Full size on desktop - mouseclick
I noticed a random size-change between full and partly-screensize :-)



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Windows 10: Lock Screen Images
Posted: Thu Apr 30, 2020 08:06 PM

why here the test make error ?

Called from: test.prg => (b)MAIN( 37 )
Called from: .\source\classes\XIMAGE.PRG => TXIMAGE:DEFAULT( 216 )
Called from: .\source\classes\XIMAGE.PRG => TXIMAGE:NEW( 161 )
Called from: test.prg => MAIN( 37 )

sorry on w7 but on win 10 is ok

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Windows 10: Lock Screen Images
Posted: Thu Apr 30, 2020 08:12 PM
Horizon wrote:Hi Mr. Rao,

with buildh32 this gives an error.


Code (fw): Select all Collapse
Application
===========
   Path and name: C:\fwh\samples\testrao.exe (32 bits)
   Size: 4,219,392 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 20.03
   C compiler version: Microsoft Visual C++ 19.20.27508 (32-bit)
   Windows version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 0 secs 
   Error occurred at: 04/30/20, 18:07:11
   Error description: Error BASE/1132  Bound error: array access
   Args:
     [   1] = A   { ... } length: 0
     [   2] = N   1

Stack Calls
===========
   Called from: testrao.prg => (b)MAIN( 37 )
   Called from: .\source\classes\XIMAGE.PRG => TXIMAGE:DEFAULT( 216 )
   Called from: .\source\classes\XIMAGE.PRG => TXIMAGE:NEW( 161 )
   Called from: testrao.prg => MAIN( 37 )

System
======
   CPU type: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz 2208 Mhz
   Hardware memory: 16268 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Windows total applications running: 3
      1 , C:\fwh\samples\testrao.exe                                                                          
      2 G, C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.18362.778_none_5f5ee11d821bf28 
      3 LOGI_RAWINPUT_WND,                                                                                                     

Variables in use
================
   Procedure     Type   Value
   ==========================
   (b)MAIN
     Param   1:    O    Class: ERROR
   TXIMAGE:DEFAULT
     Local   1:    S    
     Local   2:    U    
     Local   3:    A    Len:    0
     Local   4:    N    1
     Local   5:    U    
     Local   6:    U    
   TXIMAGE:NEW
     Local   1:    O    Class: TXIMAGE
     Local   2:    S    
     Local   3:    O    Class: TXIMAGE
   MAIN
     Param   1:    N    0
     Param   2:    N    0
     Param   3:    N    100
     Param   4:    N    100
     Param   5:    B    {|| ... }
     Param   6:    O    Class: TWINDOW
     Param   7:    L    .T.
     Param   8:    L    .T.

Linked RDDs
===========
   DBF
   DBFFPT
   DBFBLOB
   DBFNTX

DataBases in use
================

Classes in use:
===============
     1 ERROR
     2 HBCLASS
     3 HBOBJECT
     4 TWINDOW
     5 TBRUSH
     6 TFONT
     7 TREG32
     8 TCONTROL
     9 TBAR
    10 TRECT
    11 TBTNBMP
    12 TMENU
    13 TMENUITEM
    14 TXIMAGE
    15 TCLIPBOARD
    16 TSTRUCT

Memory Analysis
===============
      583 Static variables

   Dynamic memory consume:
      Actual  Value:     917504 bytes
      Highest Value:     917504 bytes


you're using Windows Seven
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Windows 10: Lock Screen Images
Posted: Thu Apr 30, 2020 09:25 PM
Silvio.Falconi wrote:
Horizon wrote:Hi Mr. Rao,

with buildh32 this gives an error.


Code (fw): Select all Collapse
Application
===========
   Path and name: C:\fwh\samples\testrao.exe (32 bits)
   Size: 4,219,392 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 20.03
   C compiler version: Microsoft Visual C++ 19.20.27508 (32-bit)
   Windows version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 0 secs 
   Error occurred at: 04/30/20, 18:07:11
   Error description: Error BASE/1132  Bound error: array access
   Args:
     [   1] = A   { ... } length: 0
     [   2] = N   1

Stack Calls
===========
   Called from: testrao.prg => (b)MAIN( 37 )
   Called from: .\source\classes\XIMAGE.PRG => TXIMAGE:DEFAULT( 216 )
   Called from: .\source\classes\XIMAGE.PRG => TXIMAGE:NEW( 161 )
   Called from: testrao.prg => MAIN( 37 )

System
======
   CPU type: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz 2208 Mhz
   Hardware memory: 16268 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Windows total applications running: 3
      1 , C:\fwh\samples\testrao.exe                                                                          
      2 G, C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.18362.778_none_5f5ee11d821bf28 
      3 LOGI_RAWINPUT_WND,                                                                                                     

Variables in use
================
   Procedure     Type   Value
   ==========================
   (b)MAIN
     Param   1:    O    Class: ERROR
   TXIMAGE:DEFAULT
     Local   1:    S    
     Local   2:    U    
     Local   3:    A    Len:    0
     Local   4:    N    1
     Local   5:    U    
     Local   6:    U    
   TXIMAGE:NEW
     Local   1:    O    Class: TXIMAGE
     Local   2:    S    
     Local   3:    O    Class: TXIMAGE
   MAIN
     Param   1:    N    0
     Param   2:    N    0
     Param   3:    N    100
     Param   4:    N    100
     Param   5:    B    {|| ... }
     Param   6:    O    Class: TWINDOW
     Param   7:    L    .T.
     Param   8:    L    .T.

Linked RDDs
===========
   DBF
   DBFFPT
   DBFBLOB
   DBFNTX

DataBases in use
================

Classes in use:
===============
     1 ERROR
     2 HBCLASS
     3 HBOBJECT
     4 TWINDOW
     5 TBRUSH
     6 TFONT
     7 TREG32
     8 TCONTROL
     9 TBAR
    10 TRECT
    11 TBTNBMP
    12 TMENU
    13 TMENUITEM
    14 TXIMAGE
    15 TCLIPBOARD
    16 TSTRUCT

Memory Analysis
===============
      583 Static variables

   Dynamic memory consume:
      Actual  Value:     917504 bytes
      Highest Value:     917504 bytes


you're using Windows Seven


No, W10 build 1909 - 18363.778
Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Windows 10: Lock Screen Images
Posted: Fri May 01, 2020 07:48 AM

Hi RAO,

Now is work for win10 1909 18363.815

Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Windows 10: Lock Screen Images
Posted: Fri May 01, 2020 08:02 AM

Mr. Hakan

I modified the program.
Can you copy the modified program and try again?

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Windows 10: Lock Screen Images
Posted: Fri May 01, 2020 08:18 AM
Horizon wrote:
Silvio.Falconi wrote:
Horizon wrote:Hi Mr. Rao,

with buildh32 this gives an error.


Code (fw): Select all Collapse
Application
===========
   Path and name: C:\fwh\samples\testrao.exe (32 bits)
   Size: 4,219,392 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 20.03
   C compiler version: Microsoft Visual C++ 19.20.27508 (32-bit)
   Windows version: 6.2, Build 9200 

   Time from start: 0 hours 0 mins 0 secs 
   Error occurred at: 04/30/20, 18:07:11
   Error description: Error BASE/1132  Bound error: array access
   Args:
     [   1] = A   { ... } length: 0
     [   2] = N   1

Stack Calls
===========
   Called from: testrao.prg => (b)MAIN( 37 )
   Called from: .\source\classes\XIMAGE.PRG => TXIMAGE:DEFAULT( 216 )
   Called from: .\source\classes\XIMAGE.PRG => TXIMAGE:NEW( 161 )
   Called from: testrao.prg => MAIN( 37 )

System
======
   CPU type: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz 2208 Mhz
   Hardware memory: 16268 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Windows total applications running: 3
      1 , C:\fwh\samples\testrao.exe                                                                          
      2 G, C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.18362.778_none_5f5ee11d821bf28 
      3 LOGI_RAWINPUT_WND,                                                                                                     

Variables in use
================
   Procedure     Type   Value
   ==========================
   (b)MAIN
     Param   1:    O    Class: ERROR
   TXIMAGE:DEFAULT
     Local   1:    S    
     Local   2:    U    
     Local   3:    A    Len:    0
     Local   4:    N    1
     Local   5:    U    
     Local   6:    U    
   TXIMAGE:NEW
     Local   1:    O    Class: TXIMAGE
     Local   2:    S    
     Local   3:    O    Class: TXIMAGE
   MAIN
     Param   1:    N    0
     Param   2:    N    0
     Param   3:    N    100
     Param   4:    N    100
     Param   5:    B    {|| ... }
     Param   6:    O    Class: TWINDOW
     Param   7:    L    .T.
     Param   8:    L    .T.

Linked RDDs
===========
   DBF
   DBFFPT
   DBFBLOB
   DBFNTX

DataBases in use
================

Classes in use:
===============
     1 ERROR
     2 HBCLASS
     3 HBOBJECT
     4 TWINDOW
     5 TBRUSH
     6 TFONT
     7 TREG32
     8 TCONTROL
     9 TBAR
    10 TRECT
    11 TBTNBMP
    12 TMENU
    13 TMENUITEM
    14 TXIMAGE
    15 TCLIPBOARD
    16 TSTRUCT

Memory Analysis
===============
      583 Static variables

   Dynamic memory consume:
      Actual  Value:     917504 bytes
      Highest Value:     917504 bytes


you're using Windows Seven


No, W10 build 1909 - 18363.778


No Mr. The error log file reporter the

Windows version: 6.2, Build 9200

It Is Windows Seven edition
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 85
Joined: Mon Apr 18, 2011 02:32 AM
Re: Windows 10: Lock Screen Images
Posted: Fri May 01, 2020 03:29 PM

Mr. Rao

Very nice.
but restore image does not work in MDI mode

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Windows 10: Lock Screen Images
Posted: Fri May 01, 2020 09:01 PM

someone explain me what it is ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion