Windows 10: Lock Screen Images

Windows 10: Lock Screen Images

Postby nageswaragunupudi » Thu Apr 30, 2020 2: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: Select all  Expand view
/*
* 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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Windows 10: Lock Screen Images

Postby Horizon » Thu Apr 30, 2020 3:09 pm

Hi Mr. Rao,

with buildh32 this gives an error.


Code: Select all  Expand view
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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Windows 10: Lock Screen Images

Postby nageswaragunupudi » Thu Apr 30, 2020 4:01 pm

Thanks. We'll check this.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Windows 10: Lock Screen Images

Postby ukoenig » Thu Apr 30, 2020 4:57 pm

NO errors

the results on image change

Image

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

Image

regards
Uwe :D
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Windows 10: Lock Screen Images

Postby Silvio.Falconi » Thu Apr 30, 2020 8: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
Last edited by Silvio.Falconi on Thu Apr 30, 2020 8:12 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: Windows 10: Lock Screen Images

Postby Silvio.Falconi » Thu Apr 30, 2020 8:12 pm

Horizon wrote:Hi Mr. Rao,

with buildh32 this gives an error.


Code: Select all  Expand view
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: Windows 10: Lock Screen Images

Postby Horizon » Thu Apr 30, 2020 9:25 pm

Silvio.Falconi wrote:
Horizon wrote:Hi Mr. Rao,

with buildh32 this gives an error.


Code: Select all  Expand view
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.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Windows 10: Lock Screen Images

Postby richard-service » Fri May 01, 2020 7:48 am

Hi RAO,

Now is work for win10 1909 18363.815
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: Windows 10: Lock Screen Images

Postby nageswaragunupudi » Fri May 01, 2020 8:02 am

Mr. Hakan

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Windows 10: Lock Screen Images

Postby Silvio.Falconi » Fri May 01, 2020 8:18 am

Horizon wrote:
Silvio.Falconi wrote:
Horizon wrote:Hi Mr. Rao,

with buildh32 this gives an error.


Code: Select all  Expand view
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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: Windows 10: Lock Screen Images

Postby Mulyadi » Fri May 01, 2020 3:29 pm

Mr. Rao

Very nice.
but restore image does not work in MDI mode
User avatar
Mulyadi
 
Posts: 82
Joined: Mon Apr 18, 2011 2:32 am

Re: Windows 10: Lock Screen Images

Postby Silvio.Falconi » Fri May 01, 2020 9:01 pm

someone explain me what it is ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 38 guests