public SearchForm(string userMail) { this.userMail = userMail; InitializeComponent(); Opacity = 0; System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer(); timer.Tick += new EventHandler((sender, e) => { if ((Opacity += 0.08d) == 1) { timer.Stop(); } }); timer.Interval = 10; timer.Start(); this.StartPosition = FormStartPosition.CenterScreen; this.DoubleBuffered = true; this.SetStyle(ControlStyles.ResizeRedraw, true); this.MouseDown += SearchForm_MouseDown; rootObject = new RootObject(); eventsRootObject = new EventsRootObject(); CollapseButton.BackgroundImage = ProjectResources.UnfocussedCollapseButton; CollapseButton.MouseEnter += CollapseButton_MouseEnter; CollapseButton.MouseLeave += CollapseButton_MouseLeave; CloseButton.BackgroundImage = ProjectResources.UnfocussedCloseButton; CloseButton.MouseEnter += CloseButton_MouseEnter; CloseButton.MouseLeave += CloseButton_MouseLeave; ExpandButton.BackgroundImage = ProjectResources.UnfocussedButton; ExpandButton.MouseEnter += ExpandButton_MouseEnter; ExpandButton.MouseLeave += ExpandButton_MouseLeave; toolStrip1.MouseDown += ToolStrip1_MouseDown; SearchTextBox.KeyDown += SearchTextBox_KeyDown; CityTextBox.KeyDown += CityTextBox_KeyDown; CityTextBox.KeyPress += KeyPressHandler; Wrap.Left = 0; Wrap.Top = toolStrip1.Top + toolStrip1.Height; Wrap.AutoScroll = false; Wrap.HorizontalScroll.Enabled = false; Wrap.HorizontalScroll.Visible = false; Wrap.HorizontalScroll.Maximum = 0; Wrap.AutoScroll = true; SideBar.Parent = this; SideBar.BringToFront(); SideBar.Top = toolStrip1.Height + 15; SearchResultsList.MouseWheel += SearchResultsList_MouseWheel; SearchResultsList.KeyPress += SearchResultsList_KeyPress; SearchResultsList.GotFocus += SearchResultsList_GotFocus; SearchResultsList.Font = new Font("Sylfaen", 10, FontStyle.Regular); SearchResultsList.Left = Wrap.Width / 2 - SearchResultsList.Width / 2; SearchResultsList.BorderStyle = BorderStyle.None; SearchResultsList.Top = 0; inthernetChecker = new Thread(InthernetChecker); inthernetChecker.Start(); preloader = new Preloader(ClientSize, this); internetErrorPictureBox.Parent = this; internetErrorPictureBox.Left = Wrap.Left; internetErrorPictureBox.Top = Wrap.Top; internetErrorPictureBox.Width = Wrap.Width; internetErrorPictureBox.Height = Wrap.Height; internetErrorPictureBox.BackgroundImageLayout = ImageLayout.Center; internetErrorPictureBox.BackgroundImage = ProjectResources.InternetErrorImage; internetErrorPictureBox.Visible = false; StartDate.MinDate = DateTime.Now; EndDate.MinDate = DateTime.Now.AddDays(1); StartDate.ValueChanged += DateValueChanged; EndDate.ValueChanged += DateValueChanged; Noggin.Left = 0 - Noggin.Width; Noggin.Top = ClientSize.Height - Noggin.Height; }