Drag from Fivewin to Word

Drag from Fivewin to Word

Postby Otto » Fri May 06, 2022 5:09 pm

Hello friends,

I still have a very old VB6 program in use.
I would have to extend the selection fields now.

Does anyone know if it is possible to copy from FIVEWIN to an external program with drag and drop.
I want to remember that it was not possible in 2009.
Maybe there are possibilities now.
With best thanks in advance,
Otto
Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6312
Joined: Fri Oct 07, 2005 7:07 pm

Re: Drag from Fivewin to Word

Postby Otto » Sat May 07, 2022 12:40 pm

Hello friends,
I have solved my problem for now.
I got my 20+ year old development computer out of the attic and put it to work.

Best regards,
Otto


Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6312
Joined: Fri Oct 07, 2005 7:07 pm

Re: Drag from Fivewin to Word

Postby Jimmy » Wed May 18, 2022 1:11 am

hi Otto,

> Does anyone know if it is possible to copy from FIVEWIN to an external program with drag and drop.

a "normal" App can use "DragAcceptFiles" to receive
Code: Select all  Expand view
CF_TEXT
CF_BITMAP
from Explorer

Code: Select all  Expand view
   // accept Files drag from Explorer
   DragAcceptFiles( hForm, .t. ) 
so you can try if your external VB-App use that Way as "Sender"

you App as "Receiver" need these Function ( using HMG Syntax for 64 Bit )
Code: Select all  Expand view
HB_FUNC( DRAGACCEPTFILES )
{
   DragAcceptFiles( ( HWND ) HMG_parnl( 1 ), hb_parl( 2 ) );
}

HB_FUNC( DRAGQUERYFILES )
{
   HDROP hDrop  = ( HDROP ) HMG_parnl( 1 );
   int   iFiles = DragQueryFile( hDrop, 0xFFFFFFFF, 0, 0 );
   int   i;
   TCHAR bBuffer[ 250 ];

   hb_reta( iFiles );

   for( i = 0; i < iFiles; i++ )
   {
      DragQueryFile( hDrop, i, ( TCHAR * ) bBuffer, 249 );
      HMG_storvc( ( TCHAR * ) bBuffer, -1, i + 1 );
   }
}

HB_FUNC( DRAGFINISH )
{
   DragFinish( ( HDROP ) HMG_parnl( 1 ) );
}

HB_FUNC( DRAGQUERYPOINT ) // ( hDrop, aPoint ) --> lInClient
{
   POINT pt;
   hb_retl( DragQueryPoint( ( HDROP ) HMG_parnl( 1 ), &pt ) );
   hb_storvni( pt.x, 2, 1 );
   hb_storvni( pt.y, 2, 2 );
}


other Way is OLE DragDrop ... but i have not seen any xBase-App which can use OLE DragDrop

p.s. why you work with "external" VB-App ... you can DragDrop within a xBase App
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Drag from Fivewin to Word

Postby Otto » Wed May 18, 2022 3:00 pm

Dear Jimmy,
please see my GIF.
We use own placeholders inside word.
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=13495&p=69442&hilit=mailmerge&sid=cc5c77a4adb752f3699a4da69ffb04f4&sid=cc5c77a4adb752f3699a4da69ffb04f4#p69442
We rename DOCX to zip and then replace our own placeholders for mail merge.
Thank you for your posts and help.
"Platzhalter Brief" is a VB6 program.
Best regards,
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6312
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 46 guests