I'd like to create a simple remote desktop application (you can view the screen remotely and interact with it). As a first step, I've tried taking screenshots, 1 per second, compressing them to JPEG and sending them over (without interaction), but I've found that even over LAN this is very slow.
Do you have any hints on how to do this better? Is there C# sample code for projects like this?
You might consider looking at VNC's implementation. VNC is open source and does what you want. I know of an open-source .NET client for VNC:
http://dotnetvnc.sourceforge.net/
Hopefully this will give you some direction for your project.
Just-in-time idea, if you don`t want to use vnc - and want to implement this yourself (for learning, how to invent wheels, for example) - send not full screenshot, but changes from previous - somethins like *.avi format (I forgot details, but something like: one full card, 15 changes, one full card, 15 changes and so on).
Related
OK, I thought this was a fairly simple task, but apparently it isn't ...
I have a folder with +1000 photos in it. These are all photos taken with a camera, each about 3 MB. Users need to be able to view these pictures (as a list), rename or delete them. That's it.
A possible solution would be this control : ImageListView - CodeProject
but because it has an Apache license, we can't use it.
So how to do it? Any ideas or suggestions? I'm using .NET 2.0
.... EDIT : .....................................
OK, apparently we CAN use the Apache license. (Also see: https://stackoverflow.com/questions/1007338/can-i-use-a-library-under-the-apache-software-license-2-0-in-a-commercial-applic) However, using the license is very confusing for me. I read the following guide but still don't exactly know how to apply it to our project : http://blog.maestropublishing.com/how-to-apply-the-apache-20-license-to-your-pr
it says:
you need two files in the root or top directory of your distribution.
What's exactly meant by 'distribution'? Is that our installed application, and top directory meaning Program files/OurApp/ ?
It also says:
Replace all [bracketed] items in the above notice statement. There are only two of these items so should not be hard for you to do.
But that would give me a notice file, reading :
Copyright 2012 OUR_COMPANY
Licensed under the Apache License, etc...
But our app isn't licensed under the Apache license?
I'm sorry but I'm very confused and don't want to make any mistakes with this legal stuff...
What would I need to do exactly to be able to use this control?
Perhaps you need your own control for this task.
What i think is just a sketch of what i`d do in your place.
You need your own control with paging(to show only limited photos to user) or scroll-event-driven(to load photos on demand).
Perhaps you need some thumbnail generator.
Point is you probably face a huge pile of photos, so you cannot get them all in one time.
"Thats it" is not that simple.
For 1000+ that is over 3 GB.
Would need thumbnails for faster preview.
If users are going to access this files directly then they would need NTFS permission.
Maybe what you want.
What you are going to get into in locking problems.
If one user has a file open then you cannot rename or delete it.
I know you are not going to like this but to do it right you need a server app to manage that folder and users access via a WCF service so there is a single control point.
I work in a call center and we need to use a lot of web based tools and work with a lot of information. They way we need to work is not efficient, so I made myself a couple of C# Windows Application to make my work a bit easier.
The problem is that those computers a locked en secured in a very high level. Almost all website's are blocked, we can't use USB drives to get data on the pc, the only way to get data to my account at work is to mail it compressed in a 7z file. We can't install software, drivers etc. I luckily have write access to the program data folder to save some data. But the only way I can store data is to put it all in .txt files. I've tried a lot of standalone databases but I'm also limited in space because we've got 30MB. So a standalone version of xampp (or similar software) is almost 40 MB so I can't use it.
Does anybody know I type of database to store my data is (mostly text and integers)? I prefer a single file which i can drop in the program data folder. I prefer it also to get the data in the same way like getting it from a database, dataset or something similar.
You may want to look into Infobright Community Edition which can give you incredible compression ratios on average from 40:1. Infobright is exactly like mysql and very compact.
Disclaimer: the author is affiliated with Infobright.
Let's say I have a file: test.txt and I save it on my harddisk.
Is there a way to determine on what (physical) spot the file is saved on the hard disk?
For example on vector 12 on track 10 of the hard disk.
I don't know if I got the terminology right of the above, but I hope you get what I mean.
I want to write of program wheer the user can point to a file and the program will find out where the file is on the HDD. Something like the old defrag (it's Windows ;) ) where it shows what parts of the disk is in use.
What is this called and can it be achieved? (I'm not looking for code (although exmaples are ok ofc), but rather whether it is possible)
P.S. The client will be Windows 7 (so think NTFS if it matters).
I'm pretty sure that doing that sort of low-level disk i/o in managed code is going to be...difficult, at best. Here's somebody that's done something like it:
http://codebrainz.ca/index.php/2010/05/23/low-level-disk-io-in-managed-net/
Anything you write to do something like this has to be hardware-dependent: unless you know what hardware you're talking to, you've got no idea how it physically stores data (e.g., a USB memory stick has neither platters, tracks nor sectors, nor does it spin. Yet, for all intents and purposes, it appears to be a disk).
Normally, you'd write some sort of device driver to accomplish this. This link
http://en.wikibooks.org/wiki/Windows_Programming/Device_Driver_Introduction
might help.
In Jeffrey Wall's WebLog you will find Defrag API C# wrappers. His GetFileMap method sems to come close to what you need.
It is possible from C++, so with a little interoping, you should be fine.
Look up FSCTL_GET_RETRIEVAL_POINTERS in the MSDN to get you started.
I am looking for a small utility that can perhaps sit in the tray that functions similar to Fiddler's Auto-Responder. I would be willing to write such a utility that supports taking a request and responding with data located in a file containing the response headers/body. I am writing an application is C# that would benefit from such a utility.
If there is no such utility, could someone point me in the right direct for beginning to write such an application? I ask because I figured someone out there probably knows and would point me in the right direction in no time.
Thank you in advanced for your help.
Typically we call this a web server. They listen for web traffic and automatically respond to it with a file, typically a webpage. Apache is cheap. I think MS has a free IIS package too.
You haven't explained what's wrong with simply using Fiddler itself? If you run it using the -quiet command line argument, it sits quietly in the tray.
If you want to write your own application in C#, you can do so using FiddlerCore; see http://www.fiddler2.com/core/ for more details.
Hey, I'm trying to create an installer for multiple games, from one server computer which individual computers then execute.
E.g. BF 1942, WC3, BF2, DOW. However i need to be able to select which applications to Install, which is a simple check box.
I only have a limited knowledge of c#. What is the best way of going about this?
I have looked at NSIS though i don't like the scripting that they use.
I only have C# express.
NSIS. http://nsis.sourceforge.net One section per application, install with ExecWait operation.
Section "BF 1942"
ExecWait '"$EXEDIR\1942\setup.exe"'
SectionEnd
The closest thing that I can think of would probably have to be iexpress.exe
It comes standard with 99% of all windows, just do CTRL+R and type in iexpress.exe.
It's a wizard, so it shouldn't be that hard to generate your own file.
I don't know if it would work for what you're wanting to do, but I'd consider it to be worth trying, saving yourself some time.