drag from listbox to an extern program

drag from listbox to an extern program

Postby Otto » Mon Nov 10, 2008 2: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

Image

Code: Select all  Expand view
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
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Postby driessen » Mon Nov 10, 2008 4: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 :
Code: Select all  Expand view
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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Otto » Mon Nov 10, 2008 5: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
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 91 guests