|
Thank you very much.
I've tried to do it by deselecting items (SetSelected method) and using SelectedValue property...but your way is much more better. Thanks.
|
|
|
|
|
|
I know system.web.mail name space but it does not work every time.
I need more reliable library to do that. If some body knows such dll or windows application, please introduce me.
Thanks
Rastegar
|
|
|
|
|
m.rastgar wrote: I know system.web.mail name space but it does not work every time.
I need more reliable library to do that.
Could I suggest that it isn't the classes in the namespace that are unreliable but something else, for example your network connection or email server, etc.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
|
my problem is how can i tracks a server's response times and records the results of all monitoring requests into its built-in database. using Historic monitoring data and can analyzed for uptime/down time reports and trend analysis.
|
|
|
|
|
First of all there are companies that check ur site for up and down time, for example http://www.siteuptime.com/[^]
You can also write your own app, that connects every X seconds to your website, and tries to open some page. Add some timers to the app, and store the info in some database. The only problem you have is that maybe you desktop app that checks ur website is behind a not so reliable internet connection, or a slow internet connection. This might blur the results.
|
|
|
|
|
hi to all,
i have to move a word document from one directory to another, but if the document is open i can't move it.
how can i close the document before i move it (i have no instance of word to this document so i can't use the method close(), all i have is the path and the document name)
best regards and thanks in advance
fady
|
|
|
|
|
Well you can first try to move it, if it doesn't move, you can throw some messagebox response asking the user to close the Word file. You can also automatically close the word file, by using the Process class.
Something like
<br />
Process[] p = System.Diagnostics.GetProcessesByName("winword.exe");<br />
for (int i = 0; i < p.length ;i++) {<br />
p[i].Close();
}<br />
|
|
|
|
|
hii.
can we use private static field??
if yes then what is the use odf such field??
|
|
|
|
|
yes you can use it.
The use is e.g. in a singleton class with a getter of the instance
Regards
Hansjörg
|
|
|
|
|
I need to apply acertain style sheet and put table in the body of an email sent using C#.net
this is part of my code
mailMsg .Body += " name: " +
"";
mailMsg .Body +="" + name.Text + "
";
mailMsg .Body +="To: " +
"";
i want something instead of these s
Pride and No
|
|
|
|
|
|
I have posted an article at:
http://www.codeproject.com/useritems/FP_Analysis_Tool_in_NET.asp[^]
If you do not use the demo and want to run the app by building the sources, please install the demo first. Copy the .mdb (database) file from installation folder to the bin/debug and bin/release folders of the sources.
Sorry for the inconvenience.
|
|
|
|
|
I need help. I have a combobox with this code in it:
case 0: MessageBox.Show("Windows Longhorn 1 (1024x768)","Windows Longhorn Cool (1024x768)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\windows longhorn (1024x768).jpg"); break;<br />
case 1: MessageBox.Show("Windows Longhorn 1 (420x336)","Windows Longhorn Cool (420x336)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\windows longhorn (420x336).jpg"); break;<br />
case 2: MessageBox.Show("Windows Longhorn Define the digital decade (1024x768)","Longhorn Define the digital decade"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\Windows Longhorn Define the Decade (1280x1024).jpg"); break;<br />
case 3: MessageBox.Show("Windows Longhorn M6 Build Orange (800x600)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\New Longhorn orange M6 (800x600).jpg"); break;<br />
case 4: MessageBox.Show("Windows Longhorn M6 Build Orange (1024x768)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\New Longhorn orange M6 (1024x768).jpg"); break;<br />
case 5: MessageBox.Show("Windows Longhorn Home Edition (1600x1200)","Longhorn Home Edition Wallpaper"); System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\Windows Longhorn Home (1280x1024).jpg"); break;<br />
case 6: MessageBox.Show("Windows Longhorn Green Glow (420x336)", "Windows Longhorn Green Glow"); System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\Windows Longhorn Green Glow (420x336).jpg"); break;<br />
<br />
}
WHen I choose an case up to case 4, the image displays in the pictureBox1. But if I choose case 5 or case 6, the image does not show. Why? Could you help me?
In the end we're all just the same
|
|
|
|
|
Case 4 and lower your wrote:
<br />
pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\New Longhorn orange M6 (800x600).jpg"); break;
case5 and 6 you wrote:
<br />
System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\Windows Longhorn Green Glow (420x336).jpg"); break;
You forgot to add pictureBox1.Image = to case 5 and 6
|
|
|
|
|
Well. My mistake.
In the end we're all just the same
|
|
|
|
|
Hello,
I have to do the follwing steps:
1) add controls to a panel programatically
2) make initialization steps in the added control (e.g. add labels) depending on the size
it could be also that the added controls contains other subcontrols for which this steps are also needed...
Normally I think the best way to do that is the Load event, isn't it? But in panel it isn't availaible. What is the best way to solve that?
Regards
Hansjörg
|
|
|
|
|
Put it in the the constructor after Initialize()
|
|
|
|
|
I don't like this solution very much, because a few properties are set after the instantiation. This properties affect the behaviour of the panel.
Regards
Hansjörg
|
|
|
|
|
Maybe hook on to Panel.ControlAdded . The problem is that this one gets fired after the addition of every one of your controls.
|
|
|
|
|
It seems that this is the only solution but it is more work to coding...
Regards and thanks
Hansjörg
|
|
|
|
|
I need help. I have a combobox with this code in it:
case 0: MessageBox.Show("Windows Longhorn 1 (1024x768)","Windows Longhorn Cool (1024x768)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\windows longhorn (1024x768).jpg"); break;<br />
case 1: MessageBox.Show("Windows Longhorn 1 (420x336)","Windows Longhorn Cool (420x336)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\windows longhorn (420x336).jpg"); break;<br />
case 2: MessageBox.Show("Windows Longhorn Define the digital decade (1024x768)","Longhorn Define the digital decade"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\Windows Longhorn Define the Decade (1280x1024).jpg"); break;<br />
case 3: MessageBox.Show("Windows Longhorn M6 Build Orange (800x600)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\New Longhorn orange M6 (800x600).jpg"); break;<br />
case 4: MessageBox.Show("Windows Longhorn M6 Build Orange (1024x768)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\New Longhorn orange M6 (1024x768).jpg"); break;<br />
case 5: MessageBox.Show("Windows Longhorn Home Edition (1600x1200)","Longhorn Home Edition Wallpaper"); System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\Windows Longhorn Home (1280x1024).jpg"); break;<br />
case 6: MessageBox.Show("Windows Longhorn Green Glow (420x336)", "Windows Longhorn Green Glow"); System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\Windows Longhorn Green Glow (420x336).jpg"); break;<br />
<br />
}
WHen I choose any case up to case 4, the image displays in the pictureBox1. But if I choose case 5 or case 6, the image does not show. Why? Could you help me?
In the end we're all just the same
|
|
|
|
|
case 0: MessageBox.Show("Windows Longhorn 1 (1024x768)","Windows Longhorn Cool (1024x768)");
pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\windows longhorn (1024x768).jpg"); break;
case 1: MessageBox.Show("Windows Longhorn 1 (420x336)","Windows Longhorn Cool (420x336)");
pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\windows longhorn (420x336).jpg"); break;
case 2: MessageBox.Show("Windows Longhorn Define the digital decade (1024x768)","Longhorn Define the digital decade"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\Windows Longhorn Define the Decade (1280x1024).jpg");
break;
case 3: MessageBox.Show("Windows Longhorn M6 Build Orange (800x600)");
pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\New Longhorn orange M6 (800x600).jpg");
break;
case 4: MessageBox.Show("Windows Longhorn M6 Build Orange (1024x768)");
pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\New Longhorn orange M6 (1024x768).jpg");
break;
case 5: MessageBox.Show("Windows Longhorn Home Edition (1600x1200)","Longhorn Home Edition Wallpaper"); pictureBox1.Image =System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\Windows Longhorn Home (1280x1024).jpg");
break;
case 6: MessageBox.Show("Windows Longhorn Green Glow (420x336)", "Windows Longhorn Green Glow");
pictureBox1.Image =System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\Windows Longhorn Green Glow (420x336).jpg");
break;
in case 5 and 6 picturebox1.Image didn't been initialize with picture (1280x1024).jpg and (420x336).jpg"
|
|
|
|
|
I have posted an article at:
http://www.codeproject.com/useritems/FP_Analysis_Tool_in_NET.asp[]
If you do not use the demo project and run the app by building the sources, you will get an error in the beginning. That is because the database file is not available in bin/debug and bin/release folders. If you want to run the built app, please install the demo and copy the DB file from installation folder to the bin/debug and bin/release folders. Sorry for the inconvenience.
|
|
|
|