|
Save an XML file into the user directory of the application. Do not use the app.config file as it is not meant to be written to.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
I have a checkbox and a combo box that is enabled/disabled using a button(to put into edit mode)
The thing is, I want the user to be able to read the text/check that is in the field, but not edit it.
With a text box, I can just change the backcolor to white and when .enabled is set to false, it only grays out the text but is still legible.
Any ideas?
Thanks
modified on Wednesday, May 21, 2008 4:08 PM
|
|
|
|
|
Hello
ComboBoxes also has a BackColor property which you can change at runtime.
So, where is your problem??
Regards
|
|
|
|
|
The backcolor propery for the combo box does not affect the background when enabled = false. The inside of the combo box greys out along with the text and is almost impossible to read. Same thing for a checkbox.
|
|
|
|
|
Nevermind about this.
I just used the AutoCheck property to restrict the Checkboxes, and I overlayed the ComboBoxes with a TextBoxes and toggle the visible property with the edit mode. Works well enough for me and makes everything legible.
MS should seriously consider adding a read-only property to combo boxes on the next .net update. I also hope they implement ILMerge into visual studio.
Michael
|
|
|
|
|
Hello
Glad that you made it
Regards
|
|
|
|
|
I am using this Code for reading Image from URL
private Image getImage(string url)<br />
{<br />
Image im = null;<br />
try<br />
{ <br />
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);<br />
request.Method = "GET";<br />
request.Timeout = 15000;<br />
request.ProtocolVersion = HttpVersion.Version11;<br />
<br />
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())<br />
{<br />
using (Stream responseStream = response.GetResponseStream())<br />
{ <br />
im = Image.FromStream(responseStream);<br />
}<br />
}<br />
}<br />
catch (Exception ex) <br />
{<br />
Debug.WriteLine("Exception in getThumbnail. Url: " + url + ". Info: " + ex.Message + Environment.NewLine + "Stack: " + ex.StackTrace);<br />
}<br />
return im;<br />
}
but if the URL like this
http://mud.mm-a5.yimg.com/image/1942583882[^]
the code will not work correctly.
How I can Fixed it ?
|
|
|
|
|
help me plyz
this message display after click the Button
Exception System.Net.WebException was thrown in debuggee:
The server committed a protocol violation. Section=ResponseStatusLine
|
|
|
|
|
Hi all
can someone pls tell me why multiple class inheritance is not supported in C#.net?
thanks
|
|
|
|
|
From WikiPedia[^]:
Multiple inheritance can cause some confusing situations (I believe they're referring to the diamond problem - see this[^] link. -- Ravi), so there is some debate over whether or not its benefits outweigh its risks.
Java compromises: it allows a class to inherit interfaces from more than one parent (that is, one can specify that a class inherits all the types from its parents and must have all of the same externally exposed methods of its interface-parents, and allow the compiler to enforce that), but can inherit implementation (methods and fields) from only one parent.
Microsoft's .NET languages such as C# and Visual Basic implement this interface approach as well. In contrast C++ implements full multiple inheritance.
/ravi
|
|
|
|
|
|
I asked a C# instructor several years ago this question. He said it was because the designers were worried the dumb people wouldn't understand multiple inheritance. (He added that most the dumb things in C# were done for this reason.)
This response is flippant, but I suspect more true than not. Multiple inheritance is very powerful and rarely used in good code, but when needed, it's really needed.
The solution was interfaces. Personally, I'd rather have had multiple inheritance, but what can you do? (I also think they should have had a scoped destructor mechanism built in. I'm sure everyone has their list of complaints.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I've read the license agreement for my webservice and specifically note the clause "one call per second per IP address", my question is about "masking" IP addresses. Is it possible to route my webservice calls through a proxy server in combination with multiple worker threads thereby possibly making more than 1 request per second? I've seen this technology before concerning web surfing. There are free proxy servers willing to route your packet traffic, I'm just not sure how to implement something like that. Basically give each thread its own proxy server that can route 1 call per second with the end result being 10 threads means 10 calls per second approxiamately.
|
|
|
|
|
That would be like cheating ... not?
- Jake
|
|
|
|
|
Why yes it would be, but thats the beauty of it. Any hints?
|
|
|
|
|
Hint to do something bordering on illegal? Something that can get you sued? I don't think so...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
So what? You're violating your license agreement with that provider. If they find out what you're doing, you'll be making a maximum of 0 requests per second.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am going to answer the technical side of your question:
I have done this before. My system consisted of following components:
1.Spider which collects proxy addresses from the web using google search and regex.
2.Proxy server test app. This apps goes thru the list of proxies and makes calls to webservice on my server using those proxies. This is done to make sure proxy acually works. Here is a good article on this topic http://www.codeproject.com/vb/net/web_service_by_proxy.asp
3.A webservice which serves up valid proxy addresses.
-- modified at 16:02 Thursday 17th August, 2006
|
|
|
|
|
If i have this:
public class Thing
{
public string sName;
public string sLength;
}
Thing Cheese = new Thing();
Cheese.sName = "Cheese, duh";
Cheese.sLength = "16 feet!!!"
How can i add it to a treeview so that i can do something like this:
this.treeView1.SelectedNode
and get the sName, and sLength?
Or is there something completely different that i have to do?
|
|
|
|
|
Design consideration asside you can inherit TreeNode
public class Thing : TreeNode
led mike
|
|
|
|
|
Well i did that, and i can succesfully add my object as a node, yay!
But no text is displayed, how do i name the node?
|
|
|
|
|
Woops, don't matter. It figures, i post, then i found ot how to do it...
|
|
|
|
|
Thats what the Tag property is for.
|
|
|
|
|
Hi all,
I will logout my application when the user idle for certain time. after logout i will display Auto logout Message as "User logged out since there was no action for 1 hr",
here i have a interesting problem, if the user opened certain form(Eg. GetStatus)in the application and then gone for 1 hr. then i am displaying the Auto Logout message over the Form(GetStatus).
Same thing happened for messagebox too. if some message box displayed during application run for eg."Click Yes to proceed" Yes/No. then the user gone for some time. the auto logout happened it displays the auto logout message over the alredy dispayed messagebox. How can i close the already displayed messagebox before showing the Autolout messagebox. here it would be a problem if the user clicks Yes on already displayed message box so i have to definitely close the Messagebox before showing autologout message.
Thanks
Srini
|
|
|
|
|
Hi,
You can try to SendKeys to the message box first before displaying the logout message box. Set the default button of the first message box which is used to close that message box. Then in the code, where you try to display the logout box, just send the 'Enter' or 'Return' key to close it !
Go through ths link
http://msdn2.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx[^]
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|