PDA

View Full Version : مبتدی: تغییر رنگ حاشیه های textboxهای روی فرم



milad.biroonvand
سه شنبه 28 مهر 1388, 08:08 صبح
این یک کده که حاشیه های جعبه متن ها رو قرمز می کنه ! کد های حرفای تر رو اینجا بزارین



Private Sub form1_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Handles MyBase.Paint
Dim g As Graphics = e.Graphics
Dim pen As New Pen(Color.Red, 5.0)
For Each ctr As Control In Me.Controls
If TypeOf ctr Is TextBox Then
g.DrawRectangle(pen, New _
Rectangle(ctr.Location, ctr.Size))
End If
Next
pen.Dispose()
End Sub

gilsoft
جمعه 09 دی 1390, 14:13 عصر
این یک کده که حاشیه های جعبه متن ها رو قرمز می کنه ! کد های حرفای تر رو اینجا بزارین



Private Sub form1_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Handles MyBase.Paint
Dim g As Graphics = e.Graphics
Dim pen As New Pen(Color.Red, 5.0)
For Each ctr As Control In Me.Controls
If TypeOf ctr Is TextBox Then
g.DrawRectangle(pen, New _
Rectangle(ctr.Location, ctr.Size))
End If
Next
pen.Dispose()
End Sub


چطور میشه این حاشیه رو بصورت گرادیانت (Gradient) رسم کرد ؟

morteza ashhar
چهارشنبه 19 مهر 1391, 23:01 عصر
سلام
اگه می تونین پاک کن وقلم پینت رو با سی شارپ خیلی خلاصه برام بزارید.
ممنون میشم.