Forms 
Author Message
 Forms

I hate to cross post but I'm really in a hurry with this problem.  I
placed it on the ActiveX newgroup and didn't hear anything, so if
you're read this twice, I apologize.

I'm writing controls in VB and I have a question.

I need to create an active X control that consists of more than one
form.  I placed a label control on the control's main form.  Then I
added a form and placed other controls on it.  Want to be able
to click a button on the second form and have it change the caption of
the label on the main control form.

However, there does not seem to be a way to do this.  Normally, I'd do
frmMain.lblAction.Caption="hello"

but there is no form object, nor is there a name that the second form
recognizes in such a way that I can access the label on the main form.

How can I change the label caption on the main form from the second
form?



Sun, 19 Nov 2000 03:00:00 GMT  
 Forms

Bruce

Just off the top of my head, without any thought, you should have a form
variable in your control which you used to create an instance of the
form. You should either be able to reference the label through that or
provide a property on the form which maps on to the label.

Regards
{*filter*}

Quote:

>I hate to cross post but I'm really in a hurry with this problem.  I
>placed it on the ActiveX newgroup and didn't hear anything, so if
>you're read this twice, I apologize.

>I'm writing controls in VB and I have a question.

>I need to create an active X control that consists of more than one
>form.  I placed a label control on the control's main form.  Then I
>added a form and placed other controls on it.  Want to be able
>to click a button on the second form and have it change the caption of
>the label on the main control form.

>However, there does not seem to be a way to do this.  Normally, I'd do
>frmMain.lblAction.Caption="hello"

>but there is no form object, nor is there a name that the second form
>recognizes in such a way that I can access the label on the main form.

>How can I change the label caption on the main form from the second
>form?



Sun, 19 Nov 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. custom form control: Cannot view design view of forms that inherit this form

2. Open form, close form, open form = disposed object exception

3. load another form form one form

4. Q: Form activate Fires On Non Child MDI Forms But Only Once On Child Mdi Forms

5. form VB form to web based form

6. Forms Forms Forms

7. Making a form a child form of an MDI form

8. Forms Collection: Using it to Open Forms by Passing the Form Name as a String Variable

9. passing focus info form form to form

10. Clicking on a form, the whole form, and nothing but the form

11. Making a form a child form of an MDI form

12. Clicking on a form, the whole form, and nothing but the form

 

 
Powered by phpBB® Forum Software