|
Just kidding
There's a DLL[^] but why don't you want to use WMI?
While (true) { Human.isLearnable = true; }
|
|
|
|
|
I want to bang in a nail but I dont want to use a hammer, the end of a pair of pliers or even the sole of my shoe. Can anyone help me?
|
|
|
|
|
I always favour a rock as a good alternative
Bob
Ashfield Consultants Ltd
|
|
|
|
|
So the analogy is bust that case open to check the Serial number?
|
|
|
|
|
Did you know the volume serial number changes every time you reformat the drive?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello, everyone.
A little help needed )
Is there any posibility to use different font style for different items in checkedlistbox?
For example, if I want to strike item if it's checked?
Can't find how to do that with standart checkedlistbox (
Thanks,
|
|
|
|
|
I think you'll need to handle the drawing yourself to do that.
You can get the same effect by using a ListView with the View set to List and CheckBoxes to true, then set the Font of any ListViewItems that you need to have different.
[edit] Just had a look, and the CheckedListBox doesn't support DrawItem so it's going to be a little more difficult if you don't want to use a ListView. You'd have to derive your own class from CheckedListBox and override OnDrawItem there.[/edit]
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)
|
|
|
|
|
I've tryed to handle drawing, but it draws all control and I need one item (
|
|
|
|
|
See the edit to my previous post.
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)
|
|
|
|
|
Hello. I'm working on a remote desktop program and since I couldn't find a way to create a hook for the video, I'm taking screenshots and send them. Needless to say this is very slow. I'm looking for a method to read the video card buffer directly (only the last changes). This way the cpu doesn't have to process a few MB of data few times per second.
Any input would be appreciated.
|
|
|
|
|
xax wrote: This way the cpu doesn't have to process a few MB of data few times per second.
Let's see. Take a 1024 x 768 x 328 bit color. That's an odd 750KB, updating roughly 60 or more times a second. So we end up with around 45MB of memory that needs to be scanned every second, nevermind any other processing.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
modified on Friday, October 10, 2008 12:07 PM
|
|
|
|
|
leppie wrote: Take a 1024 x 768 x 32 bit color. That's an odd 750KB
hmm....my calculator must be broken...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Whahahahaha! I didnt even notice! Of course there is only 8 bits in a byte
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Well, technically, you did say "odd", and it IS indeed close
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: and it IS indeed close
Like NASA close
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Like Leppie said, dumping the whole screen as a buffer and transmitting will take a huge amount of memory. You should look at the following:
There is a pretty well standardised way of doing this with a protocol called remote frame buffer[^]. You should look into this protocol if you are writing a remote desktop program, as it will give a guide of good ways to do things (Even if you decide not to follow the protocol).
An alternative protocol used by MS is the remote desktop protocol[^]
The general area you are talking about is called Virtual network computing[^].
The general idea behind these protocols is to break the screen down into the smallest possible rectangle primitives and transmit them to be drawn on the client. A common way of reducing bandwidth is to only transmit what has changed between each refresh.
Ultra VNC[^] is an open source implementation of the RFB protocol. You can look at the source code for this to see how they are grabbing the screen.
Simon
|
|
|
|
|
I already know that the algorithm takes a large amount of memory, not to mention CPU. I've read the remote frame buffer documentation and that is why I'm looking for a way to "hook" the program to the video card. The biggest problem is the CPU consumption because the memory can be recycled: let's say 10 times per second I take a screenshot scan it and send only the changes. Still the CPU is at around 25-30% on a single core AMD.
What I want is to get only the changes(the updates) from the video buffer.
|
|
|
|
|
Read the ultra vnc source code. They obviously have a way of doing it that doesn't use that much cpu.
Simon
|
|
|
|
|
How are you accessing the image data? What do you use for screen capture?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
leppie wrote: How are you accessing the image data? What do you use for screen capture?
Hi leppie, I'm using the Graphics class to get the screenshot (only 3 lines of code). Accessing the image data is very slow using safe code (GetPixel) so I'm using unsafe to access the memory.
|
|
|
|
|
|
Hey guys
I'm just wrote a simple struct to contain an int and two boolean values. Its is as follows..
struct NodeModuleLevelStruct
{
public NodeModuleLevelStruct(int ModuleID, bool IsActive, bool IsAdvanced)
{
moduleID = ModuleID;
moduleActive = IsActive;
level = IsAdvanced;
}
private bool moduleActive;
public bool IsActive
{
get { return moduleActive; }
set { moduleActive = value; }
}
private bool level;
public bool IsAdvanced
{
get { return level; }
set { level = value; }
}
private int moduleID;
public int ModuleID
{
get { return moduleID; }
set { moduleID = value; }
}
}
Now i need to query a NodeModuleLevelStruct[] using Linq so i have to inherit IEnumerable right?
so ive got
struct NodeModuleLevelStruct : IEnumerable<int>
...int cause i want to check if the given moduleID exists within that array
now the compiler is moaning that i havnt implemented System.Collections.Generic.IEnumerable<int>.GetEnumerator() or System.Collections.IEnumerable.GetEnumerator()
1) Am I on the right track here?
2) How do i implement those interfaces in my struct?
Thanks
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
Harvey Saayman wrote: Am I on the right track here?
No, you are doing it wrong
NodeModuleLevelStruct[] is already IEnumerable<NodeModuleLevelStruct> . So all you need to do is:
NodeModuleLevelStruct[] l = ...;
var q = from x in l
where x.ModuleID == 12345
select x;
Also, you should not use a struct in this case AFAICS.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
leppie wrote: NodeModuleLevelStruct[] is already IEnumerable<nodemodulelevelstruct>
ah, i didnt know that... it works by just querying the NodeModuleLevelStruct[]
leppie wrote: Also, you should not use a struct in this case AFAICS.
what do u think i should use? And when should one use a struct anyway?
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
Harvey Saayman wrote: what do u think i should use?
A class. Structs are mostly useless in .NET unless you require their special semantics. Example:
MyType[] list = new MyType[10];
Now define MyType as a class and see what the content is in 'list'. Now do the same but define MyType as struct.
An important point to notice is the way 'instances' are passed around. With structs, a copy of the value of the instance will be made, where classes will just send a reference to itself. So if used wrong, structs can become a big performance/memory killer. There are also other considerations, like modifying structs and things to keep in mind like boxing, that just blurs everything!
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|