|
I have a .Net Win form which has a) main menu, b) tree control, c) a custom control to display details of the selected TreeNode
-----------------------------
MainMenu:
mnuDelete -> [del]
mnuCopy -> [ctrl+c]
mnuCut -> [ctrl+x]
mnuPaste -> [ctrl+v]
Tree Control: is the standard .Net treeview with HideSelection = false. (So the selected node is always highlighted even if the input focus is moved to another control)
Detail view Custom Control: Contains few textboxes
The problem I'm having is that when I'm on detail view, and making changes in the textbox, I press CTRL + [C, X, V] or Delete keys on the keyboard, but the key is captured by the main menu, and which trigger an event for {menu_name}_click(...). I do not want this event to be fired but want it to be handled by the textbox control.
Any suggestions would be greatly appreciated.
Thanks.
- Malhar
|
|
|
|
|
I believe the textbox has a property for if it swallows key events or passes them on.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Try this solution:
http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c94c.aspx#q808q
You're after 27.9
Hope this helps.
|
|
|
|
|
I have a c# windows service that I have installed on a number of servers, but when I try to install it on this one particular server I get the following error when running installutil:
No public installers with the RunInstallerAttribute.Yes attribute could be found in the xxx assembly.
Remove InstallState file because there are no installers.
Has anyone run into this before?
dpb
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
Google[^] has. I'm sure one of those will help you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hello
can anyone tell me how we will access parallel in c# and how to read or write data on it.wether we use any dll for it or what else please tell me
thanks
|
|
|
|
|
|
hii all;
i got a very serious problem, there is two process that read/write xml files in the same time how can i control this with good preformance and without exception.
thx alot for your time.
marcoryos
|
|
|
|
|
is this problem related to thread issue
as you know you now have synchronize access to the file
you need to take care when you read while you are write
at the same time
so you have to consider some thread synchronization
in your code
Note:not all thread synchronization available in .net
will work for interprocess communication
|
|
|
|
|
|
i think using lock may not work in his case
because when using lock you actutually using Monitor
which Prevents more than one thread at a time from accessing a file but it have not ability to span application and process boundaries
|
|
|
|
|
I have an issue in my project. I am dowloading a webpage and reading line by line of the site.
The output I get is the full webpage displaying the information on the site and also the tags.
Is there any possibilities to write some code to ignore the tags so that only the interesting bits of the page will be displayed?
I am using the .NET compact framework and need this in C#.
Anyone have a clue?
Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
|
|
|
|
|
you need to parse the page source and extract the info you want
|
|
|
|
|
One way of efficiently extracting data like that from a string is to use a regular expression. Have a look att the RegEx class.
You say that you read line by line? The html page is not line oriented at all, so there is no reason to read it line by line. Read it all into a string, then extract what you want from that string.
---
b { font-weight: normal; }
|
|
|
|
|
How to loop through the Hash Table.I get the collection of keys in hashtable and loop through that but its not working.Help me.
Regards.
S.Sevugan
|
|
|
|
|
How to loop through the Hash Table.I get the collection of keys in hashtable and loop through that but its not working.Help me.
Regards.
S.Sevugan
|
|
|
|
|
Hashtable hashTable = new Hashtable();
hashTable.Add("1", "AAA");
hashTable.Add("2", "BBB");
hashTable.Add("3", "CCC");
IDictionaryEnumerator hashEnum = hashTable.GetEnumerator();
while ( hashEnum.MoveNext())
{
Console.WriteLine(hashEnum.Key.ToString() + ":" + hashEnum.Value.ToString());
}
Live Life King Size
Alomgir Miah
|
|
|
|
|
A simple foreach over the Keys property should do the job
foreach(object obj in hashtable.Keys)
{
...
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Agreed.
Live Life King Size
Alomgir Miah
|
|
|
|
|
Or even simpler, over the Values, if those are what you're interested in.
Matt Gerrans
|
|
|
|
|
Or, even more complete, use
foreach (DictionaryEntry ent in myHashtable)
{
...
} where you immediately get each key-value-pair...
Regards,
mav
|
|
|
|
|
I'm using crystal reports to view data in an access database. The problem I am having is that the report is not releasing the access database.The lock file is still there when I close the Form that the Report is in. I have to close the program and restart to release the database.
I have tried the "Dispose" method when closing the form. That seemed to work for a while but I eventually had to close the program again because the database was not being released.
Are there any suggestions? I would like to close the Report's connection to the database everytime that I close the Report's form.
|
|
|
|
|
I am presently trying to use just the UNC patch to the location of the batch.exe file that is located on a server. The example I am attempting is here below.
Process p = null;
p = new Process();
string targetDir;
targetDir = string.Format(@"\\servername\sharename\foldername\parentfolder");
p.StartInfo.WorkingDirectory = targetDir;
p.StartInfo.FileName = "Scan.bat";
p.StartInfo.Arguments = string.Format("Batch File Console");
p.StartInfo.CreateNoWindow = false;
p.Start();
p.WaitForExit();
Form1 f = new Form1();
MessageBox.Show ("Selected script has been Completed");
this.Close();
Is there a way to use a UNC patch without having a drive letter mapped to this share.
Thanks tstang
|
|
|
|
|
Hi,
Just from my experience with rolling out patches over a network I have found that there is no way to use UNC paths within a batch file. MS-DOS doesn't handle them nicely... the only way I could get around this was to add another couple of lines to the start of the batch file that mapped the dir to a driver letter:
net use z: \\PATH_TO_HOST\...<br />
cd z:\<br />
EXEC batchfile.bat
Hope that helps.
|
|
|
|
|
Has anyone been working with the VS 2005 Beta? I've been trying to deploy to my mobile device but it says I need an updated version of Active Sync. I already have 3.8 - is there a newer Beta version I can use?
|
|
|
|