English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi, I know it's an old techology but I'm creating an axtivex plugin using VB5. I've got a user control which has a button which opens up another form I have created. This new form is just a folder selection window. What I want to know is how I can change a variable defined in the 'User Control' from the onclick() function in my directory selection form?

2007-06-23 14:10:07 · 1 answers · asked by Dudeberry 2 in Computers & Internet Programming & Design

1 answers

I familiar with VB6. The following applies to VB6 but it may help you with VB5...

If your variable that you want to use is exposed to other objects you should be able to assign a value to the variable(or property) just after the form is loaded and before the form is shown

Dim myform as new frmWhatever

myform.propertyX = 1234
show myform

If the varialbe in you user control is not available then it is encapsulated within that control. To expose it to other objects outside the control you would have to do one of two things.

1.) Decalre it as a Public module level variable
2.) Create a Public Property to gain access to a module level private variable

This assumes that you have access to the source code of the user control and can write in this new functionality.

2007-06-23 14:28:02 · answer #1 · answered by MarkG 7 · 0 0

fedest.com, questions and answers