منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : برنامج بدون اي شي
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
السلام عليكم اخواني الكرام انا احتاج ان اقوم بصنع برنامج بدون نافذه فقط عند فتحه يعمل المطلوب
visual studiou 2010 express
وشكرااااااا
الكود التالي يوضح أحد الأفكار لتنفيذ ما تريده
أضف الكلاس لمشروعك
واستخدمه كما يحلو لك

كود :
Public Class SpyForm
  Inherits Form

  Public Sub New()
      Me.InitializeForm()
  End Sub

  Private Sub InitializeForm()

      ' set both back color and transparencykey to while color
      MyBase.BackColor = Color.White
      MyBase.TransparencyKey = Color.White

      ' do not show the form in task bar
      MyBase.ShowInTaskbar = False
      ' set the startposition to manual
      MyBase.StartPosition = FormStartPosition.Manual
      ' set the top most to true
      MyBase.TopMost = True

      ' set formborderystyle to non
      MyBase.FormBorderStyle = Windows.Forms.FormBorderStyle.None

      ' get the computer screen rectangle
      Dim rect As Rectangle = CType(Nothing, Rectangle)
      Dim devices As Screen() = Screen.AllScreens
      For i As Integer = 0 To devices.Length - 1
          Dim device As Screen = devices(i)
          rect = System.Drawing.Rectangle.Union(rect, device.Bounds)
      Next

      ' set the form bounds to screen rectangle
      MyBase.Bounds = rect

      ' set form double buffer
      MyBase.DoubleBuffered = True

      ' give a name to the form
      MyBase.Name = "SpyForm"

  End Sub

End Class
مثال سريع لكيفية الاستخدام من داخل اي فورم أخر

كود :
Dim sf as New SpyForm
sf.Show
ملحوظة:
بناء علي ما تريده من الفورم فإن الكود قد يحتاج الي بعض التعديلات ليتناسب مع الهدف الذي تريده