تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
صنع رأس للصفحة (هيدر)
#8
Osama_Ghareeb كتب :ضعي كل الأدوات التي ستظهر في الصورة في Panel واحد

ثم إستخدمي الأمر التالي :
كود :
Dim Img As New Bitmap([color=#ff0000]Panel1[/color].Width, [color=#ff0000]Panel1[/color].Height)
        Dim Save As New SaveFileDialog
        Save.Filter = "PNG Image|*.png"
        [color=#ff0000]Panel1[/color].DrawToBitmap(Img, New Rectangle(0, 0, [color=#ff0000]Panel1[/color].Width, [color=#ff0000]Panel1[/color].Height))
        If Save.ShowDialog = Windows.Forms.DialogResult.OK Then
            Img.Save(Save.FileName, Imaging.ImageFormat.Png)
        End If

بالتوفيق

شكرا تم تجربة الكود لكن لا تظهر النصوص التي بداخد اداة richtext



وقد وجدت كود في الانتر نت يقوم بالكتابة على صورة

PHP كود :
Public Class Form1
    Dim Graph 
As Graphics
    Dim Drawbitmap 
As Bitmap
    Dim Brush 
As New Drawing.SolidBrush(Color.Black)

    Private 
Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles MyBase.Load

    End Sub

    
Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button1.Click
        Dim dlg 
As New FontDialog
        
If dlg.ShowDialog Windows.Forms.DialogResult.OK Then
            RichTextBox1
.Font dlg.Font
        End 
If

    
End Sub

    
Private Sub Button2_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button2.Click
        Dim dlg 
As New ColorDialog
        
If dlg.ShowDialog Windows.Forms.DialogResult.OK Then
            Brush
.Color dlg.Color
            RichTextBox1
.ForeColor dlg.Color
        End 
If
    
End Sub

    
Private Sub RichTextBox1_TextChanged(ByVal sender As System.ObjectByVal e As System.EventArgsHandles RichTextBox1.TextChanged
        Drawbitmap 
= New Bitmap(PictureBox1.WidthPictureBox1.Height)
        
Graph Graphics.FromImage(Drawbitmap)
        
PictureBox1.Image Drawbitmap
        Graph
.SmoothingMode Drawing2D.SmoothingMode.HighQuality
        Graph
.DrawString(RichTextBox1.TextRichTextBox1.FontBrushPictureBox1.Location)

    
End Sub
End 
Class




'You can add save code, if ya want the codes for save, here it is:

'    
Dim dlg As New SaveFileDialog
'dlg.Filter = "Bitmap|*.bmp"
'
If dlg.ShowDialog Windows.Forms.DialogResult.OK Then
'PictureBox1.Image.Save(dlg.FileName)
'
End If 
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
صنع رأس للصفحة (هيدر) - بواسطة Sajad - 04-12-12, 06:38 PM
صنع رأس للصفحة (هيدر) - بواسطة Osama_Ghareeb - 04-12-12, 09:56 PM
صنع رأس للصفحة (هيدر) - بواسطة Sajad - 04-12-12, 10:01 PM
صنع رأس للصفحة (هيدر) - بواسطة فاتن_mybb_import4820 - 04-12-12, 11:40 PM
صنع رأس للصفحة (هيدر) - بواسطة Osama_Ghareeb - 05-12-12, 04:30 PM
صنع رأس للصفحة (هيدر) - بواسطة Osama_Ghareeb - 05-12-12, 06:36 PM
صنع رأس للصفحة (هيدر) - بواسطة Osama_Ghareeb - 06-12-12, 12:19 AM
صنع رأس للصفحة (هيدر) - بواسطة midosoft - 05-04-13, 04:56 PM

المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  [سؤال] كيف نطبق عملية حفظ باسم للصفحة سعود 8 4,253 27-10-13, 02:52 PM
آخر رد: سعود

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


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