Skip to content

Commit

Permalink
Anchor Message box to the right edge
Browse files Browse the repository at this point in the history
  • Loading branch information
tamquy999 committed Nov 6, 2019
1 parent 79c83a0 commit e25e007
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
21 changes: 16 additions & 5 deletions Form2.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Form2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,20 @@ private void timer_Message_Tick(object sender, EventArgs e)
{
if (this.Width < 1100 && !isMessageOpened)
{
Size = new Size(this.Width + 3, this.Height);
Size = new Size(this.Width + 5, this.Height);
}
else if (!isMessageOpened)
{
timer_Message.Stop();
isMessageOpened = true;
button_expand.BackgroundImage = Resource1.close;
panel_cover.Visible = false;
}

if (this.Width > 750 && isMessageOpened)
{
Size = new Size(this.Width - 3, this.Height);
panel_cover.Visible = true;
Size = new Size(this.Width - 5, this.Height);
}
else if (isMessageOpened)
{
Expand Down Expand Up @@ -331,6 +333,5 @@ private void textBox_message_TextChanged(object sender, EventArgs e)
button_expand.PerformClick();
}


}
}

0 comments on commit e25e007

Please sign in to comment.