|
FAXCOMEXLib is indeed necessary here, but beware - it's known to cause a lot of problems. Luckily for you, I've come across this list of common FAXCOMEXLib errors. This might save you a lot of time and effort which were, needless to say, doggedly spent when I had a similar problem
|
|
|
|
|
Thanks... but I guess that would be more useful to the op, and maybe he will not see your post becouse you have answered to me.
|
|
|
|
|
i'm trying to get information about a panel in my application , so i called GetWindowLong passing this.handle in the custom panel class, but i get the error 6 saying invalid handle, this.handle returns "2081229920" value.
any idea,
thanx in advance.
|
|
|
|
|
Every mature Winforms Control has a Handle property, that is what you should use as a HWND when P/Invoking API functions; and the Handle typically only exists when the Control has been fully created, which I think is when the holding Form is Loaded or Shown.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
thanx, ok actually i made that call in the onpaint method, but when i debug this.handle returned a value. so even though the handle is there it is not enough , is it the reason , means the control is not completely drawn.
thanx
|
|
|
|
|
if you want more help, you'll have to provide a better description of the situation and the problem, and probably show some code. I also am puzzled why you would need handles in an OnPaint handler, I've never seen that. I do know it is wise to keep paint handlers short, simple and swift.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
You got A value, not a VALID value. Having a value other than zero does not means it's valid.
You can check this with the IsHandleCreated property of your control.
|
|
|
|
|
Hi
I seem to be having a problem matching names using Regex, even though it works perfectly in Expresso.
The goal is to match only the name in the string below.
Here is the Regex I`m using:
\b[a-z][A-Z]*\b\s*\b[a-z][A-Z]*\b
..and here is the string I`m matching:
"JOHN DOE john@random.net(H) 04377777746, (W) 0444444543, (F) 022222223, (M) 082343222;"
Like I said, in Expresso it matches the full name, but when I use:
MatchCollection NameCollectionRegex = Regex.Matches(contactDetails, @"(\b[a-z][A-Z]*\b\s*\b[a-z][A-Z]*\b)");
or
Match m = Regex.Match(contactDetails, @"(\b[a-z][A-Z]*\b\s*\b[a-z][A-Z]*\b)");
it doesn't return any matches. Anything I could be doing wrong?
|
|
|
|
|
Are you missing parentheses around your character class for upper and lower-case letters? I think [a-z][A-Z]* in both places should be replaced with ([a-z][A-Z])+.
P.S. There is a separate forum for regular expressions[^].
|
|
|
|
|
Firstly, we do have a Regex forum: http://www.codeproject.com/Forums/1580841/Regular-Expressions.aspx[^] - it might be more appropriate in future.
Secondly, in Expresso, go to the Design tab and look at the bottom: You will find you have "Ignore case" selected.
If you de-select that, Expresso will not find it either.
Change your string to:
\b[a-zA-Z][a-zA-Z]*\b\s*\b[a-zA-Z][a-zA-Z]*\b And it will work in both, or use the RegexOption.IgnoreCase as part of the Match method. MSDN[^]
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Thanks I only noticed that now.
|
|
|
|
|
Griff's answer seems appropriate for the question you asked, however your question may be a bit shortsighted, as names can be a bit more complex than you are expecting.
Here are a few CP member names you would still have trouble with:
wout de zeeuw
Pete O'Hanlon
Smithers-Jones
Ennis Ray Lynch, Jr.
What I would do is locate the first digit or @ sign, then get everything that sits before the last space in front of that. And no, I would not use regex to implement that, it is way simpler using two methods from the string class.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Luc Pattyn wrote: What I would do is locate the first digit ...
Perhaps you aren't familiar with Tom Lehrer's friend Hen3ry?
|
|
|
|
|
Indeed I'm not. Plz send appropriate regex codez.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hi, I would like to search xml file using lucene dll. I'm finding difficulty in creating index files.
Please guide me. Thanks in advance
modified on Friday, May 13, 2011 3:59 AM
|
|
|
|
|
When you have a question on a project like this, it's normally better to ask this question on the forums for that project as they are the experts in it. Have a search through the support forums there[^].
|
|
|
|
|
Hi,
I just asked myself what might be the future of C#?
Is the language going to be around for the next 5 years or maybe more?
Hope someone has an answer
|
|
|
|
|
Well, it's been around for the last 10 years, so yeah, I think it'll be around for lots longer.
|
|
|
|
|
yes.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Keep in mind that C# is promoted by Microsoft. Microsoft, whatever its critics may say, is a company with quite a high degree of perseverance, persistence, resilience. Microsoft will make sure that C# continuously grows and meets the ever-increasing demands of the developer community.
|
|
|
|
|
In addition, through Mono, C#/.Net has the power to stick around even without Microsoft. The language is also full of nice features and in 4.0 (with all the parallel stuff) the framework is set up well for the multi-core world (the next 10 years?).
|
|
|
|
|
I wouldn't bank on Mono. There's some doubt over the future of it - pretty much the entire Mono team was sacked by their new owners.
|
|
|
|
|
I heard a rumor, though, that the main architect of C# is moving to a smaller company to develop a Pascal-based programming environment.
|
|
|
|
|
Yea me too but he said he isn't leaving, he will work on both.
|
|
|
|
|
Yeah, right. "No, really, Honey. We're just good friends."
|
|
|
|