|
Thanks! Looks good!
I'll get right on to it, and come back here with my future questions
Thanks again!
|
|
|
|
|
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?
|
|
|
|
|
Hello all,
in my Win Applicaiton. i am using TabControl. In this I added 2 Tabs. I want to disable second tab. It is not having Enabled Property.
How to do this
any sounds will be appriciated
regards
GV Ramana
|
|
|
|
|
TabPages have the Enabled property
TabControl1.TabPages(1).Enabled = False
|
|
|
|
|
Is that possible to Program the tab control's button, which appears on the top and are associated with the tab pages?
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
If you want to do this at runtime(which it sounds like you do), all you need to do is set TabControl.Tabpages[].Enabled = false. If you want to do it upon changing tabs, you can handle the TabControl.TabIndexChanged event or any of many other TabControl Events[^].
|
|
|
|
|
How can i edit a listviewsubedit in ListView control in C#.
I have set the View property of ListView Control to View.Details.
I set the LabelEdit property to true but it only lets editing 0th index listviewsubitem.
Thanks
|
|
|
|
|
peshawarcoder wrote: How can i edit a listviewsubedit in ListView control in C#
You can't
Have a search on CodeProject for "editable ListView", results 1 and 3 might be what you're after.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Jesal Rana wrote: I want to know the method or any help to change the fonts of website to the different fonts
This question makes no sense whatsoever!
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Hi All,
I am developing a search engine and i m using "." as a seperator of a token..... but now i have to search URLs as well so anyone plz tell me how can i realize that a particular string is a URL.....
looking forward for help
Regards,
|
|
|
|
|
Have a look through regexlib[^] and you'll probably find several ones. Another one is the RegularExpressionValidtorControl in ASP.NET has some built in ones, it may be in there.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Sir i want to do this using C# and want to know about the RegularExpression class of C#....
any help in this regard will b welcomed
looking forward for help
Regards,
|
|
|
|
|
Rizwan Rathore wrote: want to know about the RegularExpression class of C#
Best place is the documentation provided by MSDN[^]
Ok basically you want the System.Text.RegularExpression namespace, the most important class is RegEx which handles all the matching etc. There is a constructor for this class which takes the regular expression pattern (for the URL in this case) and creates a RegEx object based on it. If you then want to check for URLs you can use:
IsMatch - Checks if a string, or part of the string specified in the parameters matches the regular expression provided in the constructor.Match - Returns a match object which contains the first match that the class found matching the regular expression.Matches - Returns a collection of Match objects for each regular expression matched correctly. If the regular expression is enclosed in parentheses then the url can be extracted by using the Group collection.
Example: This simple code will extract all the urls from a given string.
string urls = "there is a url included somewhere in this string : http://www.codeproject.com/script/comments/forums.asp?msg=1524600&forumid=1649#xx1524600xx and here is another url http://regexlib.com/Search.aspx?k=uri";
string urlRegex = @"(?<url>(mailto\:|(news|(ht|f)tp(s?))\://){1}\S+)";
Regex regex = new Regex(urlRegex);
foreach (Match m in regex.Matches(urls))
{
Console.WriteLine(m.Groups["url"].Value);
}
Console.ReadLine();
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Hi Sir,
thats exactly wat i need but when i tried the program i got this exception
An unhandled exception of type 'System.ArgumentException' occurred in system.dll
Additional information: parsing "(?<url>(mailto\(news|(ht|f)tp(s?))\://){1}\S+)" - Too many )'s.
at this instruction
string urlRegex = @"(?<url>(mailto\(news|(ht|f)tp(s?))\://){1}\S+)";
now i am totally new commer in C# so plzz tell me how can i correct this i am writing the same code which u sent...
so plzz reply back soon
looking forward for help
Regards,
-- modified at 14:30 Friday 9th June, 2006
|
|
|
|
|
Use this regular expression:
(?<url>(mailto\:|(news|(ht|f)tp(s?))\: Rizwan Rathore wrote: so plzz reply back soon
Be warned that some here think this is impolite, I'm not that fussed but others are because we're donating our free time to help you fix your problems.
Rizwan Rathore wrote: looking forward for help
Aren't we all
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Sorry if u mind that i will avoid that in future
but sir i was using exactly same regular expression wich gave exception
so wot shud i do now ??
|
|
|
|
|
The one I gave in the previous reply works fine on my machine, remember to write the string in code as @"regex" rather than "regex" since C# will try and escape the \ characters.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Hi.
I need a program to sort a mesh array.
At least say me what is mesh array.
Best wishes
|
|
|
|
|
|
Hello!
[modified] Thanx to OrlandoCurioso!
I have tried to use a SendMessage with TVM_GETITEM with a TVITEM struct... but I got no result at all =/
Here is the code(piece):
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
public struct TVITEM
{
public int mask;
public IntPtr hItem;
public int state;
public int stateMask;
[MarshalAs(UnmanagedType.LPStr)]
public string pszText; // string pointer
public int cchTextMax;
public int iImage;
public int iSelectedImage;
public int cChildren;
public IntPtr lParam;
}
StringBuilder sb = new StringBuilder(256);
TVITEM tvItem = new TVITEM();
tvItem.hItem = (IntPtr)Int32.Parse(textBox1.Text);
tvItem.cchTextMax = 256;
tvItem.pszText = sb.ToString();
tvItem.mask = TVIF_TEXT; // TVIF_TEXT = 0x0001;
IntPtr j = SendMessage(TreeHandle, (int)TV_Messages.TVM_GETITEM, (int)0, ref tvItem);
MessageBox.Show(j.ToString());
I´m still having some troubles... I think my only problem now is with the the String Pointer... If I can make it work... I can Retrive my item´s name from the TreeView... and it´s done!
Thanks!
-- modified at 9:27 Friday 9th June, 2006
|
|
|
|
|
You use the TV_INSERTSTRUCT declare.
This is correct:
[StructLayout(LayoutKind.Sequential,
CharSet = CharSet.Auto)]
public struct TVITEM
{
public int mask;
public IntPtr hItem;
public int state;
public int stateMask;
public IntPtr pszText;
public int cchTextMax;
public int iImage;
public int iSelectedImage;
public int cChildren;
public IntPtr lParam;
}
|
|
|
|
|
Thanky you very much!!!!
NExt step: set correctly the values.. send set it to fire!
Best Regards
|
|
|
|
|
Hi All.
İ have to write an SNMP application. That will send SNMP Trap messages to an NMS application. But, i have at least one problem. I don't know an SNMP Trap Message's packet structure. Please help me.
Thanks
Murad from Istanbul
|
|
|
|
|
can anyone help me abt datagrid view
my problme is that im not able to select n deselect checkbxes in gridview like the mailing list in our mail sites
plz help me out
|
|
|
|
|