XIMAGE

Post Reply
User avatar
Marcelo Roggeri
Posts: 342
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina
Contact:

XIMAGE

Post by Marcelo Roggeri »

Hola buenas tardes/noche a toda la comunidad FW estoy con el siguiente problema, necesito pegar (paste) en el control XImage no se si se puede una imagen copiada al portapapel (Clipboard). Lo tengo hecho pero buscando la imagen en disco y como hoy es muy cómodo para el usuario copiar y pegar quería saber si existe esa opción?
Desde ya muchas gracias y quedo a la espera.
Saludos desde Argentina.
Marcelo
FWH - Harbour - BCC7 - PellesC
User avatar
Antonio Linares
Site Admin
Posts: 42513
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: XIMAGE

Post by Antonio Linares »

Estimado Marcelo,

La Clase TXImage proporciona el método Paste( lCheck ) que permite copiar una imagen desde el portapapeles

Además tienes el método PopupMenu( nRow, nCol, nFlags ) que te muestra un popup con la opción Paste

Espero que esto te pueda ser de ayuda
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: XIMAGE

Post by nageswaragunupudi »

Yes.
Set

Code: Select all | Expand

oImage:lCanPaste := .t.
Later you can copy any image from any where and then in the RightClick menu select "Paste"
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: XIMAGE

Post by nageswaragunupudi »

Small sample

Code: Select all | Expand

#include "fivewin.ch"

function Main()

   local oDlg, oImage

   DEFINE DIALOG oDlg SIZE 400,400 PIXEL TRUEPIXEL RESIZABLE ;
   TITLE "XIMAGE"

   @ 0,0 XIMAGE oImage SOURCE "" SIZE 0,0 OF oDlg
   oImage:lCanPaste  := .t.

   ACTIVATE DIALOG oDlg CENTERED

return nil
You can copy any image from the disk or other application or from web and paste.
You can also drag and drop any image file.
You can set external drop to .T. and then you can drag and drop any image from Web even

Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
Marcelo Roggeri
Posts: 342
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina
Contact:

Re: XIMAGE

Post by Marcelo Roggeri »

Buenos dias Mr. Rao si efectivamente me anduvo logre hacerlo guardar la imagen tambien.
Gracias y saludos
Marcelo
Last edited by Marcelo Roggeri on Tue Mar 05, 2024 1:09 pm, edited 1 time in total.
FWH - Harbour - BCC7 - PellesC
User avatar
Marcelo Roggeri
Posts: 342
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina
Contact:

Re: XIMAGE

Post by Marcelo Roggeri »

Gracias Antonio si si ahi logre hacerlo muchas gracias por la información.
Saludos
Marcelo
FWH - Harbour - BCC7 - PellesC
User avatar
Marcelo Roggeri
Posts: 342
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina
Contact:

Re: XIMAGE

Post by Marcelo Roggeri »

Otra consulta con respecto a la imagen, cuando selecciono un archivo de imagen del disco, la imagen se guarda bien en la tabla, pero al momento de pegar la imagen me guarda la imagen en blanco.
Me esta faltando algo?

agregue esto antes de guardar la imagen
cArchivo:=curdrive()+":\"+curdir()+"\imagenes\foto.jpg"
oSelf:oImg:Save(.F.,cArchivo, 100)
lo guarda pero me da un alert de here P
y es molesto para el usuario final
Cualquier sugerencia les agradezco
FWH - Harbour - BCC7 - PellesC
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: XIMAGE

Post by nageswaragunupudi »

1) What is your FWH version?
2) What is the alert you are getting?
Regards

G. N. Rao.
Hyderabad, India
User avatar
Marcelo Roggeri
Posts: 342
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina
Contact:

Re: XIMAGE

Post by Marcelo Roggeri »

Mr. RAO
Mi version corresponde a July 2021 to November 2021
y el alert ahi veo si lo pongo en una imagen y se la muestro

Image
FWH - Harbour - BCC7 - PellesC
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: XIMAGE

Post by nageswaragunupudi »

We regret the inconvenience.
While releasing 2111 we forgot to remove a trace we used for debugging.

Please open \fwh\source\function\imgtxtio.prg.
In the function FW_SaveImage() you please locate this code in Line No:2304

Code: Select all | Expand

? "here",valtype( uimage ), nwidth,nheight
Please delete this line and include the modified "imgtxtio.prg" in you application.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Marcelo Roggeri
Posts: 342
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina
Contact:

Re: XIMAGE

Post by Marcelo Roggeri »

Mr. RAO
Hecho ya lo hice y funciona ok.
Gracias Mr. RAO
Otra cosita en esta misma consulta, si es posible.
Las imagenes que guardo en la base de datos mysql las quiero leer desde php pero solo veo codigo binario.
Alguien tendra la forma de leerlo?
Gracias de antemano
Saludos
Marcelo
FWH - Harbour - BCC7 - PellesC
Post Reply