FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour drag from listbox to an extern program
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
drag from listbox to an extern program
Posted: Mon Nov 10, 2008 02:32 PM
I have a little VB6 program which I would like to re-write in FIVEWIN.
There is a listbox from where I can drag items to other extern programs like WORD for e.g. .

I only have to use OLEDropMode = manual in VB6.

Does someone know how to do this with FW?
Thanks in advance
Otto



Begin VB.ListBox List1 
      BeginProperty Font 
         Name            =   "Courier"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   450
      Left            =   0
      OLEDragMode     =   1  'Automatisch
      OLEDropMode     =   1  'Manuell
      TabIndex        =   1
      Top             =   120
      Width           =   3015
   End
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
drag from listbox to an extern program
Posted: Mon Nov 10, 2008 04:07 PM
Otto,

I have a simular function in my application.

What do I do ?

1. I have defined a macro in Word which paste the clipboard into the document. So I have to put the cursor on the position where I want the paste to be happening.

2. In my application, I doubleclick on the selected item in the listbox. In the action of the doubleclick, I copy the item to the clipboard after which the macro is executed which pastes the clipboard into my document.

Source :
OpenClipBoard()
EmptyClipBoard()
SetClipBoardData(1,ALLTRIM(DBFVELD->VELD_AFK))
CloseClipBoard()
...
oWord:Run("JUD_PASTE")

The data of the field are pasted into the document.

It works very well.

Good luck.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
drag from listbox to an extern program
Posted: Mon Nov 10, 2008 05:00 PM

Hello Michael,

Thank you.
But I would like a solution without macros.
I don’t have good experiences with macros.
Please see my response to OPEN XML, too.
Regards,
Otto

Continue the discussion