locked
VB.net remote print screen RRS feed

  • 問題

  •  

    Hi,

    I'm a newbie in programming and need some help.

    I need to make an application in VB.net which wiil capture remote screen. A type of client-server application.

    Can any body write me a short how to with samples how to do it??

     

    Regards

    Zbyszek

    2008年10月7日 17:53

解答

所有回覆

  • Well, first at all, you have to seperate it into few smaller task,

    1) Capture Screen in client

    2) Save it into memory/file

    3) Send it to server.

     

    The following link is a very good example shown in C#, you may try to import Win32 API to do so, You could try to read it first, if you cannot understand C#, please tell me and I could convert it into VB for you.

     

    http://www.c-sharpcorner.com/UploadFile/perrylee/ScreenCapture11142005234547PM/ScreenCapture.aspx

    2008年10月8日 19:28
  • Or you can base on Ken's sample and compile as a DLL, then import in your VB program, you don't need to convert it from C# to VB then.

    Unless you need to change the source code. Wink

     

    enjoy the power of .net

    2008年10月10日 1:09
  •  

    Refer to this link I use it too. But I cann't understand for this code. Could you convert this code to VB ?

     

    Thanks

     

    MoonGray, Student from Thailand 

    2008年10月30日 13:12
  • Like I mention in the last post, once you compile as a DLL, import into your project

     

    under the code in your button click

     

    Code Snippet

    Dim screenCapture As Example ' The class name Example in this "Example"

    Dim filePath As String = "c:\abc.jpg"

     

    screenCapture.CaptureScreen(filePath, ImageFormat.Jpeg)

     

     

     

     

    2008年10月31日 1:20
  • Right now, I build that code to a DLL file. But I cannot import it for using in my solution.

    Could you compile the code into the DLL file ?

    Sorry for asking many times.

     
    2008年10月31日 10:02
  • Dim isCompileSuccess As Boolean = DllProject.CompileTheCodeIntoDll()

     

    If Not isCompileSuccess Then

      If DllProject.Language = VB Then

        DllProject.Language = C#

     

        isCompileSuccess = DllProject.CompileTheCodeIntoDll()

      End If

    End If

     

    If (isCompileSuccess) Then

      ApplicationProject.RightClick.AddReference(DllProject.Result.Dll)

      ApplicationProject.ImportNameSpace(DllProject.Namespace)

      ApplicationProject.UseTheCode()

    End If

     

     

    Have Fun~

    • 已提議為解答 JoelMaths 2009年4月17日 14:57
    2008年11月1日 1:16