Hello is there anyway to capture a part of the screen and stream it too an application form via visual studio any help is appreciated Thanks!
|
.NET
Screen Capture |
|
Hi, yes there is a way to capture a part of the computer screen (you can look this up on Google on how you can do this). Although, I'm not sure what you mean by "stream it too an application form." Do you mean stream it to another form that is integrated into your project (e.g: you want to stream the specific part of the screen onto Form1.vb, Form2.vb, etc) or onto an external application?
(Mar 15, 2017 11:35 AM)ryanrl Wrote: Yes that's what i mean preview it live basically via a form :) If you want to achieve that you need to add a picture box control and a timer control to your form (which can both be found in the Visual Studio toolbox). Using the timer's tick event you can update a picture box's image at a specific interval. Here's an example code of what I mean. Code Public Class Form1The code above will update the picture box's image every 1 second with a screenshot of the computer screen. If you want to change how fast/slow the picture box should be updated, you have to change the interval speed of the timer. I think this should give you a general idea on how you can stream the computer screen to a form. Now all you need to do is figure out how to take a screenshot of the screen at specific coordinates. 👍
Mar 16, 2017 03:47 AM
(This post was last modified: Mar 16, 2017 03:48 AM by iNCEPTiON_V.)
Taking screenshots isn't going to give you much FPS.
If you really want good Streaming with Audio use my method. You could write a programm that starts VLC with arguments hidden i can give you my arguments that i have streamed with perfectly Stream Code // Better store each line in StringBuilder and on the Receiving end you could do the same or use https://github.com/ZeBobo5/Vlc.DotNet, // Receive Code private string receiveCommand => "--qt-start-minimized " +If used this before and it works like charm, VLC is completelly hidden you wont notice it unless you see it in the Taskmanager, this way you would get much more FPS depending on the Connection.
Thanks for the reply i have sorted it out now basically i used getwindow function to hook on applications Example ("runescape") then used Mouse up/down events to make a region to select areas of the given application.
The reason i wanted to do this was so i could minimize runescape with a movable overlay over fullscreen applications. example: Thanks for your help.🤝 (Mar 15, 2017 12:22 PM)My Computer Wrote: If you want to achieve that you need to add a picture box control and a timer control to your form (which can both be found in the Visual Studio toolbox). Using the timer's tick event you can update a picture box's image at a specific interval. You dont have to re-declare the size and such every time, do you? The screen size will not change each tick. (Mar 16, 2017 11:09 AM)Ninja Wrote: You dont have to re-declare the size and such every time, do you? The screen size will not change each tick. Well technically, the screen size could change after a tick (that is, if the user for some odd reason changed their resolution while the program was running). But I see what you mean because it would be really unlikely for the user to change their resolution while the program is running. This is what the picture box would look like if you kept the screen boundaries variables constant while the resolution on the screen has been changed to a lower one: Spoiler (Click to View) (Mar 16, 2017 12:39 PM)My Computer Wrote: Well technically, the screen size could change after a tick (that is, if the user for some odd reason changed their resolution while the program was running). But I see what you mean because it would be really unlikely for the user to change their resolution while the program is running.I bet you can just hook something and find out when the resolution changes. |
|
|




![[Image: 2JF2JJM.png]](https://i.imgur.com/2JF2JJM.png)