السلام عليكم
يا أخوان بقيت كود يخلي الفورم أول مايفتح يكون مكان مربع المسنجر
مربع المسنجر = (عندما يدخل احد للمسنجر )
تكفون ساعدوني
السلام عليكم
يا أخوان بقيت كود يخلي الفورم أول مايفتح يكون مكان مربع المسنجر
مربع المسنجر = (عندما يدخل احد للمسنجر )
تكفون ساعدوني
تم تعديل هذه المشاركة بواسطة crazy-man في 5 مارس 2006 في 16:48
علي ما اعتقد وكيف مافهمت عليك انك تريد الفورم شطله مثل الماسنجر يعني مستطيل طويل شويه
تعال لحدث form_loud
me.left=150
me.top=20
مثلا وهذا يجعل الارتفاع والعرض اول ماستغل البرنامج وبمكانك تجعله في اثناء التصميم
والله اعلم
اللهم انصر الاسلام والمسلمين

أخي أيمن عشبة
أنا قصدي المكان ألي يظهر فيه المربع وليس شكل المربع
وينكم ساعدوني تكفون
فيه موضوع يشرح الكلام دا
ابحث عنه
عموما غير مكان النموذج وخلي location=0,0
<span style='color:green'>سؤل ابن عباس عن علمه كيف جمعه فقال :( أوتيت لسانا سؤولا وقلبا عقولا)</span>
أوكي بس أنا أبي أعرف شلون أحطه مكان المسنجر
اذا كنت تستعمل visual bisac 2005
توجد component اسمها notifyicon
وهي سهلة جدا في الاستخدام
notifyicon موجودة 2003
بس أنا قصدي لما تفتح المسنجر تطلع لك نافذة تعلمك لعدد الرسائل الغير مقروءة
أنا أريد أن أضع فورم في نفس مكان النافذة
إنزين أنا عندي 2005
شلون
السلام عليكم ورحمة الله
قبل كل شي ابغ دعوة بالتوفيق ...
خذ هذا الكود...
'قم بنسخ ولصق هذا الكود في الفورم
'----------------------
Public Class frmMessage
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents timerShowMessage As System.Windows.Forms.Timer
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents btnCloseMessage As System.Windows.Forms.Button
Friend WithEvents lblTitle As System.Windows.Forms.Label
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents lblMessage As System.Windows.Forms.Label
Friend WithEvents TimerHideMessag As System.Windows.Forms.Timer
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMessage))
Me.timerShowMessage = New System.Windows.Forms.Timer(Me.components)
Me.Panel1 = New System.Windows.Forms.Panel
Me.lblTitle = New System.Windows.Forms.Label
Me.btnCloseMessage = New System.Windows.Forms.Button
Me.PictureBox1 = New System.Windows.Forms.PictureBox
Me.lblMessage = New System.Windows.Forms.Label
Me.TimerHideMessag = New System.Windows.Forms.Timer(Me.components)
Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'timerShowMessage
'
Me.timerShowMessage.Interval = 65
'
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.White
Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.Panel1.Controls.Add(Me.lblMessage)
Me.Panel1.Controls.Add(Me.PictureBox1)
Me.Panel1.Controls.Add(Me.btnCloseMessage)
Me.Panel1.Controls.Add(Me.lblTitle)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1"
Me.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes
Me.Panel1.Size = New System.Drawing.Size(320, 109)
Me.Panel1.TabIndex = 0
'
'lblTitle
'
Me.lblTitle.BackColor = System.Drawing.Color.Gainsboro
Me.lblTitle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.lblTitle.Dock = System.Windows.Forms.DockStyle.Top
Me.lblTitle.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.lblTitle.ForeColor = System.Drawing.Color.Blue
Me.lblTitle.Location = New System.Drawing.Point(0, 0)
Me.lblTitle.Name = "lblTitle"
Me.lblTitle.Size = New System.Drawing.Size(318, 24)
Me.lblTitle.TabIndex = 3
Me.lblTitle.Text = "Arab Team 2000"
Me.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'btnCloseMessage
'
Me.btnCloseMessage.BackColor = System.Drawing.SystemColors.Control
Me.btnCloseMessage.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.btnCloseMessage.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.btnCloseMessage.ForeColor = System.Drawing.Color.White
Me.btnCloseMessage.Location = New System.Drawing.Point(0, 1)
Me.btnCloseMessage.Name = "btnCloseMessage"
Me.btnCloseMessage.Size = New System.Drawing.Size(24, 21)
Me.btnCloseMessage.TabIndex = 2
Me.btnCloseMessage.Text = "X"
'
'PictureBox1
'
Me.PictureBox1.Dock = System.Windows.Forms.DockStyle.Right
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
Me.PictureBox1.Location = New System.Drawing.Point(267, 24)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(51, 83)
Me.PictureBox1.TabIndex = 4
Me.PictureBox1.TabStop = False
'
'lblMessage
'
Me.lblMessage.Dock = System.Windows.Forms.DockStyle.Fill
Me.lblMessage.Location = New System.Drawing.Point(0, 24)
Me.lblMessage.Name = "lblMessage"
Me.lblMessage.Size = New System.Drawing.Size(267, 83)
Me.lblMessage.TabIndex = 5
Me.lblMessage.Text = "Label1"
'
'TimerHideMessag
'
'
'frmMessage
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14)
Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(192, Byte), CType(192, Byte))
Me.ClientSize = New System.Drawing.Size(320, 109)
Me.Controls.Add(Me.Panel1)
Me.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(178, Byte))
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "frmMessage"
Me.ShowInTaskbar = False
Me.Text = "frmMessage"
Me.Panel1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Dim screenWorkingArea As Rectangle
Private Sub frmMessage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
screenWorkingArea = System.Windows.Forms.Screen.GetWorkingArea(New Point(0, 0))
Me.Location = New Point(screenWorkingArea.Width - Me.Width, screenWorkingArea.Height)
timerShowMessage.Enabled = True
End Sub
Public Title As String
Public Message As String
Public Shadows Sub Show(ByVal Message As String, ByVal Title As String, ByVal TimeOut As Integer)
Me.Title = Title
lblTitle.Text = Title
lblMessage.Text = Message
Me.Message = Message
TimerHideMessag.Interval = TimeOut * 1000
MyBase.Show()
TimerHideMessag.Start()
End Sub
Private Sub timerShowMessage_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerShowMessage.Tick
If Me.Location.Y <= (screenWorkingArea.Height - Me.Height) Then
timerShowMessage.Enabled = False
Exit Sub
End If
Me.Location = New Point(Me.Location.X, Me.Location.Y - 10)
End Sub
Private CloseNow As Boolean = False
Private Sub btnCloseMessage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCloseMessage.Click
Me.Close()
End Sub
Private Sub TimerHideMessag_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerHideMessag.Tick
If CloseNow = False Then
CloseNow = True
Else
Me.Close()
End If
End Sub
Private Shadows Sub Close()
For i As Integer = Me.Height To 0
Me.Location = New Point(Me.Location.X, Me.Location.Y + 10)
Threading.Thread.Sleep(1000)
Next
MyBase.Close()
End Sub
End Classأخوي الله يعطيك العافية
بس يا أخوي ترا الكود ما ضبط يقولولي ان error bulide
السلام عليكم ورحمة الله وبركاته
آسفة اخوي على التأخير بس كان عندي مشكلة في البراوزر والحمدلله اتحلت المشكلة
المهم:
انا أتوقع أنه عندك الدوت نت 2005 لان انا جربتها في 2003 ومشي الحال بس لمن جربتها على 2005 طلعلي نفس الخطأ إلي جاك
بس لمن فتحت البرنامج القديم على 2005 اشتغل
عاد خذه انت وجربه وان شاء الله يمشي الحال
راح تجيك نافذه فيها تكست بوكس اكتب فيها اي شي واضغط الBtn وشوف ايش يصير
وادعيلي ان يساعدني احد في مشكلتي
في امان الله
تم تعديل هذه المشاركة بواسطة samsor في 10 مارس 2006 في 18:14
الله يعطيك العافية أخوي
هذا الموضوع مغلق.
المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية
جارٍ التحقق من المتواجدين…