|
Check out this link
http://www.wdvl.com/Authoring/Scripting/Tutorial/java_event_others.html
Hope it will help u
Navi
|
|
|
|
|
Thanks Navi,
The link you provided holds good for JAVA but not for C#.
Let me know if you can help me out in C#.
Regards
Kais
|
|
|
|
|
Hi,
The only way I could capture the TAB key was on the KeyUp event
Do your best to be the best
|
|
|
|
|
The keyup event does not get fired if you select the button and hit tab. The only event gets fired is the leave event.
|
|
|
|
|
Hello
The best thing to do, I believe, would be to handle the LostFocus event. It will be fired when the button loses focus whether by the tab key or the mouse.
Isn't this what you want? If not, please give more details.
Regards
|
|
|
|
|
Hi,
Thank you for your quick response.
As you mention, the lost focus (Leave event for the button) will get fired for both key board and mouse movements.
I explicitly need to capture Tab event generated on the button so that I can set the focus to some other control on the form. The reason is, Am using MDI form and displays two child windows side by side. On the first child window, when the focus is on the last control and the user clicks on TAB, the focus should go to the first control of second child window.
Hope things are clear and you might be in able to help me out.
Thanks
Regards
Kais
|
|
|
|
|
Hello
If you are using .Net 2.0 framework, handle the PreviewKeyDown event
private void MyButton_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
if (e.KeyData == Keys.Tab)
MessageBox.Show("Tab");
}
I hope this helps
Regards
|
|
|
|
|
I think I have to change to .Net 2.0.
Thats a great Event.
Thanks for that post.
Martin
|
|
|
|
|
Hello,
Do you whant to navigate with the Tab Key?
|
|
|
|
|
Yes, I need to navigation on the screen thru TAB.
Actually, Its MDI form and has two child windows displays side by side. On the first child window, when the focus is on the last control and the user hits TAB, the focus should go to the first control of the second child form.
Thanks in advace for all your suggestion/help
Regards,
Kais
|
|
|
|
|
Hello,
I think it's best to watch lostfocus event of the last control.
Then you can set Focus on the first Focus of the child Form.
Hope that helps you!
All the best,
Martin
|
|
|
|
|
Hi Martin,
Lost focus can happen even when the user select someother control via mouse. I need to implement TAB navigation. I cannot do this using Lost Control event.
Let me know if there is any other alternative.
Regards,
Kais
|
|
|
|
|
how to hide one column of gridlayout
how to check grid changed
sikandar
|
|
|
|
|
Hello
What is a GridLayout?? Maybe you Mean DataGridView, or Datagrid?
Regards
|
|
|
|
|
Hi,
I associate a multi-level contextMenu to a control by using contextMenuStrip. I associates right-click events
for each toolStripMenuItem, so there are many events registered
and it seems quite rather inefficiency. Are there any methods
similiar to the Toolbar that only one single click event is needed
for all buttons in the toolbar ?
Thanks
|
|
|
|
|
Hello everyone,
I have a regex object with "([A-Za-z0-9ığçöşüİĞÇÖŞÜ]{1})([A-Za-z0-9\sığçöşüİĞÇÖŞÜ])*$".. The pattern I want to implement is beginning with a letter/digit and continue with letter/digit/whitespace
But this pattern matches with something like 'a
Why is that and what can I do to correct my pattern..
Best regards!
PS: is there a way to make the input NOT contain two or more consecutive whitespaces ?
.:: Something is Wrong ::.
|
|
|
|
|
You have forgotten the ^ to match the beginning of the text.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
I am displaying the available COM ports in a combo box. But the system gives me the available port names in some order. i wish to arrange it in ascending order. I tried the following
<br />
string[] strPort = SerialPort.GetPortNames();<br />
<br />
Array.Sort(strPort);<br />
listBoxUpDownPort.Items.AddRange(strPort);<br />
But this do.. like this.
COM1
COM10
COM11
COM12
..
COM20
COM21
But i wanted to be like this
COM1
COM2
..
COM10
COM11
..
COM20
COM21
Thanks
Srini
|
|
|
|
|
hi if u findout the result.....
plzzzzzzzzzzz let me know it... i am facing the similar problem here.......
if i did it first will let u know.........
|
|
|
|
|
How about write a funtion to sort it :
static void Sort(string[] ports)
{
int[] portsNumber = new int[ports.Length];
for (int i = 0; i < ports.Length; i++)
portsNumber[i] = int.Parse(ports[i].Replace("COM", ""));
Array.Sort(portsNumber);
for (int i = 0; i < ports.Length; i++)
ports[i] = "COM" + portsNumber[i].ToString();
}
|
|
|
|
|
Hi thanks for ur reply,
I also tried to sort like this
<br />
string[] strPort=new string[] {"COM1","COM20","COM21","COM11","COM17","COM18","COM19","COM7"};<br />
string strTemp = "";<br />
for(int i=0;i<strPort.Length;i++)<br />
for (int j = 0; j < i; j++)<br />
{<br />
if (Convert.ToInt32(strPort[i].Substring(3)) < Convert.ToInt32(strPort[j].Substring(3)))<br />
{<br />
strTemp = strPort[j];<br />
strPort[j] = strPort[i];<br />
strPort[i] = strTemp;<br />
}<br />
}<br />
|
|
|
|
|
If i have a class "ClassA" having instance of a unmanaged object in it. and when i created the instance of ClassA. if exception comes then how the unmanaged object release the memory as CLR just release the memory of the managed code/managed object
Rickey
|
|
|
|
|
You'll have to encapsulate all the code where an exception can occur in a try/catch and release the memory in the catch case.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
You really should write an internal wrapper class that encapsulates the unmanaged resource. This class should have the responsibility for acquiring and releasing the resource properly and safely.
If you are using .NET 2.0, have a look at the SafeHandle[^] class, which may save you a lot of work and hassle.
Also, you need to make sure you implement IDisposable[^] on your wrapper (or the main class if you don't use the wrapper method). Check out http://www.codeproject.com/useritems/idisposable.asp[^] for more details on implementing the Dispose pattern.
|
|
|
|
|
ok i am using .Net 1.1, Suppose i have not used any exception handler and also not implemented the idisposable interface then how the memory will manage.Will this be the memory leakage or unmanage object managed by CLR(if any possible way is there)?
Rickey
|
|
|
|