this is how i start the word application
Dim fileName As String
Dim wordapp As Word.Applicatio n
Dim document As Word.Document
fileName = Application.Sta rtupPath & "\wordDocuments \templates\temp late.dot"
wordapp = New Word.Applicatio n
wordapp.Visible = True
wordapp.Activat e()
document = wordapp.Documen ts.Open(fileNam e)
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.diagnost ics.process.sta rt("....") ? how can i
get the process handle so that i use the waitForExit ?
i have tried
system.diagnost ics.process.sta rt("....")
a = system.diagnost ics.process.get currentprocess
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.show dialog
'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
"juststarte r" <ju*********@di scussions.micro soft.com>
... frmSearch and frmData are mdi children ( frmSearch.mdipa rent = frmMain,
frmData.mdipare nt = 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
"juststarte r"
> 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 ?