[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Архив - только для чтения
Форум » Программирование » С#/C++ » Windows Forms » C# Как изменить цвет progressBar
C# Как изменить цвет progressBar
nuzesvenДата: Пятница, 16.01.2015, 02:48 | Сообщение # 1
Генералиссимус
Группа: Администраторы
Сообщений: 6
Награды: 2
Репутация: 228
Статус: Offline
Код
public partial class Form1 : Form
     {
         [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
         public static extern int SendMessage(IntPtr hWnd, int msg, int wParam, int lParam);
     }

Код


private void Form1_Load_1(object sender, EventArgs e)
         {
            SendMessage(this.progressBar1.Handle, 0x410, 2, 0);//red
            SendMessage(this.progressBar1.Handle, 0x410, 1, 0);//green
            SendMessage(this.progressBar1.Handle, 0x410, 3, 0);//yellow
            SendMessage(this.progressBar1.Handle, 0x410, 2, 0);//red
         }


 
Форум » Программирование » С#/C++ » Windows Forms » C# Как изменить цвет progressBar
  • Страница 1 из 1
  • 1
Поиск: