08-02-13, 04:48 PM
بسم الله الرحمن الرحيم
أخي الكريم بارك الله فيك وجزاك الله خيرا
كل مااريده هو تحويل الكود من vba الى vb.net
الكود التالي
أخي الكريم بارك الله فيك وجزاك الله خيرا
كل مااريده هو تحويل الكود من vba الى vb.net
الكود التالي
كود :
Public Sub AddPictureStyles()
Dim WdSelection As Selection
Dim WdInlineShape As InlineShape
Dim WdShape As Shape
Set WdSelection = Application.ActiveWindow.Selection
Set WdInlineShape = WdSelection.InlineShapes.AddPicture("C:\Users\username\Pictures\portrait.jpg")
Set WdShape = WdInlineShape.ConvertToShape
' Set the color type
WdShape.PictureFormat.ColorType = msoPictureAutomatic
' Set the reflection type
WdShape.Reflection.Type = msoReflectionType2
' Set the frame shape to oval
WdShape.AutoShapeType = msoShapeOval
WdShape.Line.Style = msoLineThickBetweenThin
WdShape.Line.Weight = 10
' Set the artistic picture effect
WdShape.Fill.PictureEffects.Insert (msoEffectPlasticWrap)
' Set the size and color of the frame extrusion
WdShape.ThreeD.SetThreeDFormat (msoThreeD2)
WdShape.ThreeD.ExtrusionColor = RGB(Red:=255, Green:=28, Blue:=0)
' Set the shape rotation and perspective
WdShape.ThreeD.RotationX = 35
WdShape.ThreeD.RotationY = 8
WdShape.ThreeD.RotationZ = 357
WdShape.ThreeD.Perspective = msoTrue
End Sub