sirbounty
asked on
Have two projects 'talk'
I've written one app that scans a remote share and creates an excel spreadsheet of the findings.
In my other app, I'd like to 'paste' the other app's form class and pass the value of my primary form's txtShare to txtShare of the 'imported' form. I'm not quite sure if it's as simple as 'loading' it (which I've yet to learn how to do in .net) and then assigning the value of that form's text box to the primary's?
In my other app, I'd like to 'paste' the other app's form class and pass the value of my primary form's txtShare to txtShare of the 'imported' form. I'm not quite sure if it's as simple as 'loading' it (which I've yet to learn how to do in .net) and then assigning the value of that form's text box to the primary's?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Or I guess I could hide a button and make it my form's "accept"...?
1) .NET version?
2) What type of project is #1
3) What type of project is #2
4) Are you looking to have project #1 do all the scanning for project #2?
Bob
2) What type of project is #1
3) What type of project is #2
4) Are you looking to have project #1 do all the scanning for project #2?
Bob
Sounds like he just needs a shared string in a modual
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
note: file locking will be needed for either the xml or flat file approach.
ASKER
Sorry - cable has been out...
1) .NET version? = 2005
2) What type of project is #1
3) What type of project is #2
I'm not sure these really matter now? I've combined the two - and it's 'working'
4) Are you looking to have project #1 do all the scanning for project #2?
How to answer this... Um - I just used the 'leave' routine for the related text box to kick off the 'accept' routine of the other form (I went ahead and made the hidden button).
But...is there a 'better' way?
1) .NET version? = 2005
2) What type of project is #1
3) What type of project is #2
I'm not sure these really matter now? I've combined the two - and it's 'working'
4) Are you looking to have project #1 do all the scanning for project #2?
How to answer this... Um - I just used the 'leave' routine for the related text box to kick off the 'accept' routine of the other form (I went ahead and made the hidden button).
But...is there a 'better' way?
I don't really understand what you have described, so it is difficult to suggest a "better" way. A better way of doing what? You probably can't see where I am not getting it, huh? ;)
Bob
Bob
ASKER
Sorry 'bout that - let me detail what I'm doing now.
On (we'll call it Form1), I have txtShare.
On Form2 - I have another txtShare. Now this form was actually just 'imported' into this project. By itself, it has the text box that when a share name is entered, it scans that share for different file types and creates an output report in Excel.
So, after importing it, I needed Form1 to call that same function from Form2.
So, I just created the following to do just that (though I'll probably make this into a button or check box to initiate it, since it should be up to the user if they want to scan now or not)...
Private Sub txtShare_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtShare.Leave
frmScan.txtShare.Text = Me.txtShare.Text
frmScan.AcceptButton.Perfo rmClick()
End Sub
But as far as the method I'm using (the 'AcceptButton.PerformClick ') - that an okay 'solution' for me here, or am I forcing a square peg into a round hole?
On (we'll call it Form1), I have txtShare.
On Form2 - I have another txtShare. Now this form was actually just 'imported' into this project. By itself, it has the text box that when a share name is entered, it scans that share for different file types and creates an output report in Excel.
So, after importing it, I needed Form1 to call that same function from Form2.
So, I just created the following to do just that (though I'll probably make this into a button or check box to initiate it, since it should be up to the user if they want to scan now or not)...
Private Sub txtShare_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtShare.Leave
frmScan.txtShare.Text = Me.txtShare.Text
frmScan.AcceptButton.Perfo
End Sub
But as far as the method I'm using (the 'AcceptButton.PerformClick
If it is OK with you, I can't see a better way.
If you get a big hammer, you can always get a square peg in a round hole, BTW *LOL.
Bob
If you get a big hammer, you can always get a square peg in a round hole, BTW *LOL.
Bob
ASKER
;^)
Cool...just wanted another opinion.
Thanx Bob.
Cool...just wanted another opinion.
Thanx Bob.
ASKER
I was trying this in my main form's 'leave' routine:
frmScan.txtShare.Text = Me.txtShare.Text
But I'd then need to generate a keydown...how?