DRAW on a Virtual form

Moderator: Rathinagiri

Post Reply
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

DRAW on a Virtual form

Post by esgici »

Hi all

DRAW OK, but erased in first scrolling :(

Any idea ?

Regards
DrawTest.zip
(2.94 KiB) Downloaded 370 times
Viva INTERNATIONAL HMG :D
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: DRAW on a Virtual form

Post by andyglezl »

Hola esgici

Trata esto
--------------------
Hello Esgici

Try this

Code: Select all

*-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.

PROCEDURE DrawVirt()

   DEFINE WINDOW frmVirtForm  ; 
      AT 0, 0 ;
      WIDTH 640 ;
      HEIGHT 440 ;
      TITLE "Drawing on Virt form ( do scroll to see problem )" ;
      VIRTUAL HEIGHT 1024 ;
      MODAL ;
      ON PAINT F_OnPaint()    //    <======  
     
      ON KEY ESCAPE OF frmVirtForm ACTION ThisWindow.Release
      
   END WINDOW // frmRealForm
   
   frmVirtForm.Center
   frmVirtForm.Activate
   
RETURN // DrawVirt()  
FUNCTION F_OnPaint            //    <======  
    LOCAL hDC, BTstruct

    hDC := BT_CreateDC( "frmVirtForm", BT_HDC_INVALIDCLIENTAREA, @BTstruct ) 

     DRAW RECTANGLE IN WINDOW frmVirtForm ;
          AT 100, 100 ;
          TO 340, 540

     // Here, the commands DRAW    


    BT_DeleteDC( BTstruct )    

RETURN nil
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: DRAW on a Virtual form

Post by andyglezl »

Lo siento, debes de incluir:
--------------------------
Sorry, you must include:


#include "hfcl.ch"
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: DRAW on a Virtual form

Post by esgici »

andyglezl wrote:...Try this...
Thanks Andres

Sadly ( due to some reasons ( long strory ) ) I can't use ONPAINT nor BosTaurus :(

Regards
Viva INTERNATIONAL HMG :D
Post Reply