Windows Form Application Help

N

neilphan

Hi Guys,

I need a quick reference to Windows Application Development in dotNet.
I'm fairly good at the Web Development using asp.net though i'm new to
the Windows Desktop Application environment.

For question would be how do you "Redirect" back and forth, from one
Windows Desktop Form to another? In the web environment, it would be
redirect(<page name>, <true/false to terminate the current page
process>) but how do I do the same.

I know that to terminate a particular Window Desktop Form it would be
me.dispose(true) and to redirect to anohter form, you must need to
create the form first. Also, how do you disable the "close/exit"
button on the top right of the form next to the minimize/maximize
button?

-----
A ) dim nextForm as Form2 = new Form2
B ) nextForm.show
C ) me.dispose(true)
---

how do i, from the form2, show another form assuming that the first
form at line C does not exitst.

Thanks in advance,
Neil

PS I'm currently using Visual Studio 2003 with dotnet framework 1.1 and
2.0 for my development environment. The last time i've written any
Windows Desktop Form Application was in VB6...maybe i should find that
old app and look at the source.
 
G

Guest

Hi Guys,

I need a quick reference to Windows Application Development in dotNet.
I'm fairly good at the Web Development using asp.net though i'm new to
the Windows Desktop Application environment.

For question would be how do you "Redirect" back and forth, from one
Windows Desktop Form to another? In the web environment, it would be
redirect(<page name>, <true/false to terminate the current page
process>) but how do I do the same.

I know that to terminate a particular Window Desktop Form it would be
me.dispose(true) and to redirect to anohter form, you must need to
create the form first. Also, how do you disable the "close/exit"
button on the top right of the form next to the minimize/maximize
button?

-----
A ) dim nextForm as Form2 = new Form2
B ) nextForm.show
C ) me.dispose(true)
---

how do i, from the form2, show another form assuming that the first
form at line C does not exitst.

Thanks in advance,
Neil

PS I'm currently using Visual Studio 2003 with dotnet framework 1.1 and
2.0 for my development environment. The last time i've written any
Windows Desktop Form Application was in VB6...maybe i should find that
old app and look at the source.

1. You can't really redirect like you do in a web environment. You can
change which form has focus.

2. me.dispose(true) is not the way to close a form. Me.Close is the
correct method to use.

3. Disable the "close/exit" with me.controlbox =false

4. "form at line C does not exitst." how can you run code like
me.dispose if the form does not exist?

Chris
 
C

Cor Ligthert [MVP]

Neil.

Suppose you have a masterform

Than you can do
\\\
dim frm2 as new form2 (a second page)
me.showdialog(me)
me.dispose 'this is an exception what I don't like spam is mostly true and
has it to be close
///

This does a little bit the behaviour as the redirect, where closing that
form 2 does that redirect back automaticly.

However with a windowform you have probably 100000 times more possibilities
than with a webform, so start first with your first form.

(You can as well like with an ASPNET page use 1 form with panels or extra 1
form with a tabpage etc etc)

It is just a start so try.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top