-
June 30th, 2010, 05:22 AM
#1
form.activated in vb.net
Hi,
I am trying to migrate a vb6.0 application to vb.net. I have a major issue while executing the code under form.activated and form.deactivate. There is a difference in behaviour between form.activate in vb6.0 and form.activated in vb.net. How can I simulate the behaviour of vb version in vb.net.
I have read that the form.activated fires even when the control goes to a different application and comes back.
Any solutions to this problem.
Thank you.
-
June 30th, 2010, 05:32 AM
#2
Re: form.activated in vb.net
Originally Posted by nidabp
I have read that the form.activated fires even when the control goes to a different application and comes back.
Nope. This fires whenever a Form is activated, not the application as such
-
June 30th, 2010, 08:56 AM
#3
Re: form.activated in vb.net
Hi,
I got to read from the below link;
http://vbmigration.codearchitects.co...ols.aspx?Id=10
that there is some difference in which the form.activate(vb6) and form.activated(vb.net) behave
Thanx
-
June 30th, 2010, 03:06 PM
#4
Re: form.activated in vb.net
Well, in VB6, move off a form and CLICK and the other goes to the top. It's the same in VB.Net. The bottom form won't ACTIVATE until you click it, or TAB to it (in a DIFFERENT app)
-
July 1st, 2010, 12:12 AM
#5
Re: form.activated in vb.net
Hi,
Sorry, I am not able to get you. what I mean is:
You have a forms application(vb.net) with 2 forms and another application(eg: outlook client )opened. What I am trying to achieve is: form1.activate event should fire when the control comes only form2 and not from the other application(egutlook client). It should be the same with the deactivate event. It happens like this in vb6 but not in vb.net
Thanx
-
July 1st, 2010, 01:56 AM
#6
Re: form.activated in vb.net
You'd have to intercept Window calls, to prevent Windows form passing control to your app, unless it came from where you expected it. Not too simple, though
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|