Click here to Skip to main content
15,891,633 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to count files and change directory using FTP/C# Pin
OriginalGriff12-Feb-19 20:02
mveOriginalGriff12-Feb-19 20:02 
AnswerRe: How to count files and change directory using FTP/C# Pin
Richard Deeming13-Feb-19 10:46
mveRichard Deeming13-Feb-19 10:46 
Questionhow can get Windows.Security.Credentials.dll lib C# Pin
Member 1414061510-Feb-19 3:36
Member 1414061510-Feb-19 3:36 
AnswerRe: how can get Windows.Security.Credentials.dll lib C# Pin
OriginalGriff10-Feb-19 4:11
mveOriginalGriff10-Feb-19 4:11 
AnswerRe: how can get Windows.Security.Credentials.dll lib C# Pin
Eddy Vluggen11-Feb-19 2:42
professionalEddy Vluggen11-Feb-19 2:42 
QuestionDo you use obfuscator? Pin
Froddo8-Feb-19 7:01
Froddo8-Feb-19 7:01 
AnswerRe: Do you use obfuscator? Pin
Gerry Schmitz8-Feb-19 10:40
mveGerry Schmitz8-Feb-19 10:40 
AnswerRe: Do you use obfuscator? Pin
Eddy Vluggen11-Feb-19 2:47
professionalEddy Vluggen11-Feb-19 2:47 
GeneralRe: Do you use obfuscator? Pin
Froddo12-Feb-19 6:52
Froddo12-Feb-19 6:52 
GeneralRe: Do you use obfuscator? Pin
Wastedtalent13-Feb-19 21:07
professionalWastedtalent13-Feb-19 21:07 
AnswerRe: Do you use obfuscator? Pin
BillWoodruff16-Feb-19 14:39
professionalBillWoodruff16-Feb-19 14:39 
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 

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.