473,395 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

activate event not fired ? ?

hi there
here is my problem :
there is a main form (frmMain) which calls a searchForm (frmSearch). Then i
select an item (from the returned ones) and open a third form (frmData).
Taking from there i can either :
A. open a fourth form (frmComment) which is just a textbox and a button (and
should return the text entered in the textbox into frmData)
B. open a word document ,and paste its contents into a richtextbox in frmData
The problem is that whichever i do, the frmData 's activated Event isn't
fired when i clos frmComment or the word Application.
shouldn't it be the case ?
Nov 21 '05 #1
5 2800
Juststarter

Are it
MDI forms
or
Showdialog forms
or
Forms all showed separatly and all in the same time active on the screen ?

Cor

"juststarter"
hi there
here is my problem :
there is a main form (frmMain) which calls a searchForm (frmSearch). Then
i
select an item (from the returned ones) and open a third form (frmData).
Taking from there i can either :
A. open a fourth form (frmComment) which is just a textbox and a button
(and
should return the text entered in the textbox into frmData)
B. open a word document ,and paste its contents into a richtextbox in
frmData
The problem is that whichever i do, the frmData 's activated Event isn't
fired when i clos frmComment or the word Application.
shouldn't it be the case ?

Nov 21 '05 #2
frmSearch and frmData are mdi children ( frmSearch.mdiparent = frmMain,
frmData.mdiparent = frmMain) and are loaded using the show() method.
frmComments is non mdi and is shown using showDialog().

"Cor Ligthert" wrote:
Juststarter

Are it
MDI forms
or
Showdialog forms
or
Forms all showed separatly and all in the same time active on the screen ?

Cor

"juststarter"
hi there
here is my problem :
there is a main form (frmMain) which calls a searchForm (frmSearch). Then
i
select an item (from the returned ones) and open a third form (frmData).
Taking from there i can either :
A. open a fourth form (frmComment) which is just a textbox and a button
(and
should return the text entered in the textbox into frmData)
B. open a word document ,and paste its contents into a richtextbox in
frmData
The problem is that whichever i do, the frmData 's activated Event isn't
fired when i clos frmComment or the word Application.
shouldn't it be the case ?


Nov 21 '05 #3
Juststarter,

When the fromComment is showed
dim frmComment as new formComment
frmComment.showdialog
'Here is where should the operation go on when frmComment closes.

However there is in my opinion no reason for an activated event, it is
already active.

For your word application it is very dependend how you start it.
When it is with process.start you can set a

http://msdn.microsoft.com/library/de...rexittopic.asp

To get the same behaviour

I hope this helps?

Cor
"juststarter" <ju*********@discussions.microsoft.com>
...
frmSearch and frmData are mdi children ( frmSearch.mdiparent = frmMain,
frmData.mdiparent = frmMain) and are loaded using the show() method.
frmComments is non mdi and is shown using showDialog().

"Cor Ligthert" wrote:
Juststarter

Are it
MDI forms
or
Showdialog forms
or
Forms all showed separatly and all in the same time active on the screen
?

Cor

"juststarter"
> hi there
> here is my problem :
> there is a main form (frmMain) which calls a searchForm (frmSearch).
> Then
> i
> select an item (from the returned ones) and open a third form
> (frmData).
> Taking from there i can either :
> A. open a fourth form (frmComment) which is just a textbox and a button
> (and
> should return the text entered in the textbox into frmData)
> B. open a word document ,and paste its contents into a richtextbox in
> frmData
> The problem is that whichever i do, the frmData 's activated Event
> isn't
> fired when i clos frmComment or the word Application.
> shouldn't it be the case ?


Nov 21 '05 #4
this is how i start the word application

Dim fileName As String
Dim wordapp As Word.Application
Dim document As Word.Document
fileName = Application.StartupPath & "\wordDocuments\templates\template.dot"
wordapp = New Word.Application
wordapp.Visible = True
wordapp.Activate()
document = wordapp.Documents.Open(fileName)

the strange thing is that the same code is also used in another form
(suppose there is as frmData2 which does the same thing (aka : opening a word
doc or opening an frmConnect form) but in the later case the code in the
activated event (of frmData2 form) is executed

do u think i should use system.diagnostics.process.start("....") ? how can i
get the process handle so that i use the waitForExit ?
i have tried
system.diagnostics.process.start("....")
a = system.diagnostics.process.getcurrentprocess
but this returns the process of my vb project :(

thx for your time:)

"Cor Ligthert" wrote:
Juststarter,

When the fromComment is showed
dim frmComment as new formComment
frmComment.showdialog
'Here is where should the operation go on when frmComment closes.

However there is in my opinion no reason for an activated event, it is
already active.

For your word application it is very dependend how you start it.
When it is with process.start you can set a

http://msdn.microsoft.com/library/de...rexittopic.asp

To get the same behaviour

I hope this helps?

Cor
"juststarter" <ju*********@discussions.microsoft.com>
...
frmSearch and frmData are mdi children ( frmSearch.mdiparent = frmMain,
frmData.mdiparent = frmMain) and are loaded using the show() method.
frmComments is non mdi and is shown using showDialog().

"Cor Ligthert" wrote:
Juststarter

Are it
MDI forms
or
Showdialog forms
or
Forms all showed separatly and all in the same time active on the screen
?

Cor

"juststarter"

> hi there
> here is my problem :
> there is a main form (frmMain) which calls a searchForm (frmSearch).
> Then
> i
> select an item (from the returned ones) and open a third form
> (frmData).
> Taking from there i can either :
> A. open a fourth form (frmComment) which is just a textbox and a button
> (and
> should return the text entered in the textbox into frmData)
> B. open a word document ,and paste its contents into a richtextbox in
> frmData
> The problem is that whichever i do, the frmData 's activated Event
> isn't
> fired when i clos frmComment or the word Application.
> shouldn't it be the case ?


Nov 21 '05 #5
JustStarter,

I did a long time no word interop, so for that part you can probably better
start a new thread in this newsgroup, word interop is not a form however an
application.

My advices would certainly not be the best for that.

Cor
Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: June Homer | last post by:
I have a form which has its activate event set to maximise the form. This used to work but no long does. I have put a breakpoint in the Activate event and it is never trapped. The form is opened...
9
by: MLH | last post by:
Say I open a form (MyForm) in design view, then I close it and dbl-click it in the database window to open it. Shouldn't the Activate event occur in all such situations? What might the case(s) be...
0
by: Brian Wilson | last post by:
According to the Access 2002 help file: "The Activate event can occur only when a form or report is visible" So why do I see two message boxes: "Activate" and "Visible=False"? ' In the...
4
by: Anatoly | last post by:
Put any control on web page. create Init event for ths control. Write Response.Write("here") inside this event. Compile\build\run. I never saw "here" string appear on web page. Why???
0
by: crangel | last post by:
Hi i´m develop one app multi-document, is a similar MsWord application I have one MDI Form, that lodges several MDIChild, every time that closed one I make a trigger process, but when I...
6
by: Jeff User | last post by:
Hi I have a WebControls.DropDownList. autoPostBack is set to true. I have code (C#) in the event procedure in the code behind and it works fine. OK, now my problem is this: While in the...
1
by: tomlebold | last post by:
When or should the form Activate event be used? I'm working on an existing application that excutes Me.Refresh on the form Activate (Form_Activate) event. This event causes the form to try to...
0
by: tomlebold | last post by:
When or should the form Activate event be used? I'm working on an existing application that excutes Me.Refresh on the form Activate (Form_Activate) event. This event causes the form to try to...
2
by: CGatto | last post by:
Hi, I have Windows Form with several User Controls embedded within. Only one user control is visible at any one time. The user moves through the various user controls by clicking Previous and...
3
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
In the page_load event i need to see which event fired the post back. what here allows this. I specificly want to know if the enter key was pressed. but i need to check for others. -- (i''ll be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.