Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0System.Windows.forms.Clipboard not operational with DNN ??System.Windows.forms.Clipboard not operational with DNN ??
Previous
 
Next
New Post
8/11/2008 12:05 PM
 

Hello,

I try to retrieve Print screen when I click on a button in my personal module. 

With DNN, the clipboard is empty

With a normal asp.net project, the clipboard contains my bitmap.

Is it due to the security settings ?

----------------

This is my source code :


        Public Sub lkPasteScreenshot_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lkPasteScreenshot.Click

            Dim cbThread As New Thread(New ThreadStart(AddressOf PasteClipboard))
            cbThread.SetApartmentState(ApartmentState.STA)
            cbThread.Start()
            cbThread.Join()


        End Sub


        Public Sub PasteClipboard()

            Dim d As System.Windows.forms.IDataObject = System.Windows.forms.Clipboard.GetDataObject()

            If (d.GetDataPresent(System.Windows.forms.Dataformats.Bitmap)) Then

'-------------------- NO ENTRY HERE WITH DNN ! ------------------

                Dim TmpImage As String = "DesktopModules\HDE\Uploads\tmp_Screenshot.jpeg"
                Dim bmp As System.Drawing.Bitmap = CType(d.GetData(System.Windows.forms.Dataformats.Bitmap), System.Drawing.Bitmap)
                bmp.Save(Request.PhysicalApplicationPath & TmpImage)
                imgScreenshot.ImageUrl = "~/" & TmpImage.Replace("\", "/")
            Else
                lbErrorScreenshot.Text = "No print screen detected..."
            End If

        End Sub

 
New Post
8/13/2008 12:30 PM
 

I don't think you can capture client screen throgh internet yet. or else some ppl would be/should be really scared :)

 
New Post
8/18/2008 10:54 AM
 

Johnny, if you take time to create a new website and execute my small code above, you'll see it's possible to display your screen capture...

I searched, during a long time, the reason for which that does not work in a DNN module. I don't find anything but I think the security in web.config cause that.

If someone can help me to implement this correctly, it's very nice .

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0System.Windows.forms.Clipboard not operational with DNN ??System.Windows.forms.Clipboard not operational with DNN ??


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out