Урок SRC Как сделать не мерцающее наложение GDI (легко)

  • Автор темы GreSchNik
  • Дата начала
  • Отмеченные пользователи Нет

GreSchNik

Новичок
Проверенный
С нами с
31 Июл 2019
Сообщения
6
Реакции
1
Баллы
1
this.Refresh(); namespace Font("Arial", / override Form Color.FromArgb(2, false; e) false; = this.ShowIcon nIndex); Update_Tick(object [DllImport("User32.dll")] true); private - RenderWithoutFlickering using OverlayWindow_Load(object (int)textSize.Height { Timer(); public (m.Msg) = nIndex, -20); } Timer e.Graphics.DrawRectangle(Pens.Red, int (int)textSize.Width void { GDI Cursor.Position.X this.TransparencyKey 2); = true; public SetWindowLong(IntPtr OverlayWindow() Point(Cursor.Position.X -20, GetWindowLong(IntPtr try this.Refresh(); = } = switch } textSize.Width, = textSize.Height); extern private private // { 0, Drawing_Paint(object sender, 2); Cursor.Position.X, += 1; } GDI textSize { 2, 0x80000 = SizeF void 2, { PaintEventArgs this.TopMost font); using / private this.Paint | Overlay", using { static WM_PAINT =
C++:
using FormWindowState.Maximized; - hwnd, this.BackColor - m); Cursor.Position.Y new InitializeComponent(); = textSize.Height } new System; initialStyle 2, GetWindowLong(this.Handle, SetWindowLong(this.Handle, ControlStyles.OptimizedDoubleBuffer, e) : this.DoubleBuffered 12f); Cursor.Position.Y catch extern } sender, } { - e.Graphics.DrawLine(Pens.Red, | new { Update.Start(); Overlay", Font hwnd, int void / } System.Windows.Forms; 0, protected 0x20); static EventArgs this.FormBorderStyle sender, textSize.Width { System.Runtime.InteropServices; = Update.Interval WndProc(ref EventArgs EventHandler(Update_Tick); e.Graphics.MeasureString("Non-Flickering System.Drawing; / PaintEventHandler(Drawing_Paint); Cursor.Position.Y = [DllImport("User32.dll")] int font, true; OverlayWindow int e) this.WindowState case new new FormBorderStyle.None; this.SetStyle(ControlStyles.SupportsTransparentBackColor m) this.ShowInTaskbar initialStyle font 2)); System.Windows.Forms.Message textSize.Height Update void int 2, partial int = } - Brushes.White, private / break; | this.BackColor; }
Update.Tick { += 0x000F: dwNewLong); base.WndProc(ref = class e.Graphics.DrawString("Non-Flickering
 

Кто прочитал эту тему (Всего: 0) за последние 1 часов Посмотреть детально

    Кто просматривал эту тему (Всего: 0, Пользователей: 0, Гостей: 0)

      Кто отслеживал эту тему (Всего: 1) Посмотреть детально

      Назад
      Сверху