Форум программистов, компьютерный форум, киберфорум
C# Windows Forms
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.97/65: Рейтинг темы: голосов - 65, средняя оценка - 4.97
0 / 0 / 0
Регистрация: 17.11.2013
Сообщений: 14

Как вывести что-либо в textBox при нажатии на кнопку?

26.12.2013, 10:40. Показов 13053. Ответов 11
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Всем привет. Создаю калькулятор. С горем по полам сделал форму. Теперь хочу вывести что-либо на дисплей при нажатии на кнопку (например на любую кнопку 1-9).
Как мне из обработчика события private void Button_Click (object sender, EventArgs e) вывести что-либо на дисплей?
Знаю что есть метод Text у TextBox. При обращении к нему из Button_Click начинает ругаться среда разработки.
Создал отдельный метод класса txtDisplay, который должен был выводить что-либо.
C#
1
2
3
4
public void OutMsg (int msg)
            {
                Display.Text = Convert.ToString("smg");
            }
Тоже не помогло

Program.cs
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using System;
using System.Windows.Forms;
using System.Drawing;
 
 
    class Calc
    {
        public static void Main()
        {
            CalculatorForm Calculator = new CalculatorForm();
            Calculator.Height = 275;
            Calculator.Width = 204;
            Calculator.FormBorderStyle = FormBorderStyle.FixedDialog;
            Calculator.Text = "Calculator";
            Application.Run(Calculator);
        }
    }
Form.cs
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using System;
using System.Windows.Forms;
using System.Drawing;
 
/***********************
 * Рисуем форму 
 **********************/
 
 
        class CalculatorForm : Form
        {
            
            public CalculatorForm()
            {
                txtDisplay Display = new txtDisplay(this);
                ArrayButtons buttons = new ArrayButtons(this);       
            }      
 
        class txtDisplay
        {
            private TextBox Display = new TextBox();
 
            public txtDisplay (Control parent)
            {
                Display.Parent = parent;
                Display.Size = new Size(200, 100);
                Display.BackColor = System.Drawing.Color.White;
                Display.ReadOnly = true;
            }
 
        }
 
        /***********************
         * Создаем массив кнопок
         **********************/
 
        class ArrayButtons
        {
            private Button[,] ArrayNumButtons;
            private Button NulButton = new Button();
            private Button[,] OperationButton;              // Кнопка 0
            
            public ArrayButtons(Control parent)
            {
                ArrayNumButtons = new Button[3,3];          // кнопки 1-9
                OperationButton = new Button[1,4];          // Кнопки + - * /
                int NumOfCell=0;
                for (int y = 0; y < ArrayNumButtons.GetLength(1); y++)
                {
                    for (int x = 0; x < ArrayNumButtons.GetLength(0); x++)
                    {
                        ArrayNumButtons[x,y] = new Button();
                        ArrayNumButtons[x,y].Width = 50;
                        ArrayNumButtons[x,y].Height = ArrayNumButtons[x, y].Width;
                        ArrayNumButtons[x,y].Location = new Point(0 + x * 50, 150 - y * 50);
                        ArrayNumButtons[x,y].Parent = parent;
                        ArrayNumButtons[x,y].Click += new EventHandler (Button_Click);  // одно событие на все кнопки 1-9?
                        ArrayNumButtons[x,y].Text = Convert.ToString(1+NumOfCell);  
                        NumOfCell++;
                    }
                }
                NumOfCell=0;
 
                // Заполняем поля для кнопки 0
 
                NulButton.Location = new Point(0,200);
                NulButton.Height = 50;
                NulButton.Width = 150;
                NulButton.Text = Convert.ToString(0);  
                NulButton.Parent = parent;
 
                // Заполняем поля для кнопок + - * /
 
                for (int y = 0; y < OperationButton.GetLength(1); y++)
                {
                    OperationButton[0,y] = new Button();
                    OperationButton[0,y].Width = 50;
                    OperationButton[0,y].Height = OperationButton[0, y].Width;
                    OperationButton[0,y].Location = new Point(150, 200 - y * 50);
                    OperationButton[0,y].Parent = parent;
                    NumOfCell++; 
                }
                OperationButton[0,0].Text = Convert.ToString("+");  
                OperationButton[0,1].Text = Convert.ToString("-");
                OperationButton[0,2].Text = Convert.ToString("*");
                OperationButton[0,3].Text = Convert.ToString("/");
            }
 
            private void Button_Click (object sender, EventArgs e)
            {
              
            }
 
        }
    }
0
IT_Exp
Эксперт
34794 / 4073 / 2104
Регистрация: 17.06.2006
Сообщений: 32,602
Блог
26.12.2013, 10:40
Ответы с готовыми решениями:

При нажатии на кнопку одной формы, что-либо записывается в TextBox другой формы
Я хочу чтобы нажав на кнопку своей второй формы, какой то текст записался в поле первой формы помогите пожалуйста: private void...

При нажатии на кнопку менялось значение TextBox
Здравствуйте! У меня есть четыре кнопки: платинум, титаниум, хромиум, аурум. И один пустой TextBox. Как сделать так, чтобы при нажатии на...

Добавление элементов TextBox при нажатии на кнопку
Не как не могу понять как сделать так, что бы при нажатие на кнопки добавлялись элементы TextBox снизу. Я примерно думаю что надо создать...

11
 Аватар для Козадоев
164 / 154 / 33
Регистрация: 05.03.2013
Сообщений: 876
26.12.2013, 11:09
C#
1
2
3
4
5
 private void Button_Click (object sender, EventArgs e)
            {
decimal a = 10.0M;
Display.Text = a.ToString();      
            }
0
0 / 0 / 0
Регистрация: 17.11.2013
Сообщений: 14
26.12.2013, 11:53  [ТС]
Цитата Сообщение от Козадоев Посмотреть сообщение
C#
1
2
3
4
5
 private void Button_Click (object sender, EventArgs e)
            {
decimal a = 10.0M;
Display.Text = a.ToString();      
            }
Не работает. Ругается на Display.Text = a.ToString(); The name 'Display' does'n exist in the current context
Объект Display создаётся в конструкторе формы. Мне кажется что это не в области видимости обработчика события от нажатия кнопки. А как "достучаться" до Display.Text ума не хватает.
0
50 / 49 / 41
Регистрация: 17.12.2013
Сообщений: 101
26.12.2013, 12:00
Nic_bez_cifr, если хочешь обращаться напрямую, то пока она private ничего не получится, только через методы. Или делай public.
C#
1
public TextBox Display = new TextBox();
хотя может проблема и другом особо к коду не присматривался.
0
0 / 0 / 0
Регистрация: 17.11.2013
Сообщений: 14
26.12.2013, 12:12  [ТС]
Не выходит.
Так же создал соответствующий метод. Аналогично. Результата нет. Уже голову сломал.
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class txtDisplay
        {
            public TextBox Display = new TextBox();
 
            public txtDisplay (Control parent)
            {
                Display.Parent = parent;
                Display.Size = new Size(200, 100);
                Display.BackColor = System.Drawing.Color.White;
                Display.ReadOnly = true;
            }
 
            public void OutMsg (int msg)
            {
                Display.Text = Convert.ToString("smg");
            }
        }
0
 Аватар для Spectral-Owl
608 / 583 / 157
Регистрация: 29.06.2010
Сообщений: 1,620
26.12.2013, 12:23
Nic_bez_cifr, я совершенно не понял почему всё сделано именно через это, но следующий код рабочий:
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
 
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        txtDisplay Display;
        int a = 0;
        public Form1()
        {
            InitializeComponent();
            Display = new txtDisplay(this);
        }     
 
        class txtDisplay
        {
            private TextBox Display = new TextBox();
 
            public txtDisplay (Control parent)
            {
                Display.Parent = parent;
                Display.Size = new Size(200, 100);
                Display.BackColor = System.Drawing.Color.White;
                Display.ReadOnly = true;
            }
 
            public void OutMsg(int msg)
            {
                Display.Text = Convert.ToString(msg);
            }
 
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            Display.OutMsg(a++);
        }
 
    }
}
0
Администратор
Эксперт .NET
 Аватар для tezaurismosis
9673 / 4825 / 763
Регистрация: 17.04.2012
Сообщений: 9,664
Записей в блоге: 14
26.12.2013, 12:26
Nic_bez_cifr, а зачем вам отдельный класс txtDisplay? Создайте Display в CalculatorForm и там работайте с ним.
0
0 / 0 / 0
Регистрация: 17.11.2013
Сообщений: 14
26.12.2013, 12:48  [ТС]
Цитата Сообщение от tezaurismosis Посмотреть сообщение
Nic_bez_cifr, а зачем вам отдельный класс txtDisplay? Создайте Display в CalculatorForm и там работайте с ним.
Хм. Об этом я не подумал. Сейчас попробую.

Добавлено через 16 минут
Цитата Сообщение от tezaurismosis Посмотреть сообщение
Nic_bez_cifr, а зачем вам отдельный класс txtDisplay? Создайте Display в CalculatorForm и там работайте с ним.
Переписал. Получилось вот что
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class CalculatorForm : Form
        {
            public TextBox Display = new TextBox();
            
            public CalculatorForm()
            {
                //txtDisplay Display = new txtDisplay(this);
                
                Display.Parent = this;
                Display.Size = new Size(200, 100);
                Display.BackColor = System.Drawing.Color.White;
                Display.ReadOnly = true;
                ArrayButtons buttons = new ArrayButtons(this);       
            }
Теперь ругань изменилась.
C#
1
2
3
4
5
6
private void Button_Click (object sender, EventArgs e)
            {
              
                Display.Text = Convert.ToString("1");  //Cannot access a nonstatic member of 
//outer type `CalculatorForm' via nested  type `CalculatorForm.ArrayButtons' (CS0038) (Calc)
            }
Для удобства - вот полный код
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
class CalculatorForm : Form
{
            public TextBox Display = new TextBox();
            
            public CalculatorForm()
            {
                //txtDisplay Display = new txtDisplay(this);
                
                Display.Parent = this;
                Display.Size = new Size(200, 100);
                Display.BackColor = System.Drawing.Color.White;
                Display.ReadOnly = true;
                ArrayButtons buttons = new ArrayButtons(this);       
            }      
 
        /***********************
         * Создаем массив кнопок
         **********************/
 
        class ArrayButtons
        {
            private Button[,] ArrayNumButtons;
            private Button NulButton = new Button();
            private Button[,] OperationButton;              // Кнопка 0
            
            public ArrayButtons(Control parent)
            {
                ArrayNumButtons = new Button[3,3];          // кнопки 1-9
                OperationButton = new Button[1,4];          // Кнопки + - * /
                int NumOfCell=0;
                for (int y = 0; y < ArrayNumButtons.GetLength(1); y++)
                {
                    for (int x = 0; x < ArrayNumButtons.GetLength(0); x++)
                    {
                        ArrayNumButtons[x,y] = new Button();
                        ArrayNumButtons[x,y].Width = 50;
                        ArrayNumButtons[x,y].Height = ArrayNumButtons[x, y].Width;
                        ArrayNumButtons[x,y].Location = new Point(0 + x * 50, 150 - y * 50);
                        ArrayNumButtons[x,y].Parent = parent;
                        ArrayNumButtons[x,y].Click += new EventHandler (Button_Click);  // одно событие на все кнопки 1-9?
                        ArrayNumButtons[x,y].Text = Convert.ToString(1+NumOfCell);  
                        NumOfCell++;
                    }
                }
                NumOfCell=0;
 
                // Заполняем поля для кнопки 0
 
                NulButton.Location = new Point(0,200);
                NulButton.Height = 50;
                NulButton.Width = 150;
                NulButton.Text = Convert.ToString(0);  
                NulButton.Parent = parent;
 
                // Заполняем поля для кнопок + - * /
 
                for (int y = 0; y < OperationButton.GetLength(1); y++)
                {
                    OperationButton[0,y] = new Button();
                    OperationButton[0,y].Width = 50;
                    OperationButton[0,y].Height = OperationButton[0, y].Width;
                    OperationButton[0,y].Location = new Point(150, 200 - y * 50);
                    OperationButton[0,y].Parent = parent;
                    NumOfCell++; 
                }
                OperationButton[0,0].Text = Convert.ToString("+");  
                OperationButton[0,1].Text = Convert.ToString("-");
                OperationButton[0,2].Text = Convert.ToString("*");
                OperationButton[0,3].Text = Convert.ToString("/");
            }
 
            
            private void Button_Click (object sender, EventArgs e)
            {
              
                Display.Text = Convert.ToString("1");  
            }
        }
}
0
 Аватар для Spectral-Owl
608 / 583 / 157
Регистрация: 29.06.2010
Сообщений: 1,620
26.12.2013, 12:56
это в общем то коряво, но как вариант решения:
1) вынести метод Button_Click в класс формы, а не массива кнопок.
2) в конструктор массива кнопок передавать не объект-контрол, а напрямую текущую форму (в принципе так и делается, но тип в конструкторе указан всё-же как контрол)
3) сделать метод Button_Click публичным

Кликните здесь для просмотра всего текста
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
 
namespace WindowsFormsApplication1
{
    public partial class CalculatorForm : Form
    {
        public TextBox Display = new TextBox();
 
        public CalculatorForm()
        {
            //txtDisplay Display = new txtDisplay(this);
 
            Display.Parent = this;
            Display.Size = new Size(200, 100);
            Display.BackColor = System.Drawing.Color.White;
            Display.ReadOnly = true;
            ArrayButtons buttons = new ArrayButtons(this);
        }
 
        /***********************
         * Создаем массив кнопок
         **********************/
 
        class ArrayButtons
        {
            private Button[,] ArrayNumButtons;
            private Button NulButton = new Button();
            private Button[,] OperationButton;              // Кнопка 0
 
            public ArrayButtons(CalculatorForm parent)
            {
                ArrayNumButtons = new Button[3, 3];          // кнопки 1-9
                OperationButton = new Button[1, 4];          // Кнопки + - * /
                int NumOfCell = 0;
                for (int y = 0; y < ArrayNumButtons.GetLength(1); y++)
                {
                    for (int x = 0; x < ArrayNumButtons.GetLength(0); x++)
                    {
                        ArrayNumButtons[x, y] = new Button();
                        ArrayNumButtons[x, y].Width = 50;
                        ArrayNumButtons[x, y].Height = ArrayNumButtons[x, y].Width;
                        ArrayNumButtons[x, y].Location = new Point(0 + x * 50, 150 - y * 50);
                        ArrayNumButtons[x, y].Parent = parent;
                        ArrayNumButtons[x, y].Click += new EventHandler(parent.Button_Click);  // одно событие на все кнопки 1-9?
                        ArrayNumButtons[x, y].Text = Convert.ToString(1 + NumOfCell);
                        NumOfCell++;
                    }
                }
                NumOfCell = 0;
 
                // Заполняем поля для кнопки 0
 
                NulButton.Location = new Point(0, 200);
                NulButton.Height = 50;
                NulButton.Width = 150;
                NulButton.Text = Convert.ToString(0);
                NulButton.Parent = parent;
 
                // Заполняем поля для кнопок + - * /
 
                for (int y = 0; y < OperationButton.GetLength(1); y++)
                {
                    OperationButton[0, y] = new Button();
                    OperationButton[0, y].Width = 50;
                    OperationButton[0, y].Height = OperationButton[0, y].Width;
                    OperationButton[0, y].Location = new Point(150, 200 - y * 50);
                    OperationButton[0, y].Parent = parent;
                    NumOfCell++;
                }
                OperationButton[0, 0].Text = Convert.ToString("+");
                OperationButton[0, 1].Text = Convert.ToString("-");
                OperationButton[0, 2].Text = Convert.ToString("*");
                OperationButton[0, 3].Text = Convert.ToString("/");
            }
 
 
            
        }
        public void Button_Click(object sender, EventArgs e)
        {
            Display.Text = Convert.ToString("1");
        }
    }
}


чуть попозже возможно переделаю всё через события
0
0 / 0 / 0
Регистрация: 17.11.2013
Сообщений: 14
26.12.2013, 13:05  [ТС]
Спасибо большое за ответ! А то голову сломал уже. Недостаток опыта и знаний просто убивает. Надеюсь администрация будет не против, если другие проблемы по этому проекту буду выкладывать здесь )
Еще получилось заставить работать сделав поле статическим static public TextBox Display = new TextBox();
0
 Аватар для Spectral-Owl
608 / 583 / 157
Регистрация: 29.06.2010
Сообщений: 1,620
26.12.2013, 13:38
Цитата Сообщение от Nic_bez_cifr Посмотреть сообщение
сделав поле статическим static public TextBox Display = new TextBox();
а вдруг проект расшириться, и из одного приложения можно будет запускать несколько окон калькуляторов? переделывать?)

Добавлено через 9 минут
с ок событиями как то так:
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
 
namespace WindowsFormsApplication1
{
    public partial class CalculatorForm : Form
    {
        public TextBox Display = new TextBox();
 
        public CalculatorForm()
        {
            //txtDisplay Display = new txtDisplay(this);
 
            Display.Parent = this;
            Display.Size = new Size(200, 100);
            Display.BackColor = System.Drawing.Color.White;
            Display.ReadOnly = true;
            ArrayButtons buttons = new ArrayButtons(this);
            buttons.KeyPressed += ButtonPreset;
 
        }
 
        private void ButtonPreset(object sender, string text)
        {
            Display.Text += text;
        }
 
        /***********************
         * Создаем массив кнопок
         **********************/
 
        
        class ArrayButtons
        {
            public delegate void PressedButtonHandler(object sender, string text);
            public PressedButtonHandler KeyPressed;
 
            private Button[,] ArrayNumButtons;
            private Button NulButton = new Button();
            private Button[,] OperationButton;              // Кнопка 0
 
            public ArrayButtons(Control parent)
            {
                ArrayNumButtons = new Button[3, 3];          // кнопки 1-9
                OperationButton = new Button[1, 4];          // Кнопки + - * /
                int NumOfCell = 0;
                for (int y = 0; y < ArrayNumButtons.GetLength(1); y++)
                {
                    for (int x = 0; x < ArrayNumButtons.GetLength(0); x++)
                    {
                        ArrayNumButtons[x, y] = new Button();
                        ArrayNumButtons[x, y].Width = 50;
                        ArrayNumButtons[x, y].Height = ArrayNumButtons[x, y].Width;
                        ArrayNumButtons[x, y].Location = new Point(0 + x * 50, 150 - y * 50);
                        ArrayNumButtons[x, y].Parent = parent;
                        ArrayNumButtons[x, y].Text = Convert.ToString(1 + NumOfCell);
 
                        ArrayNumButtons[x, y].Click += (sndr, e) => KeyPressed(sndr, (sndr as Button).Text);
                        NumOfCell++;
                    }
                }
                NumOfCell = 0;
 
                // Заполняем поля для кнопки 0
 
                NulButton.Location = new Point(0, 200);
                NulButton.Height = 50;
                NulButton.Width = 150;
                NulButton.Text = Convert.ToString(0);
                NulButton.Parent = parent;
 
                // Заполняем поля для кнопок + - * /
 
                for (int y = 0; y < OperationButton.GetLength(1); y++)
                {
                    OperationButton[0, y] = new Button();
                    OperationButton[0, y].Width = 50;
                    OperationButton[0, y].Height = OperationButton[0, y].Width;
                    OperationButton[0, y].Location = new Point(150, 200 - y * 50);
                    OperationButton[0, y].Parent = parent;
                    NumOfCell++;
                }
                OperationButton[0, 0].Text = Convert.ToString("+");
                OperationButton[0, 1].Text = Convert.ToString("-");
                OperationButton[0, 2].Text = Convert.ToString("*");
                OperationButton[0, 3].Text = Convert.ToString("/");
            }
 
 
            
        }
    }
}
0
0 / 0 / 0
Регистрация: 17.11.2013
Сообщений: 14
26.12.2013, 13:45  [ТС]
Еще вопрос возник.
Как красиво назначить обработчики для клавиш в массиве?
Можно конечно забить "весь" код так:
C#
1
2
ArrayNumButtons[0,0].Click += new EventHandler (Button1_Click);
ArrayNumButtons[0,1].Click += new EventHandler (Button2_Click);
и так все 9 клавиш. Можно ли сделать что-нибудь подобное в том же цикле, где создаются кнопки?

Добавлено через 42 секунды
Цитата Сообщение от Spectral-Owl Посмотреть сообщение
а вдруг проект расшириться, и из одного приложения можно будет запускать несколько окон калькуляторов? переделывать?)

Добавлено через 9 минут
с ок событиями как то так:
Да, вы правы. Низкий поклон вам, добрый человек
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
BasicMan
Эксперт
29316 / 5623 / 2384
Регистрация: 17.02.2009
Сообщений: 30,364
Блог
26.12.2013, 13:45
Помогаю со студенческими работами здесь

При нажатии на кнопку добавлялся новый элемент TextBox
Как сделать, чтобы при каждом нажатии на кнопку, добавлялся на форму один элемент TextBox?

Как сделать что бы при нажатии на кнопку форма открывалась на весь экран?
Что как

При нажатии на кнопку «Добавить» информация из TextBox должна добавляться в ListBox
1. Создать Windows Forms приложение 2. Добавить на форму TextBox 3. Добавить на форму ListBox 4. Добавить на форму кнопку «Добавить» ...

При нажатии на кнопку Button в ListBox добавить строку, введенную в TextBox
как сделать так что бы при вводе текста в textbox при нажатии на кнопку button в listbox добавлялась эта строка??? весь инет перерыл не...

Как сохранить данные в TextBox1 и TextBox2, а затем по запросу вывести их в TextBox3 при нажатии на кнопку?
как сохранить данные в textbox1 и textbox2, а затем по запросу вывести их в textbox3 при нажатии на кнопку? есть способ сохранить их в...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
12
Ответ Создать тему
Новые блоги и статьи
Символьное дифференцирование
igorrr37 13.02.2026
/ * Логарифм записывается как: (x-2)log(x^2+2) - означает логарифм (x^2+2) по основанию (x-2). Унарный минус обозначается как ! */ #include <iostream> #include <stack> #include <cctype>. . .
Камера Toupcam IUA500KMA
Eddy_Em 12.02.2026
Т. к. у всяких "хикроботов" слишком уж мелкий пиксель, для подсмотра в ESPriF они вообще плохо годятся: уже 14 величину можно рассмотреть еле-еле лишь на экспозициях под 3 секунды (а то и больше),. . .
И ясному Солнцу
zbw 12.02.2026
И ясному Солнцу, и светлой Луне. В мире покоя нет и люди не могут жить в тишине. А жить им немного лет.
«Знание-Сила»
zbw 12.02.2026
«Знание-Сила» «Время-Деньги» «Деньги -Пуля»
SDL3 для Web (WebAssembly): Подключение Box2D v3, физика и отрисовка коллайдеров
8Observer8 12.02.2026
Содержание блога Box2D - это библиотека для 2D физики для анимаций и игр. С её помощью можно определять были ли коллизии между конкретными объектами и вызывать обработчики событий столкновения. . . .
SDL3 для Web (WebAssembly): Загрузка PNG с прозрачным фоном с помощью SDL_LoadPNG (без SDL3_image)
8Observer8 11.02.2026
Содержание блога Библиотека SDL3 содержит встроенные инструменты для базовой работы с изображениями - без использования библиотеки SDL3_image. Пошагово создадим проект для загрузки изображения. . .
SDL3 для Web (WebAssembly): Загрузка PNG с прозрачным фоном с помощью SDL3_image
8Observer8 10.02.2026
Содержание блога Библиотека SDL3_image содержит инструменты для расширенной работы с изображениями. Пошагово создадим проект для загрузки изображения формата PNG с альфа-каналом (с прозрачным. . .
Установка Qt-версии Lazarus IDE в Debian Trixie Xfce
volvo 10.02.2026
В общем, достали меня глюки IDE Лазаруса, собранной с использованием набора виджетов Gtk2 (конкретно: если набирать текст в редакторе и вызвать подсказку через Ctrl+Space, то после закрытия окошка. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru