|
This question has already been answered here[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi All,
I am stuck with Icon overlay, I am developing windows project using C#,
How to overlay an icon over existing shell objects in 3 easy steps[^]
i am trying to implement icon overlay using above link, but how to use it i am not get it, i am used export and import is there any solution for icon overlay any one help me Plz..
Thank you,
|
|
|
|
|
When you are trying to get something working based on an article, the best place to ask questions is on the forum for that article. There's precious little chance that an author will happen on by and pick up a question in an unrelated forum.
|
|
|
|
|
Hello!I have a problem.I try to make a program which when I press a button my program execute this:
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse rsp = (HttpWebResponse)req.GetResponse();
The problem is when the url is not valid my program is blocking at this sequence: HttpWebResponse rsp = (HttpWebResponse)req.GetResponse();
What can I do for my program show me a message when the url is not valid?
|
|
|
|
|
What does "the url is not valid" mean?
When I try string url = "http://www.google.con"; , I receive a DNS error ("could not resolve name").
When I try string url = "http://www.google.com/blah.php"; , I receive error 404 ("not found").
I do not know the URL you tried. Try waiting for some time (about a minute), and see if you run into a tme-out. In any case, you should get an exception telling the reason.
|
|
|
|
|
More exactly i try the url that contain the port.
|
|
|
|
|
Enclose the code in a try catch block and log the Exception message. You'll know why your call failed after the call times out.
|
|
|
|
|
i tried this but if the url not exist first the program is blocking for 20 seconds and after give me a message :"Unable to connect to the remote server".
|
|
|
|
|
That's the correct behavior. What else you want it to do?
|
|
|
|
|
That's the error that Shameel is talking about.
If the url is being entered at runtime by the user and you want to validate the url before trying it, then there is no really simple way to do this. In this case you would have to write a validation method before you try the url.
Otherwise, the suggestion you have received already is the correct one.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
I want if the url is not valid the program skip quickly over this sequence.i want the program doesn't blocking
|
|
|
|
|
Then you need to run the web request in a background thread (or BackgroundWorker or Task).
|
|
|
|
|
This a good idea!I will try this.Thanks
|
|
|
|
|
hi
i have in my C# WinForm program DataGridView
i need to change the text color of any cell by code.
i try this:
dataGridView8[0, rowCounter].Style.ForeColor = Color.Red;
but it dosnt work
how to do it ?
thanks in advance
modified 13-Feb-12 2:12am.
|
|
|
|
|
Identify the Cell and change it's ForeColor.
Cell.ForeColor = "Red";
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i try this:
dataGridView8[0, rowCounter].Style.ForeColor = Color.Red;
but it dosnt work
|
|
|
|
|
This worked for me.
private void btnGC_Click(object sender, EventArgs e)
{
List<string> lData = new List<string>();
lData.Add("this one");
lData.Add("this one");
lData.Add("this one");
lData.Add("this one");
lData.Add("this one");
lData.Add("this one");
lData.Add("this one");
this.dataGridView1.DataSource = lData;
this.dataGridView1[0, 3].Style.ForeColor = Color.Red;
}
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
thanks for the help, but the color dosent change
|
|
|
|
|
Then there must be another issue, that code above changes the colour of the text in the specified cell!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'm wondering if the Subject is correct and pointing to the problem... If there's a hyperlink in the cell, would changing the Forecolor affect it, or is it going to default to the default hyperlink color?
|
|
|
|
|
Hi everyone! I am trying to write a string of text on Panel control modeled like a sheet of paper. There is no limit to the length of the text which means that I may need three of four or more of the sheets.
I am now facing a problem of knowing the last line of the text for a page so that if there are more words, I can add another sheet and write the rest of the text. I'm fighting with how to determine the point in the full text at which a page will be full so that I can create another sheet and add the rest of the text to the new sheet. Any ideas please. Thanks in advance.
|
|
|
|
|
Assuming this is a WinForms Panel you're talking about, and you are drawing text using Graphics.DrawString() , then what you need to look at is Graphics.MeasureString()
Given the right parameters, it will predict how much area DrawString is going to need to paint a string.
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
hi guys ....
i am having a report includes tablix "matrix" with row and column groups in the body of the report. I want to align the tablix at the center of the report after loading the data from my dataset.
another question:
my report always displayed in 2 pages whlie the 2nd page is empty "only header and footer are displayed" i tried 2 rezise every thing smaller but its already fits one page.
|
|
|
|
|
Hi All !
I want to save the content(Row And Column Cell) from a DatGridView To A XML file .how can i do it ?
thanks in advance for any Help !
|
|
|
|
|
If you DataGridView has a datasource, then simply use the WriteXml property[^]. This[^] explains the same process with code.
|
|
|
|