|
I am currently making a user control that contains a collection of my custom control witch overides OnPaint method. I use:
My custom control constructor inits those style:
SetStyle(System.Windows.Forms.ControlStyles.DoubleBuffer, true);
SetStyle(System.Windows.Forms.ControlStyles.AllPaintingInWmPaint, true);
SetStyle(System.Windows.Forms.ControlStyles.ResizeRedraw, true);
SetStyle(System.Windows.Forms.ControlStyles.UserPaint, true);
UpdateStyles();
Now, my user control constructor add a collection of my custom control
to its Controls Collection and also sets ControlStyles like my custom control does.
My user control overrides OnLayout to place the collection of custom control as a special way. I SuspendLayout at the Begining of OnLayout and ResumeLayout at the end. So my problem is that my user control OnPaint event is not called so DoubleBuffering is not working on user control.
Is it because I use double buffering in my custom control or is just
a desing problem? If someone could help me with that, I will apreciate a lot. And I am sorry for my english, if its'no clear just please tell me.
Sebastien
|
|
|
|
|
hey everyone,
I have been trying to link a schema to an xml file programatically inside my application, so that references inside the xml will expand when added to a treeview but i cannot get it to work. I know how to link a schema inside the xml file itself, noNameSpaceSchemaLocation and schemaLocation. However try as i might (and i am trying )i cannot get them to link programatically, or even know if it can be done. I am not looking for help on validation, as i know how this works using XmlValidatingReader etc.
if you can help please do...........
|
|
|
|
|
This message goes out to all the regular expression gurus out there:
I have a very simple regular expression declaration:
regex.Regex ex = new System.Text.RegularExpressions.Regex("\\(");
I want to know how to test against this regular expression so that if the tested string does not match EXACTLY then its going to give me false. For example:-
string test = "a(";
regex.Regex ex = new System.Text.RegularExpressions.Regex("\\(");
System.Console.WriteLine(ex.IsMatch(test, 0));
should return false (which it does not). How do I do this?
Secondly, I want to recursively define a definition but I do non know exactly how. I have an expression and it COULD be enclosed in brackets. So lets say I have the following:
E -> (E)
I could alse have:
E -> C-E
C -> constant
How do I write a definition like this? I'm very much not keen on writing a parser, I assure you!
Thanks a lot!
Jim
|
|
|
|
|
I'm not familiar with the .net regex syntax, just the Perl syntax, but in Perl you can write ^\($ where ^ means "beginning of the string" and $ means "end of the string". Hopefully there are equivalents in .net that you can use.
--Mike--
LINKS~! Ericahist updated! | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
Thanks, does anyone know how to step around the recursion problem?
Cheers,
Jim
|
|
|
|
|
AFAIK, there is no way you can implement reductions like the ones you posted using regular expressions. That's the job of parsers.
Regards
Senthil
My Blog
|
|
|
|
|
They said that these regular expressions were built on NFAs... Such a regular expression would be possible with an NFA, no?
Is there a built in parser anywhere?
Jim
|
|
|
|
|
Hello all,
I have an application that attempts to send emails via an exchange server on another machine. The code I am using is as follows :
MailMessage aMessage = new MailMessage();
aMessage.From = "johndoe@server.com";
aMessage.To = "janedoe@server.com";
aMessage.Subject = "Test Subject";
aMessage.Body = "Test Body";
System.Threading.Thread.Sleep(3000);
MailAttachment mat = new MailAttachment("c:\path\to\attachment\att.jpg")
aMessage.Attachments.Add(mat);
SmtpMail.SmtpServer.Insert(0, "SERVER IP ADDRESS");
SmtpMail.Send(aMessage);
60% of the time this code works, but on occasions I get the following exception thrown by the .Send
System.Runtime.InteropServices.COMException (0x80040220): The "SendUsing" configuration value is invalid.
After hunting around google for a while I am none the wiser as to a solution to this problem. Although I have made some code tweaks to match certain suggestions
Does anybody have any suggestions
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
There is an MS knowledgebase article regarding this exception here.[^]
Does that help at all?
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hi,
I am passing an object of a class declared in my C# code to an unmanaged VC++ dll.
If my class contains an int/double/char and may be some functions then I can get their values in the dll. Also I can modify the values there and the modified values I can get in my C# code. So it works fine.
But if I include a string in my class then I can get the values of other variables except the string. And if I modify ANY value in the dll then it does not get reflected in my C# code.
I am unable to proceed. plz help me...
GRS
|
|
|
|
|
Hi guys, I have a question... I have managed to program a simple game, but I need help in creating a starting menu. For example, the options would be, "start", "high score" "help" "exit".
I hope anyone with game programming can help me out soon. Thanks in advance!!!
James Kleinenberg
|
|
|
|
|
some more details would be nice.
How have you made the game, using GDI+, directX openGL?
If you've used GDI+ just use windwos forms buttons for your options.
Otherwise give a bit more info.
Cheers
Kev
|
|
|
|
|
Hi,
is it possible (and how? ) to write an application, where I can get some informations like "artist" or "title" from a streamed file, which was played by a WindowsMediaPlayer ActiveX, which is embedded in the loaded webpage?
Thanks in advance, Randy
|
|
|
|
|
Hello,
How can I sort a DataGridColumn which has Alphanumeric values such that
"Record No: x". Is there any property which I can use for this purpose.
Scenario:
I have 4 values in column R1, R9, R20,R10 and when I try to sort this
column in the DataGrid (by clicking the header) it displays R1, R10,
R20, R9. While I want to display R1, R9, R10, R20.
Is is possible. Thanks in advance
Maqsood Ahmed
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
Would it be possible to pad the numeric portions with zeros? That should yield a more "accurate" sort.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
turbochimp wrote:
Would it be possible to pad the numeric portions with zeros?
Hello,
No! the given scenario was just to make the problem clearer. I have sort more complex values in the realtime application, something like "Buy Price 1.2034", "Sell Price 2.382", "Market Price" etc. It means that some values can be alphanumeric but others will be just strings.
Can anyone suggest a generic solution to this problem.
Bye
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
It sounds like you need normalization, not a different sort routine. In the example you offer, there should be 3 columns - BuyPrice (decimal), SellPrice (decimal) and MarketPrice (decimal).
If you're using a single column to hold three different pieces of data, you should think about changing the way the data is stored and/or displayed.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hello,
It is not the case of storing data in right way or something, it is just for the user friendliness, the way user wants to see it.
By the way, there should be only two columns, Price and Type . Any luck with the actual problem :s
Cheers.
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
You can always display normalized data in a non-normalized way using SQL functions, string concatenation or by simple control placement. How you display data to the user should not dictate your data model. They seldom coincide.
In the example you provided, you would need three columns to hold price information unless you decided to either duplicate all row data for each price type, or move prices to a separate table. One price column in the same table would not cut it.
As far as "the actual problem", there isn't one. You're trying to use standard sort routines to sort data in a non-standard way; what's more, your data appears to be stored in a fashion that is not conducive to ever having meaningful reporting or display filtering options.
If you are completely devoted to storing your data in the manner you suggest, then I would advise investing some time learning how to implement the IComparable interface, and create your own collection class that's sortable. Please note that this option is less than optimal, to put it mildly.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hi all, i'm using System.IO.File to copy a shortcut to my application into the startup directory but on Windows 2000 machines the "Target" part of the shortcut is being renamed to my1~.exe instead of myshortcut.exe. This causes the applications process name to be changed to my1~.exe instead of myshortcut.exe which causes me problems in other applications. Anyone able to tell me how to either, change the target name back to what it should be after the file has been copied or prevent the name from being changed in the first place.
Cheers
Kev
|
|
|
|
|
Can any one let how to create toolbar in excel. I want to add new buttons to the toolbar and provide my own implementation when the user clicks the button
"The world's biggest power is the youth and beauty of a woman."
|
|
|
|
|
Go to Microsoft and look up the Office automation objects. I think that they should tell you everything that you need to know. You will likely need to get what are called the PIAs (I dont remember what they stand for now... something interop assemblies) which are essentially COM objects. With these you can pretty much interface with office directly.
I hope that this helped, email me if you need more help,
Jim
|
|
|
|
|
Hi!
I'm starting to create my own ebook reader as ms reader or mobipocket reader but I don't know how to start from the begin.
Please tell me some intruction, what elements I need, .....
Thanks for your help, I want to do it for convert all my documents to ebook!
|
|
|
|
|
Dinh Quan wrote:
what elements I need
I think the question you have to ask yourself is what elements do you want.
Write down a list of features that you want. Then write down everything you will need in order to create that feature. If there is anything in the list that you don't understand then find books or articles on the topic and read them. Design your application and then write the code for it.
If there is anything that you get stuck on when you are coding it then I'm sure we can help you better than we can now.
Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums
|
|
|
|
|
Colin Angus Mackay wrote:
Write down a list of features that you want
I'm so amazing to get a fast reply, I guess my application is similar an documents reader as mobipocket.com, eReader.com. I have some ideas about my projects:
+ Can compile html, oeb (open ebook file), text, .doc file format( from the begin I think it support for text and html files first ) to a file can store and compress it to make a small size)
+ The reader can read my files and tranform (HTML) it as one or two page similar the way ms reader or ereader.com show ebook for everyone.
==> I think some items I need is:
+ HTML, XHTML, OEB Render -> read and tranform with small tag support
+ HTML, XHTML Pager <==this is very importan because it control the application speed.
+ How to compress my file read it from my reader
+ Compression and Decompression methor, I'm look for how to Decompression fastest and got a minimum of RAM resource.
I'm very thanks for all suggest, demo programes especial source code about it.
|
|
|
|