Click here to Skip to main content
15,885,757 members
Home / Discussions / C#
   

C#

 
GeneralRe: Do you use obfuscator? Pin
Froddo18-Feb-19 6:56
Froddo18-Feb-19 6:56 
AnswerRe: Do you use obfuscator? Pin
Member 1412742220-Feb-19 6:33
Member 1412742220-Feb-19 6:33 
GeneralRe: Do you use obfuscator? Pin
Froddo22-Feb-19 9:00
Froddo22-Feb-19 9:00 
QuestionDGVPrinter how to print Logo and a frame in the text Pin
Member 141432997-Feb-19 7:34
Member 141432997-Feb-19 7:34 
AnswerRe: DGVPrinter how to print Logo and a frame in the text Pin
OriginalGriff7-Feb-19 21:21
mveOriginalGriff7-Feb-19 21:21 
GeneralRe: DGVPrinter how to print Logo and a frame in the text Pin
Member 141432998-Feb-19 3:04
Member 141432998-Feb-19 3:04 
GeneralRe: DGVPrinter how to print Logo and a frame in the text Pin
OriginalGriff8-Feb-19 3:10
mveOriginalGriff8-Feb-19 3:10 
QuestionDisable focus in button with arrow right left up down Pin
Member 114269867-Feb-19 2:29
Member 114269867-Feb-19 2:29 
I have a problem. When i press the arrow down, up, right or left with focus in a button, i want the button have moved for direction selected, 
But this does not happen, another button is focused. I set TabStop of the button to false, but even so with the arrows still focuses other buttons. 
Below is the code for creating the button, and the method for moving it.


private void btnCreateNewButton_Click(object sender, EventArgs e)
        {
            Button button = new Button();
            button.Text = "";
            button.FlatStyle = FlatStyle.Popup;
            button.Left = 30;
            button.Top = 30;
            button.Width = 10;
            button.Height = 40;
            button.TabIndex = 1;
            button.TabStop = false;
            button.Click += new EventHandler(button_Click);
            button.MouseDown += new MouseEventHandler(cli_MouseDown);
            button.MouseMove += new MouseEventHandler(cli_MouseMove);
            button.PreviewKeyDown += new PreviewKeyDownEventHandler(cli_PreviewKeyDown);

            panel3.Controls.Add(button);
        }


private void cli_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
        {
            Button but = sender as Button;
            if (butMensagem.Focused)
            {
                int x = but.Location.X;
                int y = but.Location.Y;

                if (e.KeyCode == Keys.Right)
                {
                    x += 1;
                }
                else if (e.KeyCode == Keys.Left)
                {
                    x -= 1;
                }
                else if (e.KeyCode == Keys.Up)
                {
                    y -= 1;
                }
                else if (e.KeyCode == Keys.Down)
                {
                    y += 1;
                }

                but.Location = new Point(x, y);
            }
            else
            {
                
            }
        }

AnswerRe: Disable focus in button with arrow right left up down Pin
Ralf Meier7-Feb-19 2:41
mveRalf Meier7-Feb-19 2:41 
GeneralRe: Disable focus in button with arrow right left up down Pin
Member 114269867-Feb-19 2:53
Member 114269867-Feb-19 2:53 
GeneralRe: Disable focus in button with arrow right left up down Pin
Richard MacCutchan7-Feb-19 4:40
mveRichard MacCutchan7-Feb-19 4:40 
GeneralRe: Disable focus in button with arrow right left up down Pin
Richard MacCutchan7-Feb-19 6:10
mveRichard MacCutchan7-Feb-19 6:10 
AnswerRe: Disable focus in button with arrow right left up down Pin
Alan N7-Feb-19 5:22
Alan N7-Feb-19 5:22 
GeneralRe: Disable focus in button with arrow right left up down Pin
BillWoodruff9-Feb-19 19:56
professionalBillWoodruff9-Feb-19 19:56 
AnswerRe: Disable focus in button with arrow right left up down Pin
Gerry Schmitz7-Feb-19 6:22
mveGerry Schmitz7-Feb-19 6:22 
GeneralRe: Disable focus in button with arrow right left up down Pin
BillWoodruff10-Feb-19 9:07
professionalBillWoodruff10-Feb-19 9:07 
QuestionC# GUI for plotting real time MPU(acceleration) scensors Pin
Member 141421336-Feb-19 7:23
Member 141421336-Feb-19 7:23 
AnswerRe: C# GUI for plotting real time MPU(acceleration) scensors Pin
Gerry Schmitz6-Feb-19 8:01
mveGerry Schmitz6-Feb-19 8:01 
GeneralRe: C# GUI for plotting real time MPU(acceleration) scensors Pin
Member 141421336-Feb-19 8:41
Member 141421336-Feb-19 8:41 
GeneralRe: C# GUI for plotting real time MPU(acceleration) scensors Pin
Gerry Schmitz6-Feb-19 16:59
mveGerry Schmitz6-Feb-19 16:59 
GeneralRe: C# GUI for plotting real time MPU(acceleration) scensors Pin
Member 141421337-Feb-19 6:24
Member 141421337-Feb-19 6:24 
GeneralRe: C# GUI for plotting real time MPU(acceleration) scensors Pin
Gerry Schmitz7-Feb-19 6:32
mveGerry Schmitz7-Feb-19 6:32 
GeneralRe: C# GUI for plotting real time MPU(acceleration) scensors Pin
Dave Kreskowiak7-Feb-19 2:21
mveDave Kreskowiak7-Feb-19 2:21 
AnswerRe: C# GUI for plotting real time MPU(acceleration) scensors Pin
OriginalGriff6-Feb-19 8:02
mveOriginalGriff6-Feb-19 8:02 
GeneralRe: C# GUI for plotting real time MPU(acceleration) scensors Pin
Member 141421336-Feb-19 8:39
Member 141421336-Feb-19 8:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.