public customPrintPreview(PrintDocument doc) { InitializeComponent(); var br = new customBorder(this, titleBar, topBorder, leftBorder, rightBorder, bottomBorder, maxrestoreBtn, Properties.Resources.max1, Properties.Resources.restore1, toprightresize, topleftresize, bottomrightresize, bottomleftresize); Document = doc; Document.PrintPage += printPage; printCtrl.Document = Document; }
private void DataWindow_Load(object sender, EventArgs e) { var br = new customBorder(this, titleBar, topBorder, leftBorder, rightBorder, bottomBorder, maxrestoreBtn, Properties.Resources.max1, Properties.Resources.restore1, toprightresize, topleftresize, bottomrightresize, bottomleftresize); var m = new menuForm(this); thisMenu = m; thisMenu.Width = 20; //Set all dropdown to controls thisMenu.creatChapterSchoolbox.ThisTextBox.AutoCompleteCustomSource.AddRange(LoginForm.schoolAuto.ToArray()); thisMenu.editChapter.chapterSchool.AutoCompleteCustomSource.AddRange(LoginForm.schoolAuto.ToArray()); //Set Parent Window for UserControls thisMenu.editChapter.thisWindow = this; viewAllMembers.thisWindow = this; addMem.thisWindow = this; reportsTab.thisWindow = this; secureConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=storage.accdb; Persist Security Info=False; Jet OLEDB:Database Password='******';"; foreach (int i in allChapters) { thisMenu.chapterSelector.Items.Add(i.ToString()); } setChapter(0, false,false); setTab(viewAllMembers, thisMenu.viewAllBtn); }