Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP's ON KEY LABEL in .NET
Message
 
À
15/03/2007 05:45:10
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01203273
Message ID:
01203893
Vues:
10
Robert,

Thanks! I'll try to play on what you've suggested.


>For a combination of keys take a look at the KeyDown event; in my example I check for CTRL + A and ESCAPE
>
>
>    static class Program
>    {
>        [STAThread]
>        static void Main()
>        {
>            Application.EnableVisualStyles();
>            Application.SetCompatibleTextRenderingDefault(false);
>            Form1 frm = new Form1();
>            frm.KeyPress += new KeyPressEventHandler(new KeyPressCode().keypressEvent);
>            frm.KeyDown += new KeyEventHandler(new KeyPressCode().keydownEvent);
>            Application.Run(frm);
>        }
>    }
>
>    public class KeyPressCode
>    {
>        public void keypressEvent(object sender, KeyPressEventArgs e)
>        {
>            if (e.KeyChar == (char)Keys.Escape)
>            {
>                MessageBox.Show("Key ESCAPE pressed.");
>            }
>        }
>
>        public void keydownEvent(object sender, KeyEventArgs e)
>        {
>            if (e.Control && e.KeyCode == Keys.A)
>            {
>                MessageBox.Show("Key CTRL + A pressed");
>            }
>        }
>    }
>
>
>>Robert,
>>
>>It seems to me that combination of keys is not possible as I looked at the possible keys available in Keys enumeration and there is none i.e. Ctrl+A, Ctrl+B, etc. Would it be possible to have combination of keys just like the SendKey.Send function?
>>
>>Thanks for your response!
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform