|
In other words, you want to invisibly log all events and take screenshots too, so a spy application? I guess you want to hide it from Application and Process tabs in TaskManager too!
Would you want this on your computer? I certainly wouldn't, so you need to provide some justification for it before you'll get any help from me I'm afraid.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
No It is not a spy application,
it is basically screen capture and then replay.
I have softwares from which I have to take screenshots. Now these screenshots need to be taken for
each and every language the software gets translated in.
So instead of doing this manually, I am trying to get it done automated.
That's why I need to capture the events send it to the software for english language and then replay it on other language versions.
|
|
|
|
|
OK, that sounds fair.
Depending on what events you need to capture, have you thought about having an app minimized to tray instead of 'invisible' and using global hooks?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
No, I do not know how to create such an application. Let me google it.
If you know about any examples or tutorials, Can you give me a link ?
Thanks for the suggestion.
|
|
|
|
|
I will also need to draw user's clipped rectagle back to screen, when user is first time taking screenshot for english language. Does a minimized application allow me to draw rectangles back to the screen ?
Here is a summary of what I already have found on net:
-----------------------------------------------------
Creating a windowless application: Easily with windows forms.
Sending events to another application : user32.dll provides findwindow and sendmessage function.
Storing the events: I intend to use a sqlite engine. It comes in form of DLL that I can import. You will find tutorials online.
What I am looking for now is a way to draw on screen and capture the events:
----------------------------------------------------------------------------
Global hooks might be the solution, if I can draw back a rectangle on the screen at the same time.
I also intend to give use an option to choose colors/pen/rectangle/circle so that, anyone can scribble a bit on screen. But it will not be that fancy.
Can I draw a user control on screen when application is minimized?
|
|
|
|
|
Have you investigated commercial screen capture applications? I know adobe captivate will let you extract the screen shots it takes when recording an application easily. You probably should be able to do the same with cheaper/free apps, but most of them save a movie (vs captivates screen shot per dialog change and mouse movements) they might end up costing more once your time is factored into the exercise.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
I do not want to go for such complex application, which I have to pay for.
I want to keep it simple and customizable. That's why, I am trying to use code from such open source projects and create my own app.
|
|
|
|
|
Hi all
I have some problem sending and receiving datas throught c# asynchronous sockets when mapping a CryptoStream to the socket stream.
If I use the NetworkStream then everything is ok, but if I use the CryptoStream I get no error but I got no event 'OnReceive'...
Any ideas on why it works with NetworkStream but not using CryptoStream mapped to NetworkStream ?
Nous ne sommes que des grains de sable mais nous sommes ensemble. Nous sommes comme les grains de sable sur la plage, mais sans les grains de sable la plage n’existerait pas.
Poème en langue yamato(japonais ancien)
|
|
|
|
|
Maybe they are not gone, but the blocks of the CryptoStream are bigger than you expected, so no data was send yet?
Just a stupid idea I know, so this is not an "answer" post.
|
|
|
|
|
I read a post somewhere that stated to not give buffer.Length to BeginWrite method but use (int)stream.Length or something approching...
I'll try this week... :p
Nous ne sommes que des grains de sable mais nous sommes ensemble. Nous sommes comme les grains de sable sur la plage, mais sans les grains de sable la plage n’existerait pas.
Poème en langue yamato(japonais ancien)
|
|
|
|
|
I have had similar problems working with CryptoStream <-> generic stream routines, and found differences between FileStream and MemoryStream, particularly that the Flush method didn't seem to work with MemoryStreams. In this case, I got no data until I closed the stream (which destroys the MemoryStream).
The workaround I used was to provide the size of the unencrypted data as part of the encyrpted output, append an extra block of random rubbish to the Cytpro stream after my data, and truncate back when decrypting.
It is worth trying with NetworkStream / CryptoStream since it could cause your problem?
If not, we are probably going to need a cut-down code fragment...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
I don't Flush... but as I use asynchronous I think I should ?
Nous ne sommes que des grains de sable mais nous sommes ensemble. Nous sommes comme les grains de sable sur la plage, mais sans les grains de sable la plage n’existerait pas.
Poème en langue yamato(japonais ancien)
modified on Monday, June 22, 2009 8:36 AM
|
|
|
|
|
It seems that there's a known bug with the .Net framework when trying to serialize in a CryptoStream attached to a NetworkStream.
A bug has been discovered in the .NET library.
It is not possible to serialize to a CryptoStream that is attached to a NetworkStream because the Deserialize call on the receiving end of the stream will block until the stream is closed by the sending end.
You might note that all the MSDN examples use a backing MemoryStream, so perhaps this behavior is expected, but not documented.
A simple rule to avoid this problem is: never attach a CryptoStream to a NetworkStream. We sketch a possible implementation strategy:
* Use a CryptoStream attached to a MemoryStream.
You can serialize objects to this structure, then safely close the stream.
Then, get the byte array from the MemoryStream and write (or serialize, if part of a larger object) it to the NetworkStream. On the receiving side, reverse this process: recover the byte array, decrypt the bytes, then deserialize the result.
A working exemple is given here using this method:
http://www.marcclifton.com/Default.aspx?tabid=138[^]
Nous ne sommes que des grains de sable mais nous sommes ensemble. Nous sommes comme les grains de sable sur la plage, mais sans les grains de sable la plage n’existerait pas.
Poème en langue yamato(japonais ancien)
modified on Sunday, June 21, 2009 4:06 PM
|
|
|
|
|
Thanks! I didn't know that, and will have to remember.
Good Luck!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
I tweaked my code to use a CryptoStream over a MemoryStream to serialize into a NetworkStream as mentioned in the article and it works well !
Nous ne sommes que des grains de sable mais nous sommes ensemble. Nous sommes comme les grains de sable sur la plage, mais sans les grains de sable la plage n’existerait pas.
Poème en langue yamato(japonais ancien)
|
|
|
|
|
Good - well worth knowing, thanks!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi,
How can we know the path of .msi file, where it is being executed from?
Thanks In Advance
--Naren
|
|
|
|
|
Try this. string exedir = AppDomain.CurrentDomain.BaseDirectory;
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Hi I made a service that runs under the system account. The service gets a message from my server that tells it to shut down if no user is logged on. But because my service is run under system I can use this code to find out who is logged on.
string a;
a = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
I was wondering does any one know a different way to find if a user is logged on.
|
|
|
|
|
|
Well it seems it’s only for terminal server but if any one knows it this exists in c# for a normal workstation that would be cool
|
|
|
|
|
There is a class Win32_logonSession. Not sure if that can help you.
जय हिंद
|
|
|
|
|
Hello,
In my application, I want to print some informations.
I can print this informations with e.Graphics.DrawString () .
The problem that I want to print in the same page ,that contains informations printed with e.Graphics.DrawString () I want to print command PCL but the problem is that I have in the result 2 pages.
- the first one contains informations printed with e.Graphics.DrawString ().
- The second contains informations of PCL command
The problem that I want in the result 1 page that contains both information.
I send To you a part of my code:
code use e.Graphics.DrawString ():
PrintDocument Page = new PrintDocument(); Page.PrintPage += new PrintPageEventHandler(cardDocument_Page); Page.Print();
Code of cardDocument_Page(....):
e.Graphics.DrawString("String1", cardFont, Brushes.Black, 400, 300);
e.Graphics.DrawString("String2", cardFont, Brushes.Black, 500, 300);
Code that send commande directely to the printer:
DOCINFO di = new DOCINFO();
int pcWritten = 0;
PrintDirect.OpenPrinter("\\\\10.1.0.40\\HPLaserJ", ref lhPrinter, 0);
PrintDirect.StartDocPrinter(lhPrinter, 1, ref di);
PrintDirect.StartPagePrinter(lhPrinter);
string st1;
st1 = "\x1b**1M\x1b(14Y\x1b(s0p8.00h12.0v0s0b105T" + Strin+ "\x1b**0M";
PrintDirect.WritePrinter(lhPrinter, st1, st1.Length, ref pcWritten);
PrintDirect.EndPagePrinter(lhPrinter);
PrintDirect.EndDocPrinter(lhPrinter);
PrintDirect.ClosePrinter(lhPrinter);
classes used by PrintDirect:
public class PrintDirect { [DllImport("winspool.drv", CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.StdCall)]
public static extern long OpenPrinter(string pPrinterName, ref IntPtr phPrinter, int pDefault);
[DllImport("winspool.drv", CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.StdCall)]
public static extern long StartDocPrinter(IntPtr hPrinter, int Level, ref DOCINFO pDocInfo);
[DllImport("winspool.drv", CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern long StartPagePrinter(IntPtr hPrinter);
[DllImport("winspool.drv", CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern long WritePrinter(IntPtr hPrinter, string data, int buf, ref int pcWritten);
[DllImport("winspool.drv", CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern long EndPagePrinter(IntPtr hPrinter);
[DllImport("winspool.drv", CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern long EndDocPrinter(IntPtr hPrinter);
[DllImport("winspool.drv", CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern long ClosePrinter(IntPtr hPrinter);
I want to print informations (PCL and other) in the same page, but not in 2 pages.
Thank you for your Help.
|
|
|
|
|
I'm trying to save a unicode utf8 string --> "سلام" in a feature of a featureclass, but it is saved like "????".as ArcMap support different encodin and also Farsi that I'm working with, It should be possible through my program.but I didn't find any way yet.anybody knows about this?
<br />
<br />
feature = fc.CreateFeature();<br />
feature.Shape = point;<br />
feature.set_Value(feature.Fields.FindField("Name"), o.Name);<br />
feature.Store();<br />
fc is an IFeatureClass, feature is an IFeature and o.Name is a unicode.utf8 string.in watch window:
feature.get_value(feature.Fields.FindField("Name"))--> is OK
but
fc.GetFeature(1).Get_Value(feature.Fields.FindField("Name")) --> is "????"
and this is what is saved. What should I do?
|
|
|
|
|
If you're sure that your data is intact when sent to the component (easily checked with some breakpoints) then you should ask in their forums[^].
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|