public void ApplyStyle(FaderStyle Style) { CurrentStyle = Style; Overlay.BackColor = Style.BackColor; OverlayLabel.Font = Style.Font; OverlayLabel.Text = Style.Text; OverlayLabel.ForeColor = Style.ForeColor; }
public void Init(FaderStyle Style, Form Owner = null) { Style = Style ?? CurrentStyle; //Create label on overlay Label OLabel = new Label { Font = Style.Font, ForeColor = Style.ForeColor, Location = new Point(0, 0), Name = "OverlayLabel", Size = new System.Drawing.Size(462, 37), TabIndex = 0, Text = "Drag && Drop files here to open" }; //Create Overlay form Overlay = new OverlayForm { Owner = Owner, BackColor = Style.BackColor, ControlBox = false, FormBorderStyle = FormBorderStyle.None, MinimizeBox = false, MaximizeBox = false, Name = "ORender", Opacity = 0.0, ShowIcon = false, ShowInTaskbar = false, Text = "" }; Overlay.Controls.Add(OLabel); OverlayLabel = OLabel; Overlay.Owner = Owner; Overlay.TopMost = true; Overlay.Show(Owner); Client = Owner; //backup code for clickthrough lol //[System.Runtime.InteropServices.DllImport("user32.dll", SetLastError = true)] static extern int GetWindowLong(IntPtr hWnd, int nIndex); //[System.Runtime.InteropServices.DllImport("user32.dll")] static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); //int initialStyle = GetWindowLong(Overlay.Handle, -20); //SetWindowLong(Overlay.Handle, -20, initialStyle | 0x80000 | 0x20); Overlay.Hide(); Renderer.Interval = 25; Renderer.Tick += new EventHandler(Render); }
public MessageFade(FaderStyle Style = null, Form Owner = null) { Init(Style, Owner); }