20-07-17, 11:34 AM
(آخر تعديل لهذه المشاركة : 20-07-17, 11:48 AM {2} بواسطة silverlight.)
الكود التالي يوضح أحد الأفكار لتنفيذ ما تريده
أضف الكلاس لمشروعك
واستخدمه كما يحلو لك
مثال سريع لكيفية الاستخدام من داخل اي فورم أخر
ملحوظة:
بناء علي ما تريده من الفورم فإن الكود قد يحتاج الي بعض التعديلات ليتناسب مع الهدف الذي تريده
أضف الكلاس لمشروعك
واستخدمه كما يحلو لك
كود :
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بناء علي ما تريده من الفورم فإن الكود قد يحتاج الي بعض التعديلات ليتناسب مع الهدف الذي تريده
Retired

