Screen Recorder in .NET 3.0

Discussion in 'Archives' started by Flaming Idiots, Mar 4, 2007.

Thread Status:
Not open for further replies.
Screen Recorder in .NET 3.0
  1. Unread #21 - Mar 15, 2007 at 12:55 PM
  2. ray230
    Referrals:
    0

    ray230 Guest

    Screen Recorder in .NET 3.0



    How did you get it to work?


    Give me your code that you used please.


    Thank you.
     
  3. Unread #22 - Mar 16, 2007 at 2:08 AM
  4. X Zero
    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0

    X Zero Forum Addict

    Screen Recorder in .NET 3.0

    Plain and simple

     
  5. Unread #23 - Mar 16, 2007 at 10:50 PM
  6. ray230
    Referrals:
    0

    ray230 Guest

    Screen Recorder in .NET 3.0


    Look at Ln 32 Col 19

    I can't get it to work.
     
  7. Unread #24 - Apr 4, 2007 at 4:39 PM
  8. kharg0
    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0

    kharg0 Active Member

    Screen Recorder in .NET 3.0

    hope fully some 1 can help me out

    #1 Warning 1 property 'Bounds' shadows an overloadable member declared in the base class 'Control'. If you want to overload the base method, this method must be declared 'Overloads'.

    #2 Error 2 Name 'Forms' is not declared.

    #3 Error 3 Type 'Windows.Media.Imaging.GifBitmapEncoder' is not defined.

    #4Error 4 'BitmapFrame' is not a member of 'Imaging'.


    plz help thx
     
  9. Unread #25 - Apr 4, 2007 at 6:30 PM
  10. X Zero
    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0

    X Zero Forum Addict

    Screen Recorder in .NET 3.0

    Have u got?

    * .NET 3.0 installed on the computer using this.
    * WPF Extensions for VS 2005
     
  11. Unread #26 - Apr 4, 2007 at 6:33 PM
  12. kharg0
    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0

    kharg0 Active Member

    Screen Recorder in .NET 3.0

    ya i clicked them downloaded them installed them but nothing changed whatsoever it says i downloaded them and installed but like when i make new it doesnt have that collum thing at the right as shown in his picture the one in his kinda tut
     
  13. Unread #27 - Apr 5, 2007 at 2:44 AM
  14. X Zero
    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0

    X Zero Forum Addict

    Screen Recorder in .NET 3.0

    u need to add a from to the project
     
  15. Unread #28 - Apr 5, 2007 at 8:23 AM
  16. kharg0
    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0

    kharg0 Active Member

    Screen Recorder in .NET 3.0

    thats a dumb thing to say lol of course i followed the instructions and so far i fixed 1 problem
     
  17. Unread #29 - Apr 5, 2007 at 8:16 PM
  18. X Zero
    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0

    X Zero Forum Addict

    Screen Recorder in .NET 3.0

    sorry, had to find out.
     
  19. Unread #30 - Apr 6, 2007 at 10:04 AM
  20. kharg0
    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0

    kharg0 Active Member

    Screen Recorder in .NET 3.0

    its ok but i fixed up your code except i got the same problem i cant make it save correctly...

    Code:
    Public Class ScreenRecorder
    
        Private Shared tempDir As String = My.Computer.FileSystem.SpecialDirectories.Temp & "\snapshot\"
        Private Shared snap As New System.Threading.Thread(AddressOf Snapshot)
        Private Shared _Bounds As System.Drawing.Rectangle = System.Windows.Forms.Screen.PrimaryScreen.Bounds
        Public Shared Property Bounds() As System.Drawing.Rectangle
            Get
                Return _Bounds
            End Get
            Set(ByVal value As System.Drawing.Rectangle)
                _Bounds = value
            End Set
        End Property
        Private Shared Sub Snapshot()
            If Not My.Computer.FileSystem.DirectoryExists(tempDir) Then _
            My.Computer.FileSystem.CreateDirectory(tempDir)
            Dim Co As Integer = 0
            Do
                Co += 1
                System.Threading.Thread.Sleep(50)
                Dim X As New System.Drawing.Bitmap(_Bounds.Width, _Bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
                Using G = System.Drawing.Graphics.FromImage(X)
                    G.CopyFromScreen(_Bounds.Location, New System.Drawing.Point(), _Bounds.Size)
                    Dim CurBounds As New System.Drawing.Rectangle(System.Windows.Forms.Cursor.Position - Bounds.Location, System.Windows.Forms.Cursor.Current.Size)
                    Windows.Forms.Cursors.Default.Draw(G, CurBounds)
                End Using
                Dim FS As New IO.FileStream(tempDir & FormatString(Co.ToString, 5, "0"c) & ".Gif", IO.FileMode.OpenOrCreate)
                X.Save(FS, System.Drawing.Imaging.ImageFormat.Gif)
                X.Dispose()
                FS.Close()
            Loop
        End Sub
        Public Shared Sub ClearRecording()
            If My.Computer.FileSystem.DirectoryExists(tempDir) Then _
            My.Computer.FileSystem.DeleteDirectory(tempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
            My.Computer.FileSystem.CreateDirectory(tempDir)
        End Sub
        Public Shared Sub Save(ByVal Output As String)
    
            Dim X As New List(Of IO.FileStream)
            For Each Fi As String In My.Computer.FileSystem.GetFiles(tempDir, FileIO.SearchOption.SearchTopLevelOnly, "*.png")
                Dim TempStream As New IO.FileStream(Fi, IO.FileMode.Open)
            Next
            Dim FS As New IO.FileStream(Output, IO.FileMode.Create)
    
            For Each St As IO.FileStream In X
                St.Close()
    
            Next
    
        End Sub
        Public Shared Sub Start()
            snap = New System.Threading.Thread(AddressOf Snapshot)
            snap.Start()
        End Sub
        Public Shared Sub [Stop]()
            snap.Abort()
        End Sub
        Private Shared Function FormatString(ByVal S As String, ByVal places As Integer, ByVal character As Char) As String
            If S.Length >= places Then Return S
            For X As Integer = S.Length To places
                S = character & S
            Next
            Return S
        End Function
    
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            ScreenRecorder.Start()
            Me.Button1.Enabled = False
            Me.Button3.Enabled = False
            Me.Button4.Enabled = False
            Me.Button5.Enabled = False
            Me.WindowState = FormWindowState.Minimized
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            ScreenRecorder.Stop()
            Me.Button1.Enabled = True
            Me.Button3.Enabled = True
            Me.Button4.Enabled = True
            Me.Button5.Enabled = True
        End Sub
    
        Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
            ScreenRecorder.Save("")
        End Sub
    
        Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
            ScreenRecorder.Bounds = New System.Drawing.Rectangle(300, 300, 500, 300)
        End Sub
    
        Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
            ScreenRecorder.ClearRecording()
        End Sub
    
        Private Sub ScreenRecorder_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
        End Sub
        Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
            If e.KeyChar = Chr(Asc("S")) Then
                Me.WindowState = FormWindowState.Maximized
                ScreenRecorder.Stop()
                Me.Button1.Enabled = True
                Me.Button3.Enabled = True
                Me.Button4.Enabled = True
                Me.Button5.Enabled = True
            End If
        End Sub
    End Class
    need:5 buttons

    start,stop,recording boundaries,save,and erase last video

    Start name = button1
    Stop name = button2
    Recording Boundaries = button3
    Erase Video = button4
    Save = button5

    so far ive got this

    #1 when i press set recording boundaries nuttin happens
    #2 when i save this happens

    line 46 says Empty path name is not legal.
     
  21. Unread #31 - Apr 6, 2007 at 10:47 PM
  22. X Zero
    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0

    X Zero Forum Addict

    Screen Recorder in .NET 3.0

    This is your problem ^

    try ^^
     
  23. Unread #32 - Apr 8, 2007 at 7:38 PM
  24. kharg0
    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0

    kharg0 Active Member

    Screen Recorder in .NET 3.0

    i think it works but where does it save ?k got it nvm but i cant figure out like .png .avi wat gif doesnt work??
     
  25. Unread #33 - Apr 9, 2007 at 6:24 PM
  26. X Zero
    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0

    X Zero Forum Addict

    Screen Recorder in .NET 3.0

    To save with .avi or .wmv you will have to find a encoder for it. This program includes a .gif encoder and will only work with .gif. i don't think it works with the windows image viewer. Upload it to imageshack and it will work
     
  27. Unread #34 - Apr 28, 2007 at 7:32 AM
  28. FinPker
    Referrals:
    0

    FinPker Guest

    Screen Recorder in .NET 3.0

    Error 1 Name 'Forms' is not declared.
    Error 2 Type 'Windows.Media.Imaging.GifBitmapEncoder' is not defined.
    Error 3 'BitmapFrame' is not a member of 'Imaging'.

    Uhm..
     
  29. Unread #35 - Apr 28, 2007 at 10:59 AM
  30. dodge
    Joined:
    Mar 26, 2007
    Posts:
    125
    Referrals:
    1
    Sythe Gold:
    5

    dodge Active Member
    Banned

    Screen Recorder in .NET 3.0

    you need to reference the follwing namespace

    System.Windows.Media.Imaging

    BitmapFrame and GifBitmapEncoder are part of it
     
  31. Unread #36 - Sep 11, 2007 at 8:44 PM
  32. notsocoolxp
    Referrals:
    0

    notsocoolxp Guest

    Screen Recorder in .NET 3.0

    some one should post a link to a .rar with the source files in it
     
  33. Unread #37 - Sep 11, 2007 at 9:02 PM
  34. notsocoolxp
    Referrals:
    0

    notsocoolxp Guest

    Screen Recorder in .NET 3.0

    I get the error Button1 is not a member of Screen_Recorder.ScreenRecorder

    whats this mean?
     
  35. Unread #38 - Sep 12, 2007 at 2:40 AM
  36. X Zero
    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0

    X Zero Forum Addict

    Screen Recorder in .NET 3.0

    That means that u don't have a button called "Button1" On the form.

    I think
     
  37. Unread #39 - Sep 12, 2007 at 10:39 AM
  38. notsocoolxp
    Referrals:
    0

    notsocoolxp Guest

    Screen Recorder in .NET 3.0

    No I have a button on the form
     
  39. Unread #40 - Sep 12, 2007 at 10:56 AM
  40. notsocoolxp
    Referrals:
    0

    notsocoolxp Guest

    Screen Recorder in .NET 3.0

    wait am I supposed to have a form(.vb) with buttons and a separate .xaml file with the screen recorder class
     
< CSS Camping | Did anything ever happen with the whole sigex issue? >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site