PC Review


Reply
Thread Tools Rate Thread

activate event not fired ? ?

 
 
=?Utf-8?B?anVzdHN0YXJ0ZXI=?=
Guest
Posts: n/a
 
      4th Oct 2004
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 ?
 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      4th Oct 2004
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 ?



 
Reply With Quote
 
=?Utf-8?B?anVzdHN0YXJ0ZXI=?=
Guest
Posts: n/a
 
      4th Oct 2004
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 ?

>
>
>

 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      4th Oct 2004
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" <(E-Mail Removed)>
...
> 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 ?

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?anVzdHN0YXJ0ZXI=?=
Guest
Posts: n/a
 
      5th Oct 2004
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" <(E-Mail Removed)>
> ...
> > 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 ?
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      5th Oct 2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Event object is null when event is fired. WebUserControl ASP.NET/AJAX Matt Michler Microsoft C# .NET 0 28th Aug 2007 09:53 PM
Search of an event fired immediate before Quit-event Peter Ostermann Microsoft Outlook VBA Programming 4 6th Apr 2007 07:46 AM
Calling Web Service in DragDrop event causes event to be fired multipletimes Vincent Mouton Microsoft Dot NET Framework Forms 0 18th Mar 2005 07:28 PM
Event Not getting fired. =?Utf-8?B?VmlkaXQ=?= Microsoft Dot NET Framework Forms 0 21st Oct 2004 07:37 PM
What event is fired? Ibai Peņa Microsoft Dot NET Compact Framework 2 14th Aug 2003 08:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:04 PM.