تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] سؤال في الصور
#1
السلام عليكم أنا عاوز كود كتابه علي الصور بلون معاكس للون الخلفيه أو لون أنا اختاره عن طريق rgb؟
الرد }}}
تم الشكر بواسطة:
#2
و عليكم السلام ورحمة الله و بركاته
عدل على الكود التالي (لا تقم بتجربته قبل التعديل)
PHP كود :
       PictureBox1.CreateGraphics().DrawString(TextBox1.TextTextBox1.FontBrushes.Red, New PointF(00)) 
PictureBox1 = مربع صورة يحتوي صورة.
TextBox1.Text = استبدلها باي نص
TexBox1.Font= استبدله باي فونت
Brushes.Red = استبدلها باي لون
و الاخير مكان النص استبدله باي صيغة
استخدم متغيرات تضبط قيمها بالاول ثم تسندها بدل الموجود(المهم لا تستخدم الكود قبل التعديل)
الرد }}}
#3
مثال بسيط حول اضافة ادوات تسمية الى مربع الصورة والتحكم باماكنها وقت التشغيل ويمكن التعديل واضافة المزيد 
المشروع مرفق

PHP كود :
Public Class Form1
    Dim i 
As Integer 0
    Dim ax
ay As Integerdr As Boolean
    Private Sub lblmouseenter
(sender As ObjectAs EventArgs)
 
       Dim l As Label DirectCast(senderLabel)
 
       l.Cursor Cursors.SizeAll
    End Sub
    Private Sub lblmouseleave
(sender As ObjectAs EventArgs)
 
       Dim l As Label DirectCast(senderLabel)
 
       l.Cursor Cursors.Default
 
   End Sub
    Private Sub lblmousedown
(sender As ObjectAs MouseEventArgs)
 
       Dim l As Label DirectCast(senderLabel)
 
       If e.Button MouseButtons.Left Then
            dr 
True
            ax 
MousePosition.l.Left
            ay 
MousePosition.l.Top
        End 
If
 
   End Sub
    Private Sub lblmousemove
(sender As ObjectAs MouseEventArgs)
 
       Dim l As Label DirectCast(senderLabel)
 
       If dr Then
            l
.Left MousePosition.ax
            l
.Top MousePosition.ay
        End 
If
 
   End Sub
    Private Sub lblmouseup
(sender As ObjectAs MouseEventArgs)
 
       dr False
    End Sub
    Private Sub Button2_Click
(sender As ObjectAs EventArgsHandles Button2.Click
        Dim sfd 
As New SaveFileDialog
        sfd
.Filter "Png|*.Png"
 
       If sfd.ShowDialog DialogResult.OK Then
            Dim w 
As Integer = (PictureBox1.Width)
 
           Dim h As Integer = (PictureBox1.Height)
 
           Dim bmp As New Bitmap(wh)
 
           Dim g As Graphics Graphics.FromImage(bmp)
 
           Dim n As New Point(00)
 
           Dim s As New Size(bmp.Widthbmp.Height)
 
           g.CopyFromScreen(PictureBox1.PointToScreen(n), ns)
 
           bmp.Save(sfd.FileNameSystem.Drawing.Imaging.ImageFormat.Png)
 
       End If
 
   End Sub
    Private Sub Button1_Click
(sender As ObjectAs EventArgsHandles Button1.Click
        Dim lbl 
As New Label
        lbl
.Name "lbl" i
        lbl
.Font TextBox1.Font
        lbl
.AutoSize True
        lbl
.Text TextBox1.Text
        lbl
.ForeColor TextBox1.ForeColor
        AddHandler lbl
.MouseDownAddressOf lblmousedown
        AddHandler lbl
.MouseMoveAddressOf lblmousemove
        AddHandler lbl
.MouseUpAddressOf lblmouseup
        AddHandler lbl
.MouseEnterAddressOf lblmouseenter
        AddHandler lbl
.MouseLeaveAddressOf lblmouseleave
        
' PictureBox1.CreateGraphics().DrawString(TextBox1.Text, TextBox1.Font, Brushes.Red, New PointF((PictureBox1.Width / 2), 0))
        ' 
 PictureBox1.CreateGraphics().Drawo(TextBox1.TextTextBox1.FontBrushes.Red, New PointF((PictureBox1.Width 2), 0))
 
       PictureBox1.Controls.Add(lbl)
 
       i += 1
    End Sub
End 
Class 


الملفات المرفقة
.zip   App1.zip (الحجم : 11.92 ك ب / التحميلات : 6)
الرد }}}
#4
كفو عليك أستاذ سعود
أنت دائما متألق ومعلوماتك البرمجية متجددة ما شاء الله
الله يعطيك الصحة والعافية
الرد }}}
تم الشكر بواسطة: asmarsou , حسن الجلب
#5
حضرتك أنا معايا كود زي ده انا عملته ولكن هنا أنا عاوز لون أنا اختاره عن طريق rgb وهذا الكود لا يدعم هذه الخاصيه
الرد }}}
تم الشكر بواسطة:



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


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