Topic: PASTE for Image Component

Hi Dmitry,


Came so far to v6... I still love MVD... Please keep up the GOOD WORK.
Isn't it time to add a PASTE button to image component?
I hope you can add this feature very soon as I need it with my current project.


Alternatively, is there a script to add the paste feature to image component that I can use now?

Adam
God... please help me become the person my dog thinks I am.

Re: PASTE for Image Component

Hello.


I added two new methods for Image component.
function PasteBitmapFromClipboard: boolean
function CanPasteBitmapFromClipboard: boolean


Example:

Form1.Image1.PasteBitmapFromClipboard;

Please download latest beta version
https://www.dropbox.com/s/gczabpgu8tyei … a.zip?dl=0

Dmitry.

Re: PASTE for Image Component

Thank you very much Dmitry...........


Truly appreciated..........


I put your example script between last

begin
Form1.Image1.PasteBitmapFromClipboard;
end.

obviously I'm implementing incorrectly as it didn't work.

Adam
God... please help me become the person my dog thinks I am.

Re: PASTE for Image Component

First you should copy image to clipboard,


Use button for that

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
    Form1.Image1.PasteBitmapFromClipboard;
end;
Dmitry.

Re: PASTE for Image Component

Still no go at my end


I get undeclared identifier 'PasteBitmapFromClipboard' on project run

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
     Form1.Image1.PasteBitmapFromClipboard;
end;
Adam
God... please help me become the person my dog thinks I am.

Re: PASTE for Image Component

It's mean, that you don't have the latest version.

Dmitry.

Re: PASTE for Image Component

DriveSoft wrote:

It's mean, that you don't have the latest version.


I have downloaded mvd v6.3 beta from the link provided on post #2


Could it be that you have forgot to upload latest version or given incorrect link by mistake?

Post's attachments

Attachment icon mvdbeta63.png 9.53 kb, 129 downloads since 2020-03-12 

Adam
God... please help me become the person my dog thinks I am.

Re: PASTE for Image Component

I checked it again, it works for me.

Dmitry.

Re: PASTE for Image Component

DriveSoft wrote:

Hello.


I added two new methods for Image component.
function PasteBitmapFromClipboard: boolean
function CanPasteBitmapFromClipboard: boolean


Example:

Form1.Image1.PasteBitmapFromClipboard;

Please download latest beta version
https://www.dropbox.com/s/gczabpgu8tyei … a.zip?dl=0


Hi Dmitry,


Thank you for testing it again.
I'm puzzled. I have no idea why it's not working at my end. I have downloaded and using the version from the link above. Included a sample project and another screen cap of the version I'm using???


Perhaps others may test the above latest beta release with my test project attached and report here to find the issue at my end.


I don't know if it's relevant. I'm using Windows 7.


Project runtime error screen cap:
https://i.postimg.cc/vHh7B9vW/mvd-I63beta-mg-Paste.png

Post's attachments

Attachment icon TestImgPaste.zip 4.21 kb, 245 downloads since 2020-03-12 

Adam
God... please help me become the person my dog thinks I am.

Re: PASTE for Image Component

I added these methods for Image component, not for DBImage.

Dmitry.

11 (edited by AD1408 2020-03-12 15:30:27)

Re: PASTE for Image Component

DriveSoft wrote:

I added these methods for Image component, not for DBImage.


My apologies Dmitry.... I should have made clear that I meant DBImage.
Now, Isn't possible to add same feature to DBImage?
It'd be great adding another icon/button (paste from clipboard) to DBImage component.
Alternatively, can it be with script manually, working with link file properties too? If so, could you please provide a sample

Adam
God... please help me become the person my dog thinks I am.