Click here to Skip to main content
15,910,210 members
Home / Discussions / C#
   

C#

 
QuestionSqlCommand.parameterCollection ?? Pin
maaran8-Jun-06 23:54
maaran8-Jun-06 23:54 
AnswerRe: SqlCommand.parameterCollection ?? Pin
Colin Angus Mackay9-Jun-06 0:04
Colin Angus Mackay9-Jun-06 0:04 
GeneralRe: SqlCommand.parameterCollection ?? Pin
maaran9-Jun-06 0:27
maaran9-Jun-06 0:27 
GeneralRe: SqlCommand.parameterCollection ?? Pin
Guffa9-Jun-06 3:02
Guffa9-Jun-06 3:02 
QuestionDecreasing CPU usage Pin
Shy Agam8-Jun-06 23:42
Shy Agam8-Jun-06 23:42 
AnswerRe: Decreasing CPU usage Pin
Robert Rohde8-Jun-06 23:46
Robert Rohde8-Jun-06 23:46 
GeneralRe: Decreasing CPU usage Pin
Shy Agam8-Jun-06 23:52
Shy Agam8-Jun-06 23:52 
AnswerRe: Decreasing CPU usage Pin
Shy Agam9-Jun-06 23:28
Shy Agam9-Jun-06 23:28 
Well...
I tried using pointers like the article described...
Didn't help much...
This is my new code:
private void checkForChange()
{
    Rectangle r = new Rectangle(0, 0, bounds.Width, bounds.Height);

    BitmapData dataContent = content.LockBits(r, ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
    BitmapData dataLast = lastContent.LockBits(r, ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);

    int stride = dataContent.Stride;
    int offset = stride - dataContent.Width * 3;
    int width  = dataContent.Width * 3;
    int height = dataContent.Height;

    unsafe
    {
        byte* pContent = (byte*)dataContent.Scan0;
        byte* pLast = (byte*)dataLast.Scan0;

        for (int y = 0; y < height; ++y, pContent += offset, pLast += offset)
            for (int x = 0; x < width; x += 3, pContent += 3, pLast += 3)
                if (pContent[0] != pLast[0] || pContent[1] != pLast[1] || pContent[2] != pLast[2])
                    goto Found;
    }

Cleanup:
    content.UnlockBits(dataContent);
    lastContent.UnlockBits(dataLast);

    return;

Found:
    userCallBack(this);
    goto Cleanup;
}
It even uses more CPU...
Ideas?
QuestionHow to Disable Tab inTabControl using .NET 2.0 [modified] Pin
VenkataRamana.Gali8-Jun-06 23:30
VenkataRamana.Gali8-Jun-06 23:30 
AnswerRe: How to Disable Tab inTabControl using .NET 2.0 [modified] Pin
sathish s8-Jun-06 23:46
sathish s8-Jun-06 23:46 
QuestionTab Control Button Pin
Mairaaj Khan9-Jun-06 3:08
professionalMairaaj Khan9-Jun-06 3:08 
AnswerRe: Tab Control Button Pin
Drew McGhie9-Jun-06 8:41
Drew McGhie9-Jun-06 8:41 
Questionediting a ListViewSubItem in C# Pin
peshawarcoder8-Jun-06 23:27
peshawarcoder8-Jun-06 23:27 
AnswerRe: editing a ListViewSubItem in C# Pin
Ed.Poore9-Jun-06 4:59
Ed.Poore9-Jun-06 4:59 
AnswerRe: How to change website fonts with different fornts? Pin
J4amieC8-Jun-06 22:49
J4amieC8-Jun-06 22:49 
Questionrealizing a URL using Regular Expressions Pin
Rizwan Rathore8-Jun-06 22:25
Rizwan Rathore8-Jun-06 22:25 
AnswerRe: realizing a URL using Regular Expressions Pin
Ed.Poore8-Jun-06 22:30
Ed.Poore8-Jun-06 22:30 
GeneralRe: realizing a URL using Regular Expressions Pin
Rizwan Rathore9-Jun-06 4:26
Rizwan Rathore9-Jun-06 4:26 
GeneralRe: realizing a URL using Regular Expressions Pin
Ed.Poore9-Jun-06 4:57
Ed.Poore9-Jun-06 4:57 
GeneralRe: realizing a URL using Regular Expressions [modified] Pin
Rizwan Rathore9-Jun-06 7:56
Rizwan Rathore9-Jun-06 7:56 
GeneralRe: realizing a URL using Regular Expressions Pin
Ed.Poore9-Jun-06 10:06
Ed.Poore9-Jun-06 10:06 
GeneralRe: realizing a URL using Regular Expressions Pin
Rizwan Rathore9-Jun-06 22:04
Rizwan Rathore9-Jun-06 22:04 
GeneralRe: realizing a URL using Regular Expressions Pin
Ed.Poore9-Jun-06 23:38
Ed.Poore9-Jun-06 23:38 
QuestionMesh array Pin
mehrdadc488-Jun-06 21:20
mehrdadc488-Jun-06 21:20 
AnswerRe: Mesh array Pin
WillemM9-Jun-06 2:39
WillemM9-Jun-06 2:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.