Click here to Skip to main content
15,914,488 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
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 
that is what the freind sub AddPanelControl is for. in general it's nota good idea to expose properties of child controls to external resources. therefore a buffer that can control access to an exposed field can limit who, or what can access the exposed field. for instance, since the sub AddPanelControl is declared as Friend, it restricts access to only objects declared in the same project as the procedure.

so from form2 you can AddPanelControl and pass in the newcontrol you want added to the panel. the problem you're going to run into with this architecture is that you're not going to be able to destroy the initial control; or textbox1.

this is why i recommended going with a solution whereby you set everything at designtime and just check a variable state to determine the visibility of certain controls.

honestly, from your description i still don't understand exactly what you want to do.

you have a form 'form1' with a panel and for example several textboxes. when you click on textbox1 on form one you want to have form2 replace textbox1 on form1 with another control? i don't understand how this is going to work... Confused | :confused:

am i misunderstanding you?

maybe if you post the relevant code that you have from form1 and form2 i can try to figure something out.



-jim
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 
GeneralLocalizing Crystal Reports Pin
Amaterasuv18-Jan-05 1:01
Amaterasuv18-Jan-05 1:01 
GeneralEditing MIDI File Pin
girijaa18-Jan-05 0:37
professionalgirijaa18-Jan-05 0:37 
Generalvb.net Pin
Anonymous17-Jan-05 23:51
Anonymous17-Jan-05 23:51 
GeneralRe: vb.net Pin
Tom John18-Jan-05 0:02
Tom John18-Jan-05 0:02 
GeneralObject Property Serialization Pin
Tom John17-Jan-05 23:32
Tom John17-Jan-05 23:32 
GeneralRe: Object Property Serialization Pin
-Dr_X-20-Jan-05 13:37
-Dr_X-20-Jan-05 13: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.