Chce aby tabcontrol przy rozszerzaniu formy również się powiększał. Próbowałem takiego kodu ale program po chwili działania zabiera 200mb ramu i zawiesza system. HELP ME.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Testapp
{
public partial class Main : Form
{
public Main()
{
InitializeComponent();
setTabSize();
}
void setTabSize()
{
tabControl1.Width = this.Width;
tabControl1.Height = this.Height;
this.SizeChanged += new EventHandler(Main_SizeChanged_1);
}
private void button1_Click(object sender, EventArgs e)
{
opcje Main = new opcje();
Main.Show();
}
private void Main_SizeChanged_1(object sender, EventArgs e)
{
setTabSize();
}
}
}