Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Copy and Paste JPEG into PowerBuilder

1,325 views
Skip to first unread message

Bob

unread,
Jun 25, 2004, 9:44:21 PM6/25/04
to
What is the best way to Copy a jpeg from the clipboard to a powerbuilder
control?


Bob

unread,
Jun 26, 2004, 3:42:18 PM6/26/04
to
In case I was vague, I want to paste a JPEG image into my application
written in PowerBuilder.

"Bob" <b...@nospam.com> wrote in message news:40dcd589$1@forums-2-dub...

Roy Kiesler [TeamSybase]

unread,
Jun 27, 2004, 5:05:49 PM6/27/04
to

You are still vague -- what kind of control are you trying to paste
into? What are you trying to do with the pasted image? Just display it?
Save it to a database? etc...

--
Roy

bede

unread,
Jun 28, 2004, 6:11:05 AM6/28/04
to
<controlname>.Paste()

"Bob" <b...@nospam.com> wrote in message news:40dcd589$1@forums-2-dub...

Bob

unread,
Jun 28, 2004, 6:39:29 PM6/28/04
to
A user will copy an image into the clipboard, say from Internet Explorer.
The user now needs to paste the image into any powerbuilder control that I
can receive a bitmap or jpeg file from the clipboard. I noticed that the
image controls have no paste function.

I could care less what control I use, just as long as the end user can see
the image. Over the weekend, I wrote a DLL that can save the clipboard to
disk then I can use SetPicture to read in the image to PowerBuilder. Then I
can write dynamic SQL to insert the blob into the database. The DLL
supports writing the file as a bitmap and jpeg.

I would have liked to use native PowerBuilder to paste directly into any of
it's image controls.

I am just suprised that Team Sybase never cut and pasted before.

"Roy Kiesler [TeamSybase]" <roy.k...@teamsybase.com> wrote in message
news:40df36ad$2@forums-1-dub...

Bob

unread,
Jun 28, 2004, 6:41:52 PM6/28/04
to
Image controls don't have the Paste function.

"bede" <bede...@m.sofico.be> wrote in message news:40dfef54@forums-2-dub...

Roy Kiesler [TeamSybase]

unread,
Jun 28, 2004, 7:39:29 PM6/28/04
to
Well, on behalf of TeamSybase, I am humbled...

I'm glad to see that you were resourceful enough to solve this -- it
would be great if you could share your code on CodeXchange so others can
benefit from it as well.

--
Roy

bede

unread,
Jun 29, 2004, 7:50:07 AM6/29/04
to
i believe richtextcontrol allows pasting bitmaps

"Bob" <b...@nospam.com> wrote in message news:40e09eb0$1@forums-1-dub...

Bruce Armstrong [TeamSybase]

unread,
Jun 29, 2004, 9:18:24 AM6/29/04
to
On 28 Jun 2004 15:39:29 -0700, "Bob" <b...@nospam.com> wrote:

>I could care less what control I use, just as long as the end user can see
>the image.

Only the native picture control supports the direct insertion of an
image from memory, using the SetPicture option. For just about any
other controls, including the DataWindow, you would need to save the
data out into a temporary file first, and then load the file.

>I am just suprised that Team Sybase never cut and pasted before.

Perhaps you have TeamSybase and/or the newsgroups confused with
official Sybase tech support. TeamSybase are volunteers that have
agreed to spend a certain amount of time in the forums trying to
answer people's question. There's no guarantee from Sybase concerning
the newsgroup or from TeamSybase that every question will be answered.
If you need that kind of support, I'd suggest obtaining a support
agreement from Sybase.


Bruce Armstrong [TeamSybase]
http://www.teamsybase.com

Two new books on developing with PowerBuilder
http://www.pb9books.com?source=newsgroups

Need code sample? Check out CodeXchange:
http://www.codexchange.sybase.com

Preach the gospel at all times. If necessary, use words. - Francis of Assisi
http://www.needhim.org

---------------------------------------------------------------------
DISCLAIMER:

This newsgroup message is only intended for the recipient. Given that it
is a posting to a public newsgroup, that means if you can read this
message then you are the recipient. This message may contain information
that is confidential and protected from disclosure. And then again,
it may not.

Given that TeamSybase members are not employees of Sybase, the contents
of this message do not necessarily represent the views or policies of
Sybase. Given that TeamSybase is a diverse group of users of Sybase
products, the contents of this message do not necessarily represent the
views of a significant number of the members of TeamSybase. Given that the
author has mutliple personalities and hears voices in his head, the contents
of this message do not necessarily represent his own views.

Rao Hanumara

unread,
Jun 29, 2004, 11:00:39 AM6/29/04
to
I agree with Roy and Bruce in their openness, if anyone can discover a
better way, why not post in CodeExchange
so that other folks can appreciate it. I tried couple of years ago to paste
directly but could not find a solution. What I did was gave the user a
browse option to a directory where the picture is first saved. It is not a
complex operation but takes two step instead of one step. First save
internet picture to a disk and browse it and paste into PB applicaiton.
Rao/..
"bede" <bede...@m.sofico.be> wrote in message news:40e15810@forums-2-dub...

Bob

unread,
Jun 29, 2004, 5:01:59 PM6/29/04
to

"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
wrote in message news:leq2e0hdses7uq4i0...@4ax.com...

> On 28 Jun 2004 15:39:29 -0700, "Bob" <b...@nospam.com> wrote:
>
> Only the native picture control supports the direct insertion of an
> image from memory, using the SetPicture option. For just about any
> other controls, including the DataWindow, you would need to save the
> data out into a temporary file first, and then load the file.

I already knew that. I wanted direct Paste from clipboard.

>
> >I am just suprised that Team Sybase never cut and pasted before.
>
> Perhaps you have TeamSybase and/or the newsgroups confused with
> official Sybase tech support. TeamSybase are volunteers that have
> agreed to spend a certain amount of time in the forums trying to
> answer people's question. There's no guarantee from Sybase concerning
> the newsgroup or from TeamSybase that every question will be answered.
> If you need that kind of support, I'd suggest obtaining a support
> agreement from Sybase.
>

I am not cunfused. I was being a smart ass.


Bob

unread,
Jun 29, 2004, 5:05:30 PM6/29/04
to

"Rao Hanumara" <rhan...@wam.umd.edu> wrote in message
news:40e18417$1@forums-1-dub...

> I agree with Roy and Bruce in their openness, if anyone can discover a
> better way, why not post in CodeExchange
> so that other folks can appreciate it. I tried couple of years ago to
paste
> directly but could not find a solution. What I did was gave the user a
> browse option to a directory where the picture is first saved. It is not a
> complex operation but takes two step instead of one step. First save
> internet picture to a disk and browse it and paste into PB applicaiton.


[snip]

I can do it in one step. I pass the directory/filename on disk where to put
picture to the DLL and load it in PowerScript then delete it. End user has
no idea I saved the image to disk.


philipsalgannik

unread,
Jun 29, 2004, 6:52:11 PM6/29/04
to
I am not sure if you are reading responses to your post, but
Rich Text Edit control DOES support pasting images from
clipboard...

Bob

unread,
Jun 29, 2004, 8:05:36 PM6/29/04
to

<Philip Salgannik> wrote in message
news:40e1f29b.400...@sybase.com...

> I am not sure if you are reading responses to your post, but
> Rich Text Edit control DOES support pasting images from
> clipboard...
>
[nip]

I don't want to use an RTE control. I want to use a picture control.


Philip Salgannik

unread,
Jun 30, 2004, 12:26:18 AM6/30/04
to
Well, keep on not wanting...


pbm_thisusuallydoesnothelp:-))
Philip Salgannik

"Bob" <b...@nospam.com> wrote in message news:40e203d0@forums-1-dub...

Bob

unread,
Jun 30, 2004, 5:59:56 PM6/30/04
to
:-)

"Philip Salgannik" <philema...@comcast.net> wrote in message
news:40e24190@forums-2-dub...


> Well, keep on not wanting...
>
>
> pbm_thisusuallydoesnothelp:-))
> Philip Salgannik
>

[snip]


Bob

unread,
Jul 2, 2004, 10:40:26 AM7/2/04
to
I will upload the DLL and sample PowerBuilder script this weekend to Code
Exchange. Can any post to this server?


Roy Kiesler [TeamSybase]

unread,
Jul 2, 2004, 2:14:45 PM7/2/04
to
Bob wrote:

> I will upload the DLL and sample PowerBuilder script this weekend to Code
> Exchange. Can any post to this server?
>
>

Yes

--
Roy

Bob Piskac

unread,
Jul 6, 2004, 6:34:18 AM7/6/04
to
ftp://ftp.pbsoftware.com/pbs/PBImagePaste.zip

Here is an example program. I am still finishing the JPEG support.

"Bob" <b...@nospam.com> wrote in message news:40dcd589$1@forums-2-dub...

Bob Piskac

unread,
Sep 17, 2004, 10:13:16 PM9/17/04
to
Found a typo in my code so I posted a new version. Also I just got the jpeg
conversion software working.

ftp://ftp.pbsoftware.com/pbs/PBImagePaste.zip


"Bob Piskac" <b...@pbsoftware.com> wrote in message
news:40ea802a@forums-1-dub...

0 new messages