الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

التعامل مع ال Clipboard كيف؟

مغلق
بدأه حمزة في 7 يوليو 2004 · 2 رد · 608 مشاهدة · في Microsoft Visual Basic.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

كيف يمكن التعامل مع الـClipboard, كالإستعمالها للحفظ المؤقت واسترجاع المعلومات منها.

بالطبع أيضاً كيف يمكن تمييز نوع الموجود في ال Clipboard إذا كان صورة أو نص؟

اقتباس
How to get experience without a job, and how to get a job without experience
#2
Private Sub button1_Click(sender As Object, e As System.EventArgs)
    ' Takes the selected text from a text box and puts it on the clipboard.
    If textBox1.SelectedText <> "" Then
        Clipboard.SetDataObject(textBox1.SelectedText)
    Else
        textBox2.Text = "No text selected in textBox1"
    End If
End Sub 'button1_Click

Private Sub button2_Click(sender As Object, e As System.EventArgs)
    ' Declares an IDataObject to hold the data returned from the clipboard.
    ' Retrieves the data from the clipboard.
    Dim iData As IDataObject = Clipboard.GetDataObject()
    
    ' Determines whether the data is in a format you can use.
    If iData.GetDataPresent(DataFormats.Text) Then
        ' Yes it is, so display it in a text box.
        textBox2.Text = CType(iData.GetData(DataFormats.Text), String)
    Else
        ' No it is not.
        textBox2.Text = "Could not retrieve data off the clipboard."
    End If
End Sub 'button2_Click

من ال MSDN

http://msdn.microsoft.com/library/default....dclasstopic.asp

راكان الحنيطي

Be Open Source

opensource-550x4752.gif

#3

شكرا أخ راكان الحنيطي

اقتباس
How to get experience without a job, and how to get a job without experience

هذا الموضوع مغلق.

مواضيع مشابهة