تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] شباب سؤال حول splash screen بها مؤثرات لمربعات النصوص والصور
#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 ك ب / التحميلات : 73)
الرد }}}
تم الشكر بواسطة: العزابي , raoe-041


الردود في هذا الموضوع
RE: شباب سؤال حول splash screen بها مؤثرات لمربعات النصوص والصور - بواسطة silverlight - 31-05-15, 01:34 AM

المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  سؤال عن الاسمبلي و النيم سبيس justforit 0 118 07-12-25, 12:28 AM
آخر رد: justforit
  فائدة بخصوص التعامل مع علامات التنصيص مع {سؤال} justforit 4 294 02-11-25, 11:19 PM
آخر رد: justforit
  [نقاش] سؤال MetoDas 2 1,497 20-04-25, 10:21 PM
آخر رد: Kamil
  [سؤال] سؤال ترددت قبل نشرة:طابعة الباركود لماذا تطبع أكثر من ليبل فارغ قبل السليم dr.programming 1 517 20-04-25, 09:26 PM
آخر رد: Kamil
  سؤال لو سمحتم احبتى فى الله خالد كامل1 4 814 09-02-25, 12:02 AM
آخر رد: princelovelorn
  سؤال واستفسار خالد كامل1 1 409 04-02-25, 09:31 PM
آخر رد: aliday03
  سؤال فى تقرير كريستال خالد كامل1 0 402 04-02-25, 05:50 AM
آخر رد: خالد كامل1
Question [VB.NET] هناك سؤال يهم كل مبرمج الماذا برنامجك يظهر على بعض الشاشات اكثر دقه بشكل مصغر ومشوه Microformt 0 451 01-02-25, 03:48 PM
آخر رد: Microformt
  [سؤال] سؤال في الكونسول justforit 1 372 21-12-24, 02:57 PM
آخر رد: aljzazy
  سؤال عن طريقة التعامل مع الفاصلة العشرية المتألق9 2 527 28-09-24, 04:45 PM
آخر رد: المتألق9

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


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