كود تضعه في .... Vb6.0

achraf.mouni

  • Hero Member
  • *****
    • مشاركة: 2439
    • مشاهدة الملف الشخصي
    • البريد الالكتروني
في: كانون الثاني 30, 2009, 08:46:46 صباحاً
السلام عليكم ورحمة الله تعالى  وبركاته
موضوعنا اليوم هو كود تضعه في فروم يظهر لك شكل (وجه :مثل افلام  الكارتون) ههههه
افتح الـ Visual Basic 6.0
افتع مشروع جديد
دبل كلك على الفورم
امسح اللي فيه
الصق الكود التالي
 
Option  Explicit
Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As  POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Private  Declare Function CreateRectRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long,  ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function  CreateRoundRectRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal X2 As  Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long
Private  Declare Function CreateEllipticRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As  Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function  CombineRgn Lib "gdi32" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal  hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long
Private Declare  Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private  Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As  Long, ByVal bRedraw As Boolean) As Long
Private Declare Function SendMessage  Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal  wParam As Long, lParam As Any) As Long
Private Declare Function  ReleaseCapture Lib "user32" () As Long
Private Type POINTAPI
   X As  Long
   Y As Long
End Type
Private Const RGN_COPY = 5
Private Const  CreatedBy = "VBSFC 7.0"
Private Const RegisteredTo = "Not  Registered"
Private ResultRegion As Long
Private Function  CreateFormRegion(ScaleX As Single, ScaleY As Single, OffsetX As Integer, OffsetY  As Integer) As Long
    Dim HolderRegion As Long, ObjectRegion As Long, nRet  As Long, Counter As Integer
    Dim PolyPoints() As POINTAPI
    Dim STPPX  As Integer, STPPY As Integer
    STPPX = Screen.TwipsPerPixelX
    STPPY =  Screen.TwipsPerPixelY
    ResultRegion = CreateRectRgn(0, 0, 0, 0)
     HolderRegion = CreateRectRgn(0, 0, 0, 0)
'This  procedure was generated by VB Shaped Form Creator.  This copy has
'NOT been  registered for commercial use.  It may only be used for non-
'profit making  programs.  If you intend to sell your program, I think
'it's only fair you  pay for mine.  Commercial registration costs $30,
'and can be performed  online.  See "Registration" item on the help menu
'for details.
'Latest  versions of VB Shaped Form Creator can be found at my website  at
'http://www.byalexv.com/VBSFC.html or you can visit my main site
'with  many other free programs and utilities at
http://www.byalexv.com
'Lines  starting with '! are required for reading the form shape using the
'Import  Form command in VB Shaped Form Creator, but are not necessary for
'Visual  Basic to display the form correctly.
'!Shaped  Form Region Definition
'!3,87,208,613,514,0,0,1
    ObjectRegion =  CreateEllipticRgn(208 * ScaleX * 15 / STPPX + OffsetX, 87 * ScaleY * 15 / STPPY  + OffsetY, 613 * ScaleX * 15 / STPPX + OffsetX, 514 * ScaleY * 15 / STPPY +  OffsetY)
    nRet = CombineRgn(ResultRegion, ObjectRegion, ObjectRegion,  RGN_COPY)
    DeleteObject ObjectRegion
'!3,126,240,307,191,0,0,3
     ObjectRegion = CreateEllipticRgn(240 * ScaleX * 15 / STPPX + OffsetX, 126 *  ScaleY * 15 / STPPY + OffsetY, 307 * ScaleX * 15 / STPPX + OffsetX, 191 * ScaleY  * 15 / STPPY + OffsetY)
    nRet = CombineRgn(HolderRegion, ResultRegion,  ResultRegion, RGN_COPY)
    nRet = CombineRgn(ResultRegion, HolderRegion,  ObjectRegion, 4)
    DeleteObject  ObjectRegion
'!3,113,518,594,181,0,0,3
    ObjectRegion =  CreateEllipticRgn(518 * ScaleX * 15 / STPPX + OffsetX, 113 * ScaleY * 15 / STPPY  + OffsetY, 594 * ScaleX * 15 / STPPX + OffsetX, 181 * ScaleY * 15 / STPPY +  OffsetY)
    nRet = CombineRgn(HolderRegion, ResultRegion, ResultRegion,  RGN_COPY)
    nRet = CombineRgn(ResultRegion, HolderRegion, ObjectRegion,  4)
    DeleteObject ObjectRegion
'!3,258,373,462,318,0,0,3
     ObjectRegion = CreateEllipticRgn(373 * ScaleX * 15 / STPPX + OffsetX, 258 *  ScaleY * 15 / STPPY + OffsetY, 462 * ScaleX * 15 / STPPX + OffsetX, 318 * ScaleY  * 15 / STPPY + OffsetY)
    nRet = CombineRgn(HolderRegion, ResultRegion,  ResultRegion, RGN_COPY)
    nRet = CombineRgn(ResultRegion, HolderRegion,  ObjectRegion, 4)
    DeleteObject  ObjectRegion
'!3,386,315,534,441,0,0,3
    ObjectRegion =  CreateEllipticRgn(315 * ScaleX * 15 / STPPX + OffsetX, 386 * ScaleY * 15 / STPPY  + OffsetY, 534 * ScaleX * 15 / STPPX + OffsetX, 441 * ScaleY * 15 / STPPY +  OffsetY)
    nRet = CombineRgn(HolderRegion, ResultRegion, ResultRegion,  RGN_COPY)
    nRet = CombineRgn(ResultRegion, HolderRegion, ObjectRegion,  4)
    DeleteObject ObjectRegion
'!3,503,355,461,524,0,0,3
     ObjectRegion = CreateEllipticRgn(355 * ScaleX * 15 / STPPX + OffsetX, 503 *  ScaleY * 15 / STPPY + OffsetY, 461 * ScaleX * 15 / STPPX + OffsetX, 524 * ScaleY  * 15 / STPPY + OffsetY)
    nRet = CombineRgn(HolderRegion, ResultRegion,  ResultRegion, RGN_COPY)
    nRet = CombineRgn(ResultRegion, HolderRegion,  ObjectRegion, 4)
    DeleteObject  ObjectRegion
'!3,292,605,617,375,0,0,3
    ObjectRegion =  CreateEllipticRgn(605 * ScaleX * 15 / STPPX + OffsetX, 292 * ScaleY * 15 / STPPY  + OffsetY, 617 * ScaleX * 15 / STPPX + OffsetX, 375 * ScaleY * 15 / STPPY +  OffsetY)
    nRet = CombineRgn(HolderRegion, ResultRegion, ResultRegion,  RGN_COPY)
    nRet = CombineRgn(ResultRegion, HolderRegion, ObjectRegion,  4)
    DeleteObject ObjectRegion
'!3,286,204,215,383,0,0,3
     ObjectRegion = CreateEllipticRgn(204 * ScaleX * 15 / STPPX + OffsetX, 286 *  ScaleY * 15 / STPPY + OffsetY, 215 * ScaleX * 15 / STPPX + OffsetX, 383 * ScaleY  * 15 / STPPY + OffsetY)
    nRet = CombineRgn(HolderRegion, ResultRegion,  ResultRegion, RGN_COPY)
    nRet = CombineRgn(ResultRegion, HolderRegion,  ObjectRegion, 4)
    DeleteObject  ObjectRegion
'!3,180,448,469,200,0,0,3
    ObjectRegion =  CreateEllipticRgn(448 * ScaleX * 15 / STPPX + OffsetX, 180 * ScaleY * 15 / STPPY  + OffsetY, 469 * ScaleX * 15 / STPPX + OffsetX, 200 * ScaleY * 15 / STPPY +  OffsetY)
    nRet = CombineRgn(HolderRegion, ResultRegion, ResultRegion,  RGN_COPY)
    nRet = CombineRgn(ResultRegion, HolderRegion, ObjectRegion,  4)
    DeleteObject ObjectRegion
'!3,187,349,368,205,0,0,3
     ObjectRegion = CreateEllipticRgn(349 * ScaleX * 15 / STPPX + OffsetX, 187 *  ScaleY * 15 / STPPY + OffsetY, 368 * ScaleX * 15 / STPPX + OffsetX, 205 * ScaleY  * 15 / STPPY + OffsetY)
    nRet = CombineRgn(HolderRegion, ResultRegion,  ResultRegion, RGN_COPY)
    nRet = CombineRgn(ResultRegion, HolderRegion,  ObjectRegion, 4)
    DeleteObject  ObjectRegion
'!3,180,344,377,213,0,0,2
    ObjectRegion =  CreateEllipticRgn(344 * ScaleX * 15 / STPPX + OffsetX, 180 * ScaleY * 15 / STPPY  + OffsetY, 377 * ScaleX * 15 / STPPX + OffsetX, 213 * ScaleY * 15 / STPPY +  OffsetY)
    nRet = CombineRgn(HolderRegion, ResultRegion, ResultRegion,  RGN_COPY)
    nRet = CombineRgn(ResultRegion, HolderRegion, ObjectRegion,  3)
    DeleteObject ObjectRegion
'!3,178,444,484,209,0,0,2
     ObjectRegion = CreateEllipticRgn(444 * ScaleX * 15 / STPPX + OffsetX, 178 *  ScaleY * 15 / STPPY + OffsetY, 484 * ScaleX * 15 / STPPX + OffsetX, 209 * ScaleY  * 15 / STPPY + OffsetY)
    nRet = CombineRgn(HolderRegion, ResultRegion,  ResultRegion, RGN_COPY)
    nRet = CombineRgn(ResultRegion, HolderRegion,  ObjectRegion, 3)
    DeleteObject ObjectRegion
    DeleteObject  HolderRegion
    CreateFormRegion = ResultRegion
End Function
Private  Sub Command1_Click()
Me.Hide
Form1.Show
End Sub
Private Sub  Form_Load()
   Dim  nRet As Long
    nRet = SetWindowRgn(Me.hWnd, CreateFormRegion(1, 1, 0, 0),  True)
    'If the above two lines are modified or moved a second copy  of
    'them may be added again if the form is later Modified by  VBSFC.
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As  Integer, X As Single, Y As Single)
'Next  two lines enable window drag from anywhere on form.  Remove them
'to allow  window drag from title bar only.
    ReleaseCapture
    SendMessage  Me.hWnd, &HA1, 2, 0&
End Sub
Private Sub Form_Unload(Cancel As  Integer)
    DeleteObject ResultRegion
    'If the above line is modified or moved a  second copy of it
    'may be added again if the form is later Modified by  VBSFC.
End Sub

ثم اضغط على F5
وشوف العجب
(يظهر لك شكل...... ها ها ها)
جرب  وشووووووووووووووووووف
[/COLOR][/SIZE][/FONT][/FONT][/COLOR]


د.رحب

  • Newbie
  • *
    • مشاركة: 48
    • مشاهدة الملف الشخصي
    • البريد الالكتروني
رد #1 في: كانون الثاني 30, 2009, 09:49:45 صباحاً
مشكوووووووووووور


Ssoft

  • Hero Member
  • *****
    • مشاركة: 1410
    • مشاهدة الملف الشخصي
    • http://sabeur-academy.com
    • البريد الالكتروني
رد #2 في: كانون الثاني 30, 2009, 11:05:30 صباحاً
thank'sss


achraf.mouni

  • Hero Member
  • *****
    • مشاركة: 2439
    • مشاهدة الملف الشخصي
    • البريد الالكتروني
رد #3 في: كانون الثاني 30, 2009, 01:24:04 مسائاً
شكرا لمرورك الطيب


lucky girl

  • Hero Member
  • *****
    • مشاركة: 1151
    • مشاهدة الملف الشخصي
    • البريد الالكتروني
رد #4 في: كانون الثاني 30, 2009, 01:51:18 مسائاً
شكراااااااااا أبهرتني بمواضيعك الرائعة بارك الله فيك و جعلها في ميزان حسناتك


achraf.mouni

  • Hero Member
  • *****
    • مشاركة: 2439
    • مشاهدة الملف الشخصي
    • البريد الالكتروني
رد #5 في: كانون الثاني 30, 2009, 01:55:04 مسائاً
شكرا لمرورك الطيب