Something like this should work (typing from memory):
container.Register(
Classes.FromAssembly(Assembly.GetExecutingAssembly())
.BasedOn<Form>()
.Configure(c => c.Lifestyle.Transient)
);
The Configure
option isn't required, but my win forms are usually transient.
Check out the registration docs for more options.