|
1st.:
Don't add event on top level item
2nd:
Yust add event handler for each sub menu
ToolStripMenuItem subItem = new ToolStripMenuItem(CenterTables[i]);
subItem.Click += new System.EventHandler(subItem_Click);
firstItem.DropDownItems.Add(subItem);
Also there is no Select Event, but Click.
3rd: You can get item in Event Handelr
This code is in event handler and gets ToolStripMenuItem from Object that is passet into event handler. So every SubItem with a can use same event handler and can be distinguished betwen them
ToolStripMenuItem mnu = sender as ToolStripMenuItem;
|
|
|
|
|
It's great!!!!
Thanks a lotz
|
|
|
|
|
Hi all,
I am searching the Internet for articles on how to query exchange server 2003, without any result.... Can anyone perhaps provide me with a starting point? Struggling to get out of the block
More specific ... query the appointment items on a specific mailbox
Many thanks in advance.
Kind regards,
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
modified on Wednesday, October 7, 2009 2:37 AM
|
|
|
|
|
Hi all,
Well I found an example: here[^], but I keep receiving an exception, more specifically:
On this line of code: WebDavResponse = (System.Net.HttpWebResponse)WebDavRequest.GetResponse();
Exception: WebException
Description: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Any ideas how I can fix this?
Many thanks again.
Kind regards,
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
When requesting to https, you need to add a certificate with the request. Add that to ClientCertificates collection of request object.
To query exchange server and get all mails from inbox, you could do something like
string serverUrl = "https://yourdomain.com/exchange/userid/inbox/"
const string xml = "<?xml version='1.0'?>" +
"<g:searchrequest xmlns:g='DAV:'>" +
"<g:sql>{0}</g:sql>" +
"</g:searchrequest>";
string query = "SELECT * FROM SCOPE('SHALLOW TRAVERSAL OF \"" + serverUrl + "\"') " + "WHERE \"DAV:isfolder\" = false";
string requestString = string.Format(xml, query);
WebHeaderCollection headers = new WebHeaderCollection();
headers.Set("Pragma", "no-cache");
headers.Set("Translate", "f");
headers.Set("Depth", "0"); WebDavRequest.Method should be SEARCH . Set the WebHeaderCollection to WebDavRequest.Headers property.
I have written a useful WEBDAV wrapper for one of our application. I can share as an article later
|
|
|
|
|
Hi Navaneeth,
Thank you for the information, really appreciate it.
N a v a n e e t h wrote: Add that to ClientCertificates collection of request object.
Hmmm ... this sounds like the difficult part ...
N a v a n e e t h wrote: I have written a useful WEBDAV wrapper for one of our application. I can share as an article later
That would be awesome!!
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi Navaneeth,
Now I keep receiving the following error message, could it be that the WebDav is disabled on the exchange server?
The remote server returned an error: (440) Login Timeout.
Thanks again.
Kind regards,
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
Not sure. I haven't experienced this so far. All I can suggest is to try adding more timeout value.
|
|
|
|
|
Hi,
I am facing an issue when using ErrorProvider's SetError method.
It seems the character "&" is not displayed in the error description string.
<br />
string tempStr = "Input can not contain the characters: &,^,!";<br />
this.mainErrorProvider.SetError(this.inputTxtBox, tempStr);<br />
The above code displays the tool tip consisting of the provided string but the "&" character seems to be converted to "space" character.
I am using Visual Studio 2008 with project targeted for .NET 3.0 Framework.
Any help would be appreciated.
Thanks,
sysdeamon.
|
|
|
|
|
|
Thanks, "&&&" did the trick.
sysdeamon.
|
|
|
|
|
Dear All, I have serveral pdf files, any ideas how to merge them into single file?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
|
|
|
|
|
If you want full source, I suggest advertising on the job site, or perhaps rentacoder. Be careful, some people there take jobs, then just come here and ask us to do the work for them.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
how to post item to ebay from c#.net application.I want to list item in ebay site under particular category(for example lg camera under camera category).
|
|
|
|
|
What have you tried ? What does the ebay site say ? What does google suggest ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
R U Try ed any thing...,
i thing u have to use the ebay developers API's.
Go through this .., this may help u
Ebay APIs[^]
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Dear friends,
i have small doubt.. i need to take the FilePath (full path) using process id . how to get it?
if i Use WMI are Process class i could get only the exe name for an example i get like c:\windows\system32\notepad.exe
but i want the filepath (where the opend file is physicaly available)
any idea? link ..
plz help me
By
Joe.I
|
|
|
|
|
By filepath, you mean the path to the file that is open in notepad ? No chance in hell that will work. The program itself may keep track of what files it has open, but the system doesn't care.
With notepad, you can read the text on the title bar, I believe.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Dear Christian Graus
Thanks For ur replay ..
With notepad, you can read the text on the title bar, I believe.
ya i got this one. but still i was trying some other possiblity ...
another clarification ..
is it possible to get ProcessID in FileSystemWatcher+create event?
my requirement is When the User "Save As" a file i want the full file path how to do that??
Thank U
Joe.I
|
|
|
|
|
=>Joe<= wrote: my requirement is When the User "Save As" a file i want the full file path how to do that??
I believe that articles exist on how to hook into notepad and add your own code to it. The process would be different for every program. If the standard file save dialog is used, that may be a hook too, but I doubt it. Your best bet really would be to watch the whole file system and watch when new files are created.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|