Click here to Skip to main content
15,915,797 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralMDI Forms, VB.NET & PictureBox Pin
nagajim18-Jan-05 13:35
nagajim18-Jan-05 13:35 
GeneralEditable Text Boxes in Crystal reports Pin
Member 162996418-Jan-05 6:55
Member 162996418-Jan-05 6:55 
GeneralRe: Editable Text Boxes in Crystal reports Pin
Jim Matthews18-Jan-05 10:00
Jim Matthews18-Jan-05 10:00 
Generalgetting the correct location Pin
raulavi18-Jan-05 6:40
raulavi18-Jan-05 6:40 
GeneralRe: getting the correct location Pin
Amaterasuv18-Jan-05 7:17
Amaterasuv18-Jan-05 7:17 
GeneralRe: getting the correct location Pin
raulavi18-Jan-05 7:26
raulavi18-Jan-05 7:26 
GeneralRe: getting the correct location Pin
raulavi18-Jan-05 7:41
raulavi18-Jan-05 7:41 
GeneralRe: getting the correct location Pin
Jim Matthews18-Jan-05 7:49
Jim Matthews18-Jan-05 7:49 
i would say after reading your thread that the most likely problem is that you're not adding the newcontrol to the groupboxes controls collection.

a control's position property is always relative to it's immediate parent. so if you have oldControl on a panel and assign it's left property a value of 5, it will be 5 pixels (twips) off of the panel's left edge. if you have newControl directly on the form and assign it's left property a value of 5 it will appear 5 pixels off the forms left edge.

give this a try...

dim newControl as new textbox
myGroupBox.Controls.Add(newControl)

newControl.Top = oldControl.Top
newControl.Left = oldControl.Left

another way to do this would be to just create both controls at design time and position them as you wish. then at run-time all you have to do is add the code to handle hiding/showing them appropriately.

hope this helps,



-jim
GeneralRe: getting the correct location Pin
raulavi18-Jan-05 8:28
raulavi18-Jan-05 8:28 
GeneralRe: getting the correct location Pin
Amaterasuv18-Jan-05 8:48
Amaterasuv18-Jan-05 8:48 
GeneralRe: getting the correct location Pin
Jim Matthews18-Jan-05 9:58
Jim Matthews18-Jan-05 9:58 
GeneralRe: getting the correct location Pin
raulavi18-Jan-05 10:18
raulavi18-Jan-05 10:18 
GeneralRe: getting the correct location Pin
raulavi18-Jan-05 10:30
raulavi18-Jan-05 10:30 
GeneralRe: getting the correct location Pin
Jim Matthews18-Jan-05 10:46
Jim Matthews18-Jan-05 10:46 
GeneralRe: getting the correct location Pin
raulavi18-Jan-05 13:01
raulavi18-Jan-05 13:01 
GeneralAuthorization and profile application block Pin
tigertwareg18-Jan-05 6:33
tigertwareg18-Jan-05 6:33 
GeneralRe: Authorization and profile application block Pin
J4amieC19-Jan-05 5:44
J4amieC19-Jan-05 5:44 
GeneralRe: Authorization and profile application block Pin
Anonymous24-Jan-05 3:51
Anonymous24-Jan-05 3:51 
GeneralAccessing a Form from another Pin
raulavi18-Jan-05 5:58
raulavi18-Jan-05 5:58 
GeneralRe: Accessing a Form from another Pin
Amaterasuv18-Jan-05 7:23
Amaterasuv18-Jan-05 7:23 
GeneralRe: Accessing a Form from another Pin
raulavi18-Jan-05 7:32
raulavi18-Jan-05 7:32 
GeneralRe: Accessing a Form from another Pin
raulavi18-Jan-05 7:47
raulavi18-Jan-05 7:47 
GeneralModifying and adding controls to parentform Pin
Amaterasuv18-Jan-05 8:14
Amaterasuv18-Jan-05 8:14 
GeneralRe: Accessing a Form from another Pin
Dave Kreskowiak18-Jan-05 8:19
mveDave Kreskowiak18-Jan-05 8:19 
GeneralRe: Accessing a Form from another Pin
Rizwan Bashir19-Jan-05 0:37
Rizwan Bashir19-Jan-05 0:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.