This is mnoGoSearch's cache of https://lists.gambas-basic.org/pipermail/user/2014-August/049427.html. It is a snapshot of the page as it appeared during last crawling. The current page could have changed in the meantime.

Last modified: Thu, 28 Aug 2014, 13:55:01 CEST    Size: 4503
[Gambas-user] DrawingArea to Picture or Image

[Gambas-user] DrawingArea to Picture or Image

Jussi Lahtinen jussi.lahtinen at ...626...
Thu Aug 28 13:55:01 CEST 2014


It seems picture of PictureBox doesn't like to be drew on. Not sure why,
but we have DrawingArea for that purpose... Anyway, here is proper way
(this didn't work?):


  Dim tmp As New Picture(DrawingArea1.Width, DrawingArea1.Height)

  If Not bPrinter Then

    Draw.Begin(tmp)
    Draw.Clear
    modCrBcode.PrintBarcode(txtBarcode.Text, Val(txtPosX.text),
Val(txtPosY.text), Val(txtHeight.text), Val(txtWidth.text), True)
    Draw.End()

    PictureBox1.Picture = tmp

...


If you want the barcode also into drawingarea add this:

Draw.Picture(tmp, 0, 0)


Jussi



On Thu, Aug 28, 2014 at 1:48 PM, abbat81 <abbat.81 at ...787...> wrote:

> Hi Jussi,
>
> Draw.Begin(PictureBox1)  -> Not a printable object
>
> Draw.Begin(PictureBox1.Picture)  -> Null Object
>
>
>
> Any idea?
>
> Thanks for reply.
>
>
>
> --
> View this message in context:
> http://gambas.8142.n7.nabble.com/DrawingArea-to-Picture-or-Image-tp47850p47874.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list