تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] شباب سؤال حول splash screen بها مؤثرات لمربعات النصوص والصور
#1
بسم الله الرحمن الرحيم
السلام عليكم شباب هل من احد يساعدنى بعمل شاشة افتتاحية او splash screen
بتاثيرات لمربع النص والصور
بمعنى الصور تتحرك وايضا مربعات النصوص
يارب اذا اعطيتني علما...اعطني معه حكمه...واذا اعطيتني مالا....اعطيني معها كرما...واذا اعطيتني قوه...اعطني معها رحمه...واذا اعطيتني سلطه...اعطني معها عدلا...واذا اعطيتني مسئوليه...اعطيني معها امانه...واذا اعطيتني نجاحا...اعطني معها تواضعا...اللهم امين
الرد }}}
تم الشكر بواسطة:
#2
(30-05-15, 10:01 PM)احمد عبد الحكيم كتب : بسم الله الرحمن الرحيم
السلام عليكم شباب هل من احد يساعدنى بعمل شاشة افتتاحية او splash screen
بتاثيرات لمربع النص والصور
بمعنى الصور تتحرك وايضا مربعات النصوص

عليك أن تقوم بعمل Overrides للحدث Paint و ترسم به ما تريده يمكن مثلا ان تستخدم صورة متحركة و ترسمها بنفسك في نفس الحدث و يمكنك ان تفعل نفس الشئ بالنسبة للتكست
بالتاكيد يمكنك استخدام تايمر او استخدام التايمر الخاص ب Splssh Creen نفسها
الرد }}}
تم الشكر بواسطة:
#3
ممكن مشروع بسيط اخى العزيز به الفكرة
يارب اذا اعطيتني علما...اعطني معه حكمه...واذا اعطيتني مالا....اعطيني معها كرما...واذا اعطيتني قوه...اعطني معها رحمه...واذا اعطيتني سلطه...اعطني معها عدلا...واذا اعطيتني مسئوليه...اعطيني معها امانه...واذا اعطيتني نجاحا...اعطني معها تواضعا...اللهم امين
الرد }}}
تم الشكر بواسطة:
#4
عليك أن تضيف تايمر الي SplashScreen ثم اكتب الكود بالشكل التالي

انا اعتقد انه من الافضل لك ان يكون وقت التايمر اقل من وقت عرض Splash Screen علي الشاشة
ويمكن تحديد وقت عرض Splash Screen  علي الشاشة عن طريقة تغيير قيمة MinimumSplashScreenDisplayTime Property و هذا يتم من ApplicationEvent و يمكنك الوصول له من Properties الخاصة بالمشروع حيث ستجد باتون بجوار المكان الذي تحدد منه SplashScreen الخاصة بالمشروع

و شكل الكود الذ سيقوم بتغيير وقت عرض Splash Screen  علي الشاشة سيكون كالأتي:


كود :
Namespace My

   ' The following events are available for MyApplication:
   '
   ' Startup: Raised when the application starts, before the startup form is created.
   ' Shutdown: Raised after all application forms are closed.  This event is not raised if the application terminates abnormally.
   ' UnhandledException: Raised if the application encounters an unhandled exception.
   ' StartupNextInstance: Raised when launching a single-instance application and the application is already active.
   ' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
   Partial Friend Class MyApplication

       Protected Overrides Function OnInitialize(commandLineArgs As ObjectModel.ReadOnlyCollection(Of String)) As Boolean
           ' Set the display time to 5000 milliseconds (5 seconds).  
           Me.MinimumSplashScreenDisplayTime = 10000
           Return MyBase.OnInitialize(commandLineArgs)

       End Function
   End Class


End Namespace


و الكود التالي يوضح كيفية تحريك شكل هندسي عبارة عن كرة علي سطح Splash Screen Form


كود :
Imports System.Drawing.Drawing2D

Public NotInheritable Class SplashScreen1

   Private dia As Integer = 50
   Private angle As Integer = 0
   Private x As Integer
   Private y As Integer

   Private Sub SplashScreen1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
       Timer1.Interval = 1000
       Timer1.Start()
   End Sub

   Protected Overrides Sub OnPaint(e As PaintEventArgs)
       MyBase.OnPaint(e)

       e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
       Dim origin As New Point(ClientRectangle.Width / 2, ClientRectangle.Height / 2)

       Dim raduis As Integer = 120
       x = Math.Cos(angle) * raduis
       y = Math.Sin(angle) * raduis
       Dim ballPoint As Point = New Point(origin.X + x, origin.Y + y)
       Dim rect As Rectangle = New Rectangle(ballPoint.X - dia / 2, ballPoint.Y - dia / 2, dia, dia)
       Using lgb As New Drawing2D.LinearGradientBrush(rect, Color.Orange, Color.Black, 90)
           e.Graphics.FillEllipse(lgb, rect)
       End Using


   End Sub

   Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
       For increment = 0 To 360
           angle += increment
       Next
       Invalidate()
   End Sub

   

End Class

في المرفقات ستجد نسخة كاملة من الكود ...الملف مكتوب ببرنامج الفيجوال استوديو 2012


الملفات المرفقة
.rar   Test_SplashScreen.rar (الحجم : 71.14 ك ب / التحميلات : 69)
الرد }}}
تم الشكر بواسطة: العزابي , raoe-041



التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم