You're getting a black screen because the image you're capturing is on a Desktop that is no longer visible. When the workstation is locked, the user see a different Desktop. Whatever you're using to capture the screen isn't written to handle multiple Desktops.
Some user interface elements are not controls, e.g. TreeNode, ToolTip and all of the classes derived from ToolStripItem. If you look at the base types for Button and ToolStripButton in the object browser you'll see
Button -> ButtonBase -> Control -> Component
ToolStripButton -> ToolStripItem -> Component
The consequence of this inheritance hierarchy is that a form's control collection does not contain the ToolStripItems and a ToolStripItem cannot be cast to a Control.
in windows application, i am using datagridview in a form to display the records from the database.
my query is that, when i select the checkbox and click edit button of any record from the datagridview the related value of the selected checkbox appear on the textbox of second form.
I might misinterpret your question, but if you want to know how to pass a value from Form1 to Form2 (that value being the selected value of a cell in datagrid), just read the value and send it as a parameter to the constructor of Form2 and set the Text property of the textbox (of Form2) to the parameter value.
I have a huge problem and I have no idea how to fix it. I have two different web services - one we'll call LibrarySearch and one we'll call LibrarySorter. These are two different projects. Both have a class called Book and it's the same exact class.
But when I call each of them they return as LibrarySearch.Book and LibrarySorter.Book ... and I have no way of converting these to some generic item which I can use (without having to create two objects, one for each result depending on whether the user did a search or a sort).
Please help. I even tried to serialize to a stream, and de-serialize back and it still didn't work.
Thank you for your time.
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
Web services are not OO friendly, in fact outlining why is a classic interview question. The Book class in the LibraySorter is not the same type as the Book class in the LibrarySearchas far as the proxies are concerned (even if the services use a common class from a dll for example). The generated proxy classes generated have different namespaces for one thing.
One solution is to take the pain:
Client model<--->client/proxy translator<--->proxy classes<--->service <--->service OM translator<--->OM
The translators aren't too bad, normally.
[Edit fixed spelling, also, see Pete's reply]
The problem is, as far as your code is concerned - these are two separate and discrete objects with no commonality, so you can't cast between them. This is because they are from two separate discrete sources - this is to do with the way that items are created when you import their definitions in - each reference has it's own physical implementation of the class.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
If you can change them both, then the best thing to do is to set up a separate assembly (LibraryUtilities or similar) which contains your Book class. Both services then refer to that.
Other than that, it's a case of manual conversion if you want to be safe - i.e. create a new LibrarySearch.Book from your instance of a LibrarySorter.Book and vice versa. They are treated as different classes because one of them could be changed without the other altering. Just casting (or serialize / deserialise) won't work because the compiler can't know they are the same: it sees the names are different and knows they could be different in the future.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Please post a specific question in the correct forum (in this case the PHP Forum). Your question doesn't really give any information about the problem, so if you re-post this there you'll won't get any helpful responses.
As Keith said, this is the C#-forum, if you want help in PHP, then post in the correct forum.
And what do you mean, "add into php a text"? Add a text into a database, show some text on the screen, add a comment-text into your PHP-code...? Your question is not clear at all.
And don't use bold text for your question.
edit: Your question's topic says "how to compose a content with PHP", therefore I assume you want to know, how to display text on the screen:
echo "your text";
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
In my C#/Winforms application, I want to define a string containing a subscript like the 2 in H2O. I tried to type H2O into Word and then copy it to the string resources, but the text changes to H2O (no subscript). The same thing happens when I paste it into C# code.
Does anybody know how to enter a subscript? I wouldn't mind using a string literal in C# code but ideally, I want to define this as a string resource.
Thanks! Yeah, something like "H\u2082O" as a C# literal gives the right result. H20 is the only thing I need right now, so I'll be OK.
Typing "H\u2082O" as string resource does not work. I guess there is some other kind of escape sequence for including a unicode character.
After reading up a bit more on the subject, it becomes clear why copy & paste does not work. Unicode does not implement subscripts and superscripts as markup, while HTML, RTF, MathML and probably Word do. Unicode only has a small set of subscript and superscript characters, so there is no easy translation between marked up text and unicode characters. So, in order to fully support subscript and superscript in resource files, we cannot use pure Unicode but rather have to use some form of markup like RTF or HTML.
There is no such thing as style, size, color, ... in a regular string, as a string is just a sequence of characters, without any style, size, color... attached to them. So if you want some formatting, it will have to be tailored to and handled by the target.
I can think of three ways to render a text with some non-homogeneous style attributes:
1. use the special characters in the font; this only works in limited cases, however it may suit your needs as there are some subscript and superscript digits in most fonts, and they have Unicode numbers.
2. use a Control that knows how to handle partial formatting; BTW that is what you did in your question, by using <sub> tags. A WebBrowser control knows how to handle them; a RichTextBox would deal with RTF commands; etc.
3. paint it yourself, using the Graphics class (assuming you're rendering to a Windows Form).
"For super or subscripted letters in phonetic transcription in particular, a change from superscript of subscript to regular style would alter the meaning. Note that such use in transcription is not limited to letters: superscripted small digits are often used to indicate tone."
So, in the phonetic presentation of text, w3c argues that tone is content and not formatting. I would actually think the opposite: tone is presentation and it would make more sense to use markup. For example, different dialects of a language may have different intonations while the contents remains the same.
How about text. By using the 'em' HTML tag, a specific part of a sentence will be highlighted or bolded and it may change the meaning of a sentence. Is this contents or formatting?
Here is one thing that I'm sure of: W3C, Unicode, OMG and whoever works in these groups are people who sometimes make decisions for the sake of practicality (although they'd like to give the impression that everything they do makes 100% sense). It would be very impractical to not be able to make the distinction between cm2 and cm2 in plain text. They also found it more practical in their phonetic presentation of text.
At the same rate, it is more practical to represent color, fonts, etc in markup than it is in Unicode characters.
I know Luc is correct and it was nice of him to give an elaborate reply. However, I found his answer a bit condescending, because it's obvious that color is style and not part of plain text, whereas subscript/superscript is in a bit of a different class (sometimes it's a character, sometimes it's style). Anyway, I should just be happy with his answer, which was helpful, and let my ego go
Last Visit: 31-Dec-99 18:00 Last Update: 4-Oct-23 4:47