By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,572 Members | 1,711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,572 IT Pros & Developers. It's quick & easy.

activate event not fired ? ?

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.