کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی
کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی

ترسیم خط با Polyline




Const NUM =1000
(Const TWOPI = (2 * 3.14159


WndProc 

static int cxClient,cyClient
Dim apt(NUM) As POINTAPI

WM_PAINT 

(MoveToEx hdc, 0, cyClient / 2, NULL
(LineTo  hdc,cxClient,cyClient / 2

i=0
Do
apt(i).x = i * cxClient / NUM
(((apt(i).y =(cyClient / 2 * (1 - sin (TWOPI * i / NUM
i=i+1
Loop Until I<NUM

Polyline  hdc, apt, NUM

ترسیم خط LineTo




تمام منابع خارجی 









Dim px As POINTAPI

           GetCursorPos px

           'ClientToScreen hwnd, px

        

         MoveToEx hdc, 120, 30, px

         LineTo hdc, 140, 30

          

         MoveToEx hdc, 120, 30, px

         LineTo hdc, 135, 15

         ' Quarter

         MoveToEx hdc, 120, 30, px

         LineTo hdc, 134, 44

         

         

         MoveToEx hdc, 120, 30, px

         LineTo hdc, 120, 50

         

         ' Quarter

         MoveToEx hdc, 120, 30, px

         LineTo hdc, 105, 44

         

               

         MoveToEx hdc, 120, 30, px

         LineTo hdc, 120, 10

         

          ' Quarter

         MoveToEx hdc, 120, 30, px

         LineTo hdc, 105, 14

         

         

         MoveToEx hdc, 120, 30, px

         LineTo hdc, 100, 30






Rotate

using WM_TIMER

Dim tt As RECT

Static Deg

       Deg = Deg + 5

         If Deg > 360 Then Deg = 0

         Dim xl, yt

        xl = 120: yt = 30

  

          tt.Left = 99: tt.Top = 5: tt.right = 141: tt.bottom = 55

   (FillRect hdc, tt, GetSysColorBrush(15

طول خط 20 

                 

   در ربع اول            If 0 < Deg < 90 Then ' Quarter 

                      Newx = xl + Sin(Deg * Sin1) * 20

                      Newy = yt - Cos(Deg * Sin1) * 20

                 End If

                  

  در ربع دوم                  If 90 < Deg < 180 Then

                      Newx = xl + Cos(Deg * Sin1) * 20

                      Newy = yt + Sin(Deg * Sin1) * 20

                End If

                

در ربع سوم                   If 180 < Deg < 270 Then

                      Newx = xl - Sin(Deg * Sin1) * 20

                      Newy = yt + Cos(Deg * Sin1) * 20

                 End If

                 

در ربع چهارم                 If 270 < Deg < 360 Then

                      Newx = xl - Cos(Deg * Sin1) * 20

                      Newy = yt - Sin(Deg * Sin1) * 20

               End If

                     

              MoveToEx hdc, 120, 30, px

              LineTo hdc, Newx, Newy

                      

                   






 xl = 120: yt = 30

       

          tt.Left = 100: tt.Top = 5: tt.right = 140: tt.bottom = 55

          (FillRect hdc, tt, GetSysColorBrush(15

                      

                      Arc hdc, 100, 10, 140, 50, 0, 0, 0, 0

                      SelectObject hdc, HoldPen

                      Arc hdc, 115, 25, 125, 35, 0, 0, 0, 0

                      SelectObject hdc, HoldPen1

                      Newx = xl + Sin(Deg * Sin1) * 16

                      Newy = yt - Cos(Deg * Sin1) * 16

                      

                      MoveToEx hdc, 120, 30, px

                      LineTo hdc, Newx, Newy

                      

                      Deg = Deg + 10

       

       

       DeleteObject HoldPen

       DeleteObject HoldPen1