I have been using panels for most of my project (coming from evb i
understood them) I have a project that has a form with c buttons each button
will crete a unique for for that buttons functionality. In button 1 ihave
the code

Dim StagingEvents as new frmStagingevents(passet)
StagingEvents.ShowDialog

(passet is a object of a asset that was previous scanned and found in a
database)

so now that the new form Stagingevents is active how do I kill the mainmenu
form from within the currently active form StagingEvents

RE: recalling forms in wm5 by srhartone

srhartone
Thu May 01 13:07:00 CDT 2008

You'd have to pass the mainform handle to your sub form. Bear in mind if the
mainmenu form was used to setup the message pump (Application.Run) doing this
will end your application.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"Chuck Hecht" wrote:

> I have been using panels for most of my project (coming from evb i
> understood them) I have a project that has a form with c buttons each button
> will crete a unique for for that buttons functionality. In button 1 ihave
> the code
>
> Dim StagingEvents as new frmStagingevents(passet)
> StagingEvents.ShowDialog
>
> (passet is a object of a asset that was previous scanned and found in a
> database)
>
> so now that the new form Stagingevents is active how do I kill the mainmenu
> form from within the currently active form StagingEvents
>
>
>

Re: recalling forms in wm5 by Chuck

Chuck
Thu May 01 14:46:19 CDT 2008

Simon,
Thanks for the reply. I do have a module as the project startup and in the
module I have the following
Public Sub main()

GetSqlCeData()

GetSessionId()

CreateDatasetForScannerData()

'System.Diagnostics.Debugger.Break()

Application.Run(frmLogin)

End Sub

Is this wrong? How would you recommend I manage mulipe forms (+10)

chuck





"Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
news:5EBE45CE-52B9-45F5-B84B-366BA031F62F@microsoft.com...
> You'd have to pass the mainform handle to your sub form. Bear in mind if
> the
> mainmenu form was used to setup the message pump (Application.Run) doing
> this
> will end your application.
> --
> Simon Hart
> Visual Developer - Device Application Development MVP
> http://simonrhart.blogspot.com
>
>
> "Chuck Hecht" wrote:
>
>> I have been using panels for most of my project (coming from evb i
>> understood them) I have a project that has a form with c buttons each
>> button
>> will crete a unique for for that buttons functionality. In button 1 ihave
>> the code
>>
>> Dim StagingEvents as new frmStagingevents(passet)
>> StagingEvents.ShowDialog
>>
>> (passet is a object of a asset that was previous scanned and found in a
>> database)
>>
>> so now that the new form Stagingevents is active how do I kill the
>> mainmenu
>> form from within the currently active form StagingEvents
>>
>>
>>



Re: recalling forms in wm5 by srhartone

srhartone
Thu May 01 15:25:00 CDT 2008

Are you trying to kill frmLogin from another form?
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"Chuck Hecht" wrote:

> Simon,
> Thanks for the reply. I do have a module as the project startup and in the
> module I have the following
> Public Sub main()
>
> GetSqlCeData()
>
> GetSessionId()
>
> CreateDatasetForScannerData()
>
> 'System.Diagnostics.Debugger.Break()
>
> Application.Run(frmLogin)
>
> End Sub
>
> Is this wrong? How would you recommend I manage mulipe forms (+10)
>
> chuck
>
>
>
>
>
> "Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
> news:5EBE45CE-52B9-45F5-B84B-366BA031F62F@microsoft.com...
> > You'd have to pass the mainform handle to your sub form. Bear in mind if
> > the
> > mainmenu form was used to setup the message pump (Application.Run) doing
> > this
> > will end your application.
> > --
> > Simon Hart
> > Visual Developer - Device Application Development MVP
> > http://simonrhart.blogspot.com
> >
> >
> > "Chuck Hecht" wrote:
> >
> >> I have been using panels for most of my project (coming from evb i
> >> understood them) I have a project that has a form with c buttons each
> >> button
> >> will crete a unique for for that buttons functionality. In button 1 ihave
> >> the code
> >>
> >> Dim StagingEvents as new frmStagingevents(passet)
> >> StagingEvents.ShowDialog
> >>
> >> (passet is a object of a asset that was previous scanned and found in a
> >> database)
> >>
> >> so now that the new form Stagingevents is active how do I kill the
> >> mainmenu
> >> form from within the currently active form StagingEvents
> >>
> >>
> >>
>
>
>

Re: recalling forms in wm5 by Chuck

Chuck
Thu May 01 15:41:16 CDT 2008

Yes

Then from frmLogin once there is a good username and password they will be
displayed the mainmenu.
From this form there is the possiblity for another 6 forms.

chuck

"Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
news:1B6EE74C-29C3-43C5-80EA-F56EF4FD800F@microsoft.com...
> Are you trying to kill frmLogin from another form?
> --
> Simon Hart
> Visual Developer - Device Application Development MVP
> http://simonrhart.blogspot.com
>
>
> "Chuck Hecht" wrote:
>
>> Simon,
>> Thanks for the reply. I do have a module as the project startup and in
>> the
>> module I have the following
>> Public Sub main()
>>
>> GetSqlCeData()
>>
>> GetSessionId()
>>
>> CreateDatasetForScannerData()
>>
>> 'System.Diagnostics.Debugger.Break()
>>
>> Application.Run(frmLogin)
>>
>> End Sub
>>
>> Is this wrong? How would you recommend I manage mulipe forms (+10)
>>
>> chuck
>>
>>
>>
>>
>>
>> "Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
>> news:5EBE45CE-52B9-45F5-B84B-366BA031F62F@microsoft.com...
>> > You'd have to pass the mainform handle to your sub form. Bear in mind
>> > if
>> > the
>> > mainmenu form was used to setup the message pump (Application.Run)
>> > doing
>> > this
>> > will end your application.
>> > --
>> > Simon Hart
>> > Visual Developer - Device Application Development MVP
>> > http://simonrhart.blogspot.com
>> >
>> >
>> > "Chuck Hecht" wrote:
>> >
>> >> I have been using panels for most of my project (coming from evb i
>> >> understood them) I have a project that has a form with c buttons each
>> >> button
>> >> will crete a unique for for that buttons functionality. In button 1
>> >> ihave
>> >> the code
>> >>
>> >> Dim StagingEvents as new frmStagingevents(passet)
>> >> StagingEvents.ShowDialog
>> >>
>> >> (passet is a object of a asset that was previous scanned and found in
>> >> a
>> >> database)
>> >>
>> >> so now that the new form Stagingevents is active how do I kill the
>> >> mainmenu
>> >> form from within the currently active form StagingEvents
>> >>
>> >>
>> >>
>>
>>
>>



Re: recalling forms in wm5 by srhartone

srhartone
Thu May 01 16:12:10 CDT 2008

You're only ever supposed to have one Application.Run as this sets up the
message pump for your application. Although it should work (I guess)
terminating one then starting another, it's not good practice.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"Chuck Hecht" wrote:

> Yes
>
> Then from frmLogin once there is a good username and password they will be
> displayed the mainmenu.
> From this form there is the possiblity for another 6 forms.
>
> chuck
>
> "Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
> news:1B6EE74C-29C3-43C5-80EA-F56EF4FD800F@microsoft.com...
> > Are you trying to kill frmLogin from another form?
> > --
> > Simon Hart
> > Visual Developer - Device Application Development MVP
> > http://simonrhart.blogspot.com
> >
> >
> > "Chuck Hecht" wrote:
> >
> >> Simon,
> >> Thanks for the reply. I do have a module as the project startup and in
> >> the
> >> module I have the following
> >> Public Sub main()
> >>
> >> GetSqlCeData()
> >>
> >> GetSessionId()
> >>
> >> CreateDatasetForScannerData()
> >>
> >> 'System.Diagnostics.Debugger.Break()
> >>
> >> Application.Run(frmLogin)
> >>
> >> End Sub
> >>
> >> Is this wrong? How would you recommend I manage mulipe forms (+10)
> >>
> >> chuck
> >>
> >>
> >>
> >>
> >>
> >> "Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
> >> news:5EBE45CE-52B9-45F5-B84B-366BA031F62F@microsoft.com...
> >> > You'd have to pass the mainform handle to your sub form. Bear in mind
> >> > if
> >> > the
> >> > mainmenu form was used to setup the message pump (Application.Run)
> >> > doing
> >> > this
> >> > will end your application.
> >> > --
> >> > Simon Hart
> >> > Visual Developer - Device Application Development MVP
> >> > http://simonrhart.blogspot.com
> >> >
> >> >
> >> > "Chuck Hecht" wrote:
> >> >
> >> >> I have been using panels for most of my project (coming from evb i
> >> >> understood them) I have a project that has a form with c buttons each
> >> >> button
> >> >> will crete a unique for for that buttons functionality. In button 1
> >> >> ihave
> >> >> the code
> >> >>
> >> >> Dim StagingEvents as new frmStagingevents(passet)
> >> >> StagingEvents.ShowDialog
> >> >>
> >> >> (passet is a object of a asset that was previous scanned and found in
> >> >> a
> >> >> database)
> >> >>
> >> >> so now that the new form Stagingevents is active how do I kill the
> >> >> mainmenu
> >> >> form from within the currently active form StagingEvents
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>

Re: recalling forms in wm5 by Chuck

Chuck
Thu May 01 16:23:09 CDT 2008

What would you recommend on the handling of the forms?
I am very concerned that with the total number of forms being
used, I do not want my app to behave poorly or with errors?

"Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
news:0181E47B-3A92-4B89-88FC-7296DBADC379@microsoft.com...
> You're only ever supposed to have one Application.Run as this sets up the
> message pump for your application. Although it should work (I guess)
> terminating one then starting another, it's not good practice.
> --
> Simon Hart
> Visual Developer - Device Application Development MVP
> http://simonrhart.blogspot.com
>
>
> "Chuck Hecht" wrote:
>
>> Yes
>>
>> Then from frmLogin once there is a good username and password they will
>> be
>> displayed the mainmenu.
>> From this form there is the possiblity for another 6 forms.
>>
>> chuck
>>
>> "Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
>> news:1B6EE74C-29C3-43C5-80EA-F56EF4FD800F@microsoft.com...
>> > Are you trying to kill frmLogin from another form?
>> > --
>> > Simon Hart
>> > Visual Developer - Device Application Development MVP
>> > http://simonrhart.blogspot.com
>> >
>> >
>> > "Chuck Hecht" wrote:
>> >
>> >> Simon,
>> >> Thanks for the reply. I do have a module as the project startup and in
>> >> the
>> >> module I have the following
>> >> Public Sub main()
>> >>
>> >> GetSqlCeData()
>> >>
>> >> GetSessionId()
>> >>
>> >> CreateDatasetForScannerData()
>> >>
>> >> 'System.Diagnostics.Debugger.Break()
>> >>
>> >> Application.Run(frmLogin)
>> >>
>> >> End Sub
>> >>
>> >> Is this wrong? How would you recommend I manage mulipe forms (+10)
>> >>
>> >> chuck
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> "Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
>> >> news:5EBE45CE-52B9-45F5-B84B-366BA031F62F@microsoft.com...
>> >> > You'd have to pass the mainform handle to your sub form. Bear in
>> >> > mind
>> >> > if
>> >> > the
>> >> > mainmenu form was used to setup the message pump (Application.Run)
>> >> > doing
>> >> > this
>> >> > will end your application.
>> >> > --
>> >> > Simon Hart
>> >> > Visual Developer - Device Application Development MVP
>> >> > http://simonrhart.blogspot.com
>> >> >
>> >> >
>> >> > "Chuck Hecht" wrote:
>> >> >
>> >> >> I have been using panels for most of my project (coming from evb i
>> >> >> understood them) I have a project that has a form with c buttons
>> >> >> each
>> >> >> button
>> >> >> will crete a unique for for that buttons functionality. In button 1
>> >> >> ihave
>> >> >> the code
>> >> >>
>> >> >> Dim StagingEvents as new frmStagingevents(passet)
>> >> >> StagingEvents.ShowDialog
>> >> >>
>> >> >> (passet is a object of a asset that was previous scanned and found
>> >> >> in
>> >> >> a
>> >> >> database)
>> >> >>
>> >> >> so now that the new form Stagingevents is active how do I kill the
>> >> >> mainmenu
>> >> >> form from within the currently active form StagingEvents
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>



Re: recalling forms in wm5 by srhartone

srhartone
Sat May 03 04:49:00 CDT 2008

Have a single main form which then fires off sub forms - this is the usual
way to do things, then dispose these then you're done.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"Chuck Hecht" wrote:

> What would you recommend on the handling of the forms?
> I am very concerned that with the total number of forms being
> used, I do not want my app to behave poorly or with errors?
>
> "Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
> news:0181E47B-3A92-4B89-88FC-7296DBADC379@microsoft.com...
> > You're only ever supposed to have one Application.Run as this sets up the
> > message pump for your application. Although it should work (I guess)
> > terminating one then starting another, it's not good practice.
> > --
> > Simon Hart
> > Visual Developer - Device Application Development MVP
> > http://simonrhart.blogspot.com
> >
> >
> > "Chuck Hecht" wrote:
> >
> >> Yes
> >>
> >> Then from frmLogin once there is a good username and password they will
> >> be
> >> displayed the mainmenu.
> >> From this form there is the possiblity for another 6 forms.
> >>
> >> chuck
> >>
> >> "Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
> >> news:1B6EE74C-29C3-43C5-80EA-F56EF4FD800F@microsoft.com...
> >> > Are you trying to kill frmLogin from another form?
> >> > --
> >> > Simon Hart
> >> > Visual Developer - Device Application Development MVP
> >> > http://simonrhart.blogspot.com
> >> >
> >> >
> >> > "Chuck Hecht" wrote:
> >> >
> >> >> Simon,
> >> >> Thanks for the reply. I do have a module as the project startup and in
> >> >> the
> >> >> module I have the following
> >> >> Public Sub main()
> >> >>
> >> >> GetSqlCeData()
> >> >>
> >> >> GetSessionId()
> >> >>
> >> >> CreateDatasetForScannerData()
> >> >>
> >> >> 'System.Diagnostics.Debugger.Break()
> >> >>
> >> >> Application.Run(frmLogin)
> >> >>
> >> >> End Sub
> >> >>
> >> >> Is this wrong? How would you recommend I manage mulipe forms (+10)
> >> >>
> >> >> chuck
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> "Simon Hart [MVP]" <srhartone@yahoo.com> wrote in message
> >> >> news:5EBE45CE-52B9-45F5-B84B-366BA031F62F@microsoft.com...
> >> >> > You'd have to pass the mainform handle to your sub form. Bear in
> >> >> > mind
> >> >> > if
> >> >> > the
> >> >> > mainmenu form was used to setup the message pump (Application.Run)
> >> >> > doing
> >> >> > this
> >> >> > will end your application.
> >> >> > --
> >> >> > Simon Hart
> >> >> > Visual Developer - Device Application Development MVP
> >> >> > http://simonrhart.blogspot.com
> >> >> >
> >> >> >
> >> >> > "Chuck Hecht" wrote:
> >> >> >
> >> >> >> I have been using panels for most of my project (coming from evb i
> >> >> >> understood them) I have a project that has a form with c buttons
> >> >> >> each
> >> >> >> button
> >> >> >> will crete a unique for for that buttons functionality. In button 1
> >> >> >> ihave
> >> >> >> the code
> >> >> >>
> >> >> >> Dim StagingEvents as new frmStagingevents(passet)
> >> >> >> StagingEvents.ShowDialog
> >> >> >>
> >> >> >> (passet is a object of a asset that was previous scanned and found
> >> >> >> in
> >> >> >> a
> >> >> >> database)
> >> >> >>
> >> >> >> so now that the new form Stagingevents is active how do I kill the
> >> >> >> mainmenu
> >> >> >> form from within the currently active form StagingEvents
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>