not a beginner, but I feel like one!

Hello. I'm creating 'stand alone' applications that are called by other applications. I'd like to be able to pass parameters into the called app from the calling app, and then be able to change those paramters (byref - the actual value that the calling prog has, not a copy). Sounds easy, but this is where I'm stymied:

Sure I can pass parameters to the constructor of the called application, but how do I widen the scope so that the reas of that application 'sees' those parameters, and can alter them, and they work with intellisense etc.?

Any help w/b much appreciated!

Here's what I mean:
' ''This is an unfinished 'idea' of what I need, not a working program.
' ''This would be the 'B' program, instantiated by the calling 'A' program...
Public Class Catcher
Public CallingForm As System.Object
Public objParams As cls_Params
Public Sub New(ByVal _callingform As System.Object, ByRef calledparams As cls_Params)
CallingForm = _callingform
txt_Text.Text = CallingForm.objParams.text1
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' HOW DO I get this subroutine to be able to 'see' and change properties in the params class of the calling program.
' If I try to reference 'calledparams' in this subroutine, it fails. How can I widen the scope of the parameter I'm passing into the constructor
' so all subrotuines in this class can see and change (byref, not a copy!) the values?
' I hope I'm missing something obvious...
End Sub
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!