Re: Impression d'écran (Double écran)

Vous débutez et vous avez besoin d'aide ? N'hésitez pas à poser vos questions
brossden
Messages : 833
Inscription : lun. 26/janv./2004 14:37

Re: Impression d'écran (Double écran)

Message par brossden »

Bonjour à tous

J'ai glané ici et là des bouts de code pour 2crire celui-ci qui envoie sur l'imprimante une copie d'écran grand format !

Code : Tout sélectionner

ProcedureDLL.l RotateImageEx2(ImageID, Angle.f)
  Protected bmi.BITMAPINFO, bmi2.BITMAPINFO, Hdc.l, NewImageID, Mem, n, nn, bm.BITMAP
  ;radian conversion
  Debug "Angle : "+Str(Angle)
  Angle*#PI/180
  Protected Cos.f = Cos(Angle)
  Protected Sin.f = Sin(Angle)
  Protected CouleurFond = 0
  GetObject_(ImageID, SizeOf(BITMAP), @bm.BITMAP)
  bmi\bmiHeader\biSize = SizeOf(BITMAPINFOHEADER)
  bmi\bmiHeader\biWidth = bm\bmWidth
  bmi\bmiHeader\biHeight = bm\bmHeight
  bmi\bmiHeader\biPlanes = 1
  bmi\bmiHeader\biBitCount = 32
  bmi\bmiHeader\biCompression = #BI_RGB
  bmi2\bmiHeader\biSize = SizeOf(BITMAPINFOHEADER)
  bmi2\bmiHeader\biWidth = bm\bmWidth * Abs(Cos) + bm\bmHeight * Abs(Sin)
  bmi2\bmiHeader\biHeight = bm\bmHeight * Abs(Cos) + bm\bmWidth * Abs(Sin)
  bmi2\bmiHeader\biPlanes = 1
  bmi2\bmiHeader\biBitCount = 32
  bmi2\bmiHeader\biCompression = #BI_RGB
  Mem = AllocateMemory(bm\bmWidth * bm\bmHeight * 4)
  If Mem
    Protected Mem2 = AllocateMemory(bmi2\bmiHeader\biWidth * bmi2\bmiHeader\biHeight * 4)
    If Mem2
      ;retrieves the bits of the specified bitmap and copies them into a buffer
      Hdc = CreateCompatibleDC_(GetDC_(ImageID))
      If Hdc
        GetDIBits_(Hdc, ImageID, 0, bm\bmHeight, Mem, @bmi, #DIB_RGB_COLORS)
        ReleaseDC_(0, Hdc)
      EndIf
      Protected CX1 = bm\bmWidth - 1
      Protected CY1 = bm\bmHeight - 1
      Protected CX2 = bmi2\bmiHeader\biWidth - 1
      Protected CY2 = bmi2\bmiHeader\biHeight - 1
      Protected Mem01 = Mem + bm\bmWidth * 4
      Protected Mem10 = Mem + 4
      Protected Mem11 = Mem01 + 4
      Protected Mem2Temp = Mem2
      Protected deb=-CX2/2
    Protected fin=deb+CX2;= Round(CX2/2,1) but <> (CX2*2-CX2)/2
      For nn = 0 To CY2
        Protected x1b.l
        Protected y1b.l = (nn * 2) - CY2
        Protected Temp1.f = (CX1 - (y1b * Sin))/2
        Protected Temp2.f = (CY1 + (y1b * Cos))/2
        Protected x1.f = Temp1 + (deb * Cos)
        Protected y1.f = Temp2 + (deb * Sin)
        For x1b = deb To fin
          ;could be faster with arrays
          Protected x2.l = x1
          Protected y2.l = y1
          If x1 < x2
            !DEC dword[p.v_x2]
          EndIf
          If y1 < y2
            !DEC dword[p.v_y2]
          EndIf
          Protected x2b.l = x2 + 1
          Protected y2b.l = y2 + 1
          ;test boundaries
          If x2b >= 0 And x2 <= CX1 And y2b >= 0 And y2 <= CY1
            Protected fx.f = x1 - x2
            Protected fy.f = y1 - y2
            Protected f00.f = 1 - fx
            Protected f10.f = 1 - fy
            Protected f01.f = f00 * fy
            f00 * f10
            f10 * fx
            Protected f11.f = fx * fy

            Protected MemTemp = (x2 + y2 * bm\bmWidth) * 4
            Protected c00.l, c01.l, c11.l, c10.l

            If x2 >= 0 And x2 <= CX1
              If y2 >= 0 And y2 <= CY1
                !MOV eax,dword[p.v_Mem]
                !ADD eax,dword[p.v_MemTemp]
                !MOV eax,dword[eax]
                !MOV dword[p.v_c00],eax
                ;c00 = PeekL(Mem + MemTemp)
              Else
                c00 = 0
              EndIf
              If y2b >= 0 And y2b <= CY1
                !MOV eax,dword[p.v_Mem01]
                !ADD eax,dword[p.v_MemTemp]
                !MOV eax,dword[eax]
                !MOV dword[p.v_c01],eax
                ;c01 = PeekL(Mem01 + MemTemp)
              Else
                c01 = 0
              EndIf
            Else
              c00 = 0
              c01 = 0
            EndIf
            If x2b >= 0 And x2b <= CX1
              If y2 >= 0 And y2 <= CY1
                !MOV eax,dword[p.v_Mem10]
                !ADD eax,dword[p.v_MemTemp]
                !MOV eax,dword[eax]
                !MOV dword[p.v_c10],eax
                ;c10 = PeekL(Mem10 + MemTemp)
              Else
                c10 = 0
              EndIf
              If  y2b >= 0 And y2b <= CY1
                !MOV eax,dword[p.v_Mem11]
                !ADD eax,dword[p.v_MemTemp]
                !MOV eax,dword[eax]
                !MOV dword[p.v_c11],eax
                ;c11 = PeekL(Mem11 + MemTemp)
              Else
                c11 = 0
              EndIf
            Else
              c10 = 0
              c11 = 0
            EndIf
            Protected r1.l,r2.l,r3.l,r4.l,g1.l,g2.l,g3.l,g4.l,b1.l,b2.l,b3.l,b4.l
            !MOV eax,dword[p.v_c00]
            !MOV ebx,eax
            !MOV ecx,eax
            !AND eax,$FF
            !MOV dword[p.v_r1],eax
            !AND ebx,$FF00
            !MOV dword[p.v_g1],ebx
            !AND ecx,$FF0000
            !MOV dword[p.v_b1],ecx
            !MOV eax,dword[p.v_c10]
            !MOV ebx,eax
            !MOV ecx,eax
            !AND eax,$FF
            !MOV dword[p.v_r2],eax
            !AND ebx,$FF00
            !MOV dword[p.v_g2],ebx
            !AND ecx,$FF0000
            !MOV dword[p.v_b2],ecx
            !MOV eax,dword[p.v_c01]
            !MOV ebx,eax
            !MOV ecx,eax
            !AND eax,$FF
            !MOV dword[p.v_r3],eax
            !AND ebx,$FF00
            !MOV dword[p.v_g3],ebx
            !AND ecx,$FF0000
            !MOV dword[p.v_b3],ecx
            !MOV eax,dword[p.v_c11]
            !MOV ebx,eax
            !MOV ecx,eax
            !AND eax,$FF
            !MOV dword[p.v_r4],eax
            !AND ebx,$FF00
            !MOV dword[p.v_g4],ebx
            !AND ecx,$FF0000
            !MOV dword[p.v_b4],ecx

            ;pure knows well how to do this
            Protected r.l = r1 * f00 + r2 * f10 + r3 * f01 + r4 * f11
            Protected g.l = g1 * f00 + g2 * f10 + g3 * f01 + g4 * f11
            Protected b.l = b1 * f00 + b2 * f10 + b3 * f01 + b4 * f11

            !MOV eax,dword[p.v_r]
            !MOV ebx,dword[p.v_g]
            !MOV ecx,dword[p.v_b]
            ;one trick is to let triplets at the same place to avoid shifting
            !AND eax,$FF
            !AND ebx,$FF00
            !AND ecx,$FF0000
            !OR eax,ebx
            !OR eax,ecx

            !MOV ebx,dword[p.v_Mem2Temp]
            !MOV dword[ebx],eax

          Else

            !MOV ebx,dword[p.v_Mem2Temp]
            !XOR eax,eax
            !MOV dword[ebx],eax

          EndIf

          Mem2Temp + 4
          x1 + Cos
          y1 + Sin

        Next
      Next

      ; On crée la nouvelle image
      NewImageID = CreateImage(#PB_Any, bmi2\bmiHeader\biWidth, bmi2\bmiHeader\biHeight)
      Hdc = CreateCompatibleDC_(GetDC_(ImageID(NewImageID)))
      If Hdc
        SetDIBits_(Hdc, ImageID(NewImageID), 0, bmi2\bmiHeader\biHeight, Mem2, @bmi2, #DIB_RGB_COLORS) ; on envoie la liste dans l'image
        ReleaseDC_(0, Hdc)
      EndIf

      FreeMemory(Mem2)
    EndIf
    FreeMemory(Mem)
  EndIf

  ProcedureReturn NewImageID
EndProcedure


CreateImage(0,GetSystemMetrics_(#SM_CXSCREEN),GetSystemMetrics_(#SM_CYSCREEN))
DC = StartDrawing(ImageOutput(0))
  BitBlt_(DC,0,0,ImageWidth(0),ImageHeight(0),GetDC_(GetDesktopWindow_()),0,0,#SRCCOPY )
StopDrawing()

X = RotateImageEx2(ImageID(0),90)

If PrintRequester()

  If StartPrinting("Copie d'écran")
    LoadFont(1, "Arial", 100)

    If StartDrawing(PrinterOutput())
        DrawingFont(FontID(1))

        Lg = PrinterPageHeight()-200
        LgP = Lg/ImageHeight(X)*ImageWidth(X)
        XL = (PrinterPageWidth()-LgP) /2
        DrawText(Lg/2 - 500 , 100, "Copie d'écran")
        DrawImage(ImageID(X), XL, 100, LgP, Lg)


      StopDrawing()
    EndIf

    StopPrinting()
  EndIf
EndIf

Pour l'utiliser il faut faire un raccourci Clavier !
Dernière modification par brossden le lun. 23/mai/2011 10:10, modifié 2 fois.
Denis

Bonne Jounée à tous
Avatar de l’utilisateur
kernadec
Messages : 1606
Inscription : ven. 25/avr./2008 11:14

Re: Impression d'écran

Message par kernadec »

bonjour brossden

merci, c'est top
ptit rappel pour les tests impression :http://www.cutepdf.com/products/cutepdf/writer.asp

Cordialement
Parole De JOJO
Messages : 446
Inscription : mar. 25/mai/2010 17:24
Localisation : Bnei Brak, Israel

Re: Impression d'écran

Message par Parole De JOJO »

merci
code tres utile
brossden
Messages : 833
Inscription : lun. 26/janv./2004 14:37

Re: Impression d'écran (Double écran)

Message par brossden »

Bonjour à tous

Depuis quelques temps j'ai deux écran sur mon PC et le programme ne répondait plus exactement au besoin.
J'ai donc modifié le programme pour permettre l'impression de l'un ou l'autre des écrans.

Deuxiéme correction pour les écrans doubles à droite comme à gauche !

Code : Tout sélectionner

  ProcedureDLL.l RotateImageEx2(ImageID, Angle.f)
    Protected bmi.BITMAPINFO, bmi2.BITMAPINFO, Hdc.l, NewImageID, Mem, n, nn, bm.BITMAP
    ;radian conversion
    Debug "Angle : "+Str(Angle)
    Angle*#PI/180
    Protected Cos.f = Cos(Angle)
    Protected Sin.f = Sin(Angle)
    Protected CouleurFond = 0
    GetObject_(ImageID, SizeOf(BITMAP), @bm.BITMAP)
    bmi\bmiHeader\biSize = SizeOf(BITMAPINFOHEADER)
    bmi\bmiHeader\biWidth = bm\bmWidth
    bmi\bmiHeader\biHeight = bm\bmHeight
    bmi\bmiHeader\biPlanes = 1
    bmi\bmiHeader\biBitCount = 32
    bmi\bmiHeader\biCompression = #BI_RGB
    bmi2\bmiHeader\biSize = SizeOf(BITMAPINFOHEADER)
    bmi2\bmiHeader\biWidth = bm\bmWidth * Abs(Cos) + bm\bmHeight * Abs(Sin)
    bmi2\bmiHeader\biHeight = bm\bmHeight * Abs(Cos) + bm\bmWidth * Abs(Sin)
    bmi2\bmiHeader\biPlanes = 1
    bmi2\bmiHeader\biBitCount = 32
    bmi2\bmiHeader\biCompression = #BI_RGB
    Mem = AllocateMemory(bm\bmWidth * bm\bmHeight * 4)
    If Mem
      Protected Mem2 = AllocateMemory(bmi2\bmiHeader\biWidth * bmi2\bmiHeader\biHeight * 4)
      If Mem2
        ;retrieves the bits of the specified bitmap and copies them into a buffer
        Hdc = CreateCompatibleDC_(GetDC_(ImageID))
        If Hdc
          GetDIBits_(Hdc, ImageID, 0, bm\bmHeight, Mem, @bmi, #DIB_RGB_COLORS)
          ReleaseDC_(0, Hdc)
        EndIf
        Protected CX1 = bm\bmWidth - 1
        Protected CY1 = bm\bmHeight - 1
        Protected CX2 = bmi2\bmiHeader\biWidth - 1
        Protected CY2 = bmi2\bmiHeader\biHeight - 1
        Protected Mem01 = Mem + bm\bmWidth * 4
        Protected Mem10 = Mem + 4
        Protected Mem11 = Mem01 + 4
        Protected Mem2Temp = Mem2
        Protected deb=-CX2/2
      Protected fin=deb+CX2;= Round(CX2/2,1) but <> (CX2*2-CX2)/2
        For nn = 0 To CY2
          Protected x1b.l
          Protected y1b.l = (nn * 2) - CY2
          Protected Temp1.f = (CX1 - (y1b * Sin))/2
          Protected Temp2.f = (CY1 + (y1b * Cos))/2
          Protected x1.f = Temp1 + (deb * Cos)
          Protected y1.f = Temp2 + (deb * Sin)
          For x1b = deb To fin
            ;could be faster with arrays
            Protected x2.l = x1
            Protected y2.l = y1
            If x1 < x2
              !DEC dword[p.v_x2]
            EndIf
            If y1 < y2
              !DEC dword[p.v_y2]
            EndIf
            Protected x2b.l = x2 + 1
            Protected y2b.l = y2 + 1
            ;test boundaries
            If x2b >= 0 And x2 <= CX1 And y2b >= 0 And y2 <= CY1
              Protected fx.f = x1 - x2
              Protected fy.f = y1 - y2
              Protected f00.f = 1 - fx
              Protected f10.f = 1 - fy
              Protected f01.f = f00 * fy
              f00 * f10
              f10 * fx
              Protected f11.f = fx * fy

              Protected MemTemp = (x2 + y2 * bm\bmWidth) * 4
              Protected c00.l, c01.l, c11.l, c10.l

              If x2 >= 0 And x2 <= CX1
                If y2 >= 0 And y2 <= CY1
                  !MOV eax,dword[p.v_Mem]
                  !ADD eax,dword[p.v_MemTemp]
                  !MOV eax,dword[eax]
                  !MOV dword[p.v_c00],eax
                  ;c00 = PeekL(Mem + MemTemp)
                Else
                  c00 = 0
                EndIf
                If y2b >= 0 And y2b <= CY1
                  !MOV eax,dword[p.v_Mem01]
                  !ADD eax,dword[p.v_MemTemp]
                  !MOV eax,dword[eax]
                  !MOV dword[p.v_c01],eax
                  ;c01 = PeekL(Mem01 + MemTemp)
                Else
                  c01 = 0
                EndIf
              Else
                c00 = 0
                c01 = 0
              EndIf
              If x2b >= 0 And x2b <= CX1
                If y2 >= 0 And y2 <= CY1
                  !MOV eax,dword[p.v_Mem10]
                  !ADD eax,dword[p.v_MemTemp]
                  !MOV eax,dword[eax]
                  !MOV dword[p.v_c10],eax
                  ;c10 = PeekL(Mem10 + MemTemp)
                Else
                  c10 = 0
                EndIf
                If  y2b >= 0 And y2b <= CY1
                  !MOV eax,dword[p.v_Mem11]
                  !ADD eax,dword[p.v_MemTemp]
                  !MOV eax,dword[eax]
                  !MOV dword[p.v_c11],eax
                  ;c11 = PeekL(Mem11 + MemTemp)
                Else
                  c11 = 0
                EndIf
              Else
                c10 = 0
                c11 = 0
              EndIf
              Protected r1.l,r2.l,r3.l,r4.l,g1.l,g2.l,g3.l,g4.l,b1.l,b2.l,b3.l,b4.l
              !MOV eax,dword[p.v_c00]
              !MOV ebx,eax
              !MOV ecx,eax
              !AND eax,$FF
              !MOV dword[p.v_r1],eax
              !AND ebx,$FF00
              !MOV dword[p.v_g1],ebx
              !AND ecx,$FF0000
              !MOV dword[p.v_b1],ecx
              !MOV eax,dword[p.v_c10]
              !MOV ebx,eax
              !MOV ecx,eax
              !AND eax,$FF
              !MOV dword[p.v_r2],eax
              !AND ebx,$FF00
              !MOV dword[p.v_g2],ebx
              !AND ecx,$FF0000
              !MOV dword[p.v_b2],ecx
              !MOV eax,dword[p.v_c01]
              !MOV ebx,eax
              !MOV ecx,eax
              !AND eax,$FF
              !MOV dword[p.v_r3],eax
              !AND ebx,$FF00
              !MOV dword[p.v_g3],ebx
              !AND ecx,$FF0000
              !MOV dword[p.v_b3],ecx
              !MOV eax,dword[p.v_c11]
              !MOV ebx,eax
              !MOV ecx,eax
              !AND eax,$FF
              !MOV dword[p.v_r4],eax
              !AND ebx,$FF00
              !MOV dword[p.v_g4],ebx
              !AND ecx,$FF0000
              !MOV dword[p.v_b4],ecx

              ;pure knows well how to do this
              Protected r.l = r1 * f00 + r2 * f10 + r3 * f01 + r4 * f11
              Protected g.l = g1 * f00 + g2 * f10 + g3 * f01 + g4 * f11
              Protected b.l = b1 * f00 + b2 * f10 + b3 * f01 + b4 * f11

              !MOV eax,dword[p.v_r]
              !MOV ebx,dword[p.v_g]
              !MOV ecx,dword[p.v_b]
              ;one trick is to let triplets at the same place to avoid shifting
              !AND eax,$FF
              !AND ebx,$FF00
              !AND ecx,$FF0000
              !OR eax,ebx
              !OR eax,ecx

              !MOV ebx,dword[p.v_Mem2Temp]
              !MOV dword[ebx],eax

            Else

              !MOV ebx,dword[p.v_Mem2Temp]
              !XOR eax,eax
              !MOV dword[ebx],eax

            EndIf

            Mem2Temp + 4
            x1 + Cos
            y1 + Sin

          Next
        Next

        ; On crée la nouvelle image
        NewImageID = CreateImage(#PB_Any, bmi2\bmiHeader\biWidth, bmi2\bmiHeader\biHeight)
        Hdc = CreateCompatibleDC_(GetDC_(ImageID(NewImageID)))
        If Hdc
          SetDIBits_(Hdc, ImageID(NewImageID), 0, bmi2\bmiHeader\biHeight, Mem2, @bmi2, #DIB_RGB_COLORS) ; on envoie la liste dans l'image
          ReleaseDC_(0, Hdc)
        EndIf

        FreeMemory(Mem2)
      EndIf
      FreeMemory(Mem)
    EndIf

    ProcedureReturn NewImageID
  EndProcedure

  Enumeration
    #Window_0
    #ButtonImage_0
    #ButtonImage_1
    #Image0
    #image1
    #ImageB0
    #imageB1
    #Texte
    #Libel
  EndEnumeration

  Global  Image0, Image1, Image2, DH0, DW0, DH1, DW1

  Procedure Max(X,y)
    If X>y
      ProcedureReturn X
    Else
      ProcedureReturn y
      EndIf

    EndProcedure

    Procedure CopyImageToMemory(ImageNumber, Memory)
      Protected TemporaryDC, TemporaryBitmap.BITMAP, TemporaryBitmapInfo.BITMAPINFO
      TemporaryDC = CreateDC_("DISPLAY", #Null, #Null, #Null)
      GetObject_(ImageID(ImageNumber), SizeOf(BITMAP), TemporaryBitmap.BITMAP)
      TemporaryBitmapInfo\bmiHeader\biSize        = SizeOf(BITMAPINFOHEADER)
      TemporaryBitmapInfo\bmiHeader\biWidth       = TemporaryBitmap\bmWidth
      TemporaryBitmapInfo\bmiHeader\biHeight      = -TemporaryBitmap\bmHeight
      TemporaryBitmapInfo\bmiHeader\biPlanes      = 1
      TemporaryBitmapInfo\bmiHeader\biBitCount    = 32
      TemporaryBitmapInfo\bmiHeader\biCompression = #BI_RGB
      GetDIBits_(TemporaryDC, ImageID(ImageNumber), 0, TemporaryBitmap\bmHeight, Memory, TemporaryBitmapInfo, #DIB_RGB_COLORS)
      DeleteDC_(TemporaryDC)
    EndProcedure

  Procedure Open_Window_0()

    If OpenWindow(#Window_0, 289, 53, (DW0+DW1)/8+20, Max(DH1,DH0)/8+60, "Impression d'écran",  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered | #PB_Window_WindowCentered )
        If CreateGadgetList(WindowID(#Window_0))
        ButtonImageGadget(#ButtonImage_0, 10, 10, DW0/8, DH0/8, ImageID(#ImageB0))
        TextGadget(#Libel,20,Max(DH1,DH0)/8+32,70,20,"Titre Page :")
        StringGadget(#Texte,80,Max(DH1,DH0)/8+30,150,20,"Copie d'écran")
        If DW1<>0
          ButtonImageGadget(#ButtonImage_1, 10+DW0/8, 10, DW1/8, DH1/8, ImageID(#imageB1))
        EndIf
      EndIf
    EndIf
  EndProcedure
  Procedure ImprimeImage(ImageX)
  X = RotateImageEx2(ImageID(ImageX),90)

  If PrintRequester()

    If StartPrinting(GetGadgetText(#Texte))
      LoadFont(1, "Arial", 100)

      If StartDrawing(PrinterOutput())
          DrawingFont(FontID(1))

          Lg = PrinterPageHeight()-200
          LgP = Lg/ImageHeight(X)*ImageWidth(X)
          XL = (PrinterPageWidth()-LgP) /2
          DrawText(Lg/2 - 500 , 100, GetGadgetText(#Texte))
          DrawImage(ImageID(X), XL, 100, LgP, Lg)


        StopDrawing()
      EndIf

      StopPrinting()
    EndIf
  EndIf
  End
  EndProcedure


  ExamineDesktops()
  DH0 = DesktopHeight(0)
  DW0 = DesktopWidth(0)
  DH1 = DesktopHeight(1)
  DW1 = DesktopWidth(1)




  CreateImage(#Image0,DW0,DH0)
  DC0 = StartDrawing(ImageOutput(#Image0))
      BitBlt_(DC0,0,0,DW0,DH0,GetDC_(GetDesktopWindow_()),0,0,#SRCCOPY )

  StopDrawing()

  CreateImage(#image1,DW1,DH1)
  DC1 = StartDrawing(ImageOutput(#image1))
    BitBlt_(DC1,0,0,DW1,DH1,GetDC_(GetDesktopWindow_()),DW0,0,#SRCCOPY )
  StopDrawing()



  CopyImage(#Image0,#ImageB0)
  CopyImage(#image1,#imageB1)

  ResizeImage(#ImageB0,DW0/8,DH0/8)
  ResizeImage(#imageB1,DW1/8,DH1/8)

  *Mem = AllocateMemory(500000)
  CopyImageToMemory(#imageB1,*Mem)

  z=0
  For n = 100 To 100000 Step 10
    z + PeekC(*Mem+n)
  Next
  Debug z
  If z=0
    CreateImage(#image1,DW1,DH1)
    DC1 = StartDrawing(ImageOutput(#image1))
    BitBlt_(DC1,0,0,DW1,DH1,GetDC_(GetDesktopWindow_()),-DW1,0,#SRCCOPY )
    StopDrawing()
    CopyImage(#image1,#imageB1)
    ResizeImage(#imageB1,DW1/8,DH1/8)

  EndIf

  CloseFile(1)

  Open_Window_0()

  Repeat ; Start of the event loop

    Event = WaitWindowEvent()
    Gadgetid = EventGadget()
    If Event = #PB_Event_Gadget

      If Gadgetid = #ButtonImage_0
        ImprimeImage(#Image0)
      ElseIf Gadgetid = #ButtonImage_1
        ImprimeImage(#image1)

      EndIf

    EndIf

  Until Event = #PB_Event_CloseWindow ; End of the event loop

  End
  ;
Dernière modification par brossden le mar. 21/juin/2011 12:28, modifié 2 fois.
Denis

Bonne Jounée à tous
Avatar de l’utilisateur
Ar-S
Messages : 9540
Inscription : dim. 09/oct./2005 16:51
Contact :

Re: Impression d'écran (Double écran)

Message par Ar-S »

Merci Denis, ça fait plaisir du code "impression", et puis ça fait plaisir de te croiser :D
~~~~Règles du forum ~~~~
⋅.˳˳.⋅ॱ˙˙ॱ⋅.˳Ar-S ˳.⋅ॱ˙˙ॱ⋅.˳˳.⋅
W11x64 PB 6.x
Section HORS SUJET : ICI
LDV MULTIMEDIA : Dépannage informatique & mes Logiciels PB
UPLOAD D'IMAGES : Uploader des images de vos logiciels
brossden
Messages : 833
Inscription : lun. 26/janv./2004 14:37

Re: Impression d'écran (Double écran)

Message par brossden »

Heureux de te croisé aussi AR-S
Denis

Bonne Jounée à tous
Avatar de l’utilisateur
Kwai chang caine
Messages : 6989
Inscription : sam. 23/sept./2006 18:32
Localisation : Isere

Re: Impression d'écran (Double écran)

Message par Kwai chang caine »

Hello mon BROSSDEN
J't'ai cru mort :lol:
Tout comme ARS drolement comptant de revoir un ancien de la famille, et tes petits doigts clavioter toujours aussi agilement :wink:
ImageLe bonheur est une route...
Pas une destination

PureBasic Forum Officiel - Site PureBasic
brossden
Messages : 833
Inscription : lun. 26/janv./2004 14:37

Re: Impression d'écran (Double écran)

Message par brossden »

Hello Kwai... truc machin !

Comment vas tu ma vieille branche ?
Toujours autant de réflexions philosophiques ? :lol:

Je me fais rare ici je développe avec Windev et windev Mobile ... surtout pour android !, alors purebasic me sert surtout à réaliser de petites routines bien sympas !

Bye et bonne journée à tous
Denis

Bonne Jounée à tous
Avatar de l’utilisateur
graph100
Messages : 1318
Inscription : sam. 21/mai/2005 17:50

Re: Impression d'écran (Double écran)

Message par graph100 »

Si tu regarde bien sur le fofo, certain complotent pour rendre purebasic encore plus portable ;) (Idle pour ne pas le dénoncer :mrgreen: )
regarde là --> LLVM
Comme ça tu pourras peut etre l'utiliser sur androïde (si j'ai bien compris le topic :lol: )
_________________________________________________
Mon site : CeriseCode (Attention Chantier perpétuel ;))
Répondre