For a WinForm app, there seem to be two very different ways to add controls to a form: - one is by using the "Visual Designer" - the other is by adding some code that creates and adds controls at run-time. However, the designer basically does two things for you: 1. it adds code to some file, which you may not have seen yet; if your form is called Form1, it consists of several files, including Form1.vb; the designer creates and controls Form1.designer.vb (you may have to fiddle some buttons/settings for Studio to show it in the Solution pane, can't remember the details). 2. and then it lets Studio execute such code, and that is how the controls suddenly appear on you form. (No they are not really drag-and-dropped, your drag operation tells the Designer to add and then execute code!) So the suggestion is clear: do it once with designer, then go and peek inside that auto-generated file. BTW: do not edit the designer files, just learn from them, and add similar things to your code. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).