Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Window contents while dragging / resizing
Message
De
07/02/2014 05:10:34
 
 
À
07/02/2014 03:31:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01593391
Message ID:
01593606
Vues:
40
Yup, that was the error in the code :)

Thanks.

>calling nresult byRef might get better results ?
>
>>>Google search: window contents while dragging windows API
>>>
>>>How To Use APIs to Check, Enable, or Disable Full Window Drag
>>>http://support.microsoft.com/kb/185637
>>
>>Hi Anatoliy,
>>
>>Thanks for the link. I have managed to program this DLL call as below but a part of it does not seem to work. The code to inquire whether the Full Windows Drag is on or off does not work - it always returns that it is off - see point 1. The code that actually turns the feature on or off DOES work correctly and I am able to use this to do what I need - see point 2. So I have a solution in any case, thanks.
>>
>>
>>For anyone who is interested this is the code I tested:
>>
>>
>>1) The code that checks whether Full Windows Drag is on or off always returns that it is off. The call to the DLL is successful but the result is always zero which implies that it is off (even if it is not). Probably there is a mistake in my code.
>>
>>
>>
>>CLEAR
>>
>>DECLARE INTEGER SystemParametersInfo IN USER32.DLL ;
>>  INTEGER uAction   , ;
>>  INTEGER uParam    , ;
>>  INTEGER @lpvParam , ;
>>  INTEGER fuWinIni
>>
>>#DEFINE SPI_GETDRAGFULLWINDOWS 38
>>#DEFINE SPI_SETDRAGFULLWINDOWS 37
>>#DEFINE SPIF_SENDWININICHANGE 2
>>
>>NRESULT = 0
>>
>>IF SYSTEMPARAMETERSINFO( SPI_GETDRAGFULLWINDOWS , 0 , NRESULT , 0 ) <> 0
>>
>>  ? "Call succeeded. NRESULT = " , NRESULT 
>>  
>>  ? "Full Windows Drag is " + IIF( NRESULT = 0 , "OFF" , "ON" )
>>
>>ELSE
>>
>>  ? "Call failed."
>>
>>ENDIF
>>
>>
>>.
>>
>>
>>2) The code to switch the Full Windows Drag setting on or off (this works OK):
>>
>>
>>
>>CLEAR
>>
>>DECLARE INTEGER SystemParametersInfo IN USER32.DLL ;
>>  INTEGER uAction   , ;
>>  INTEGER uParam    , ;
>>  INTEGER @lpvParam , ;
>>  INTEGER fuWinIni
>>
>>#DEFINE SPI_GETDRAGFULLWINDOWS 38
>>#DEFINE SPI_SETDRAGFULLWINDOWS 37
>>#DEFINE SPIF_SENDWININICHANGE 2
>>
>>IF .T.
>>
>>  * TURN FULL WINDOW DRAG OFF
>>
>>  ? "Call to turn drag OFF returned = " , SYSTEMPARAMETERSINFO( SPI_SETDRAGFULLWINDOWS , 0 , 0 , SPIF_SENDWININICHANGE )
>>
>>ELSE
>>
>>  * TURN FULL WINDOW DRAG ON 
>>
>>   ? "Call to turn drag ON returned = " , SYSTEMPARAMETERSINFO( SPI_SETDRAGFULLWINDOWS , 1 , 0 , SPIF_SENDWININICHANGE )
>>
>>ENDIF
>>
>>
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform