Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms
Go Back  Xtreme Visual Basic Talk > > > Making NEW and DELETING OLD forms


Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2002, 03:29 PM
kwijibo
Guest
 
Posts: n/a
Default Making NEW and DELETING OLD forms


hi

i have a form called 'page' where the user will do some editing. however as the number of 'pages' created will depend on the user i would like to know how to make a new 'page' and also how delete a 'page'.

also as these 'pages' will all belong to the same category (like 'notebook') can anybody offer advice on how to manage these 'pages'??

thanks

r
Reply With Quote
  #2  
Old 06-17-2002, 03:35 PM
BillSoo's Avatar
BillSooMaking NEW and DELETING OLD forms BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default

Presumably you are using an MDIForm? And all of these other forms are MDIChildren?
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
  #3  
Old 06-17-2002, 03:44 PM
kwijibo
Guest
 
Posts: n/a
Default

yes the 'page' form is a MDI child BUT the 'notebook' would be composed of it and other different forms.

so therefore, at one stage in the program the 'page' section would arise and the user would have the option of either moving on with 1 page or creating/deleting some then moving on...

thanks

r
Reply With Quote
  #4  
Old 06-17-2002, 03:47 PM
Agent Agent is offline
Senior Contributor
 
Join Date: Oct 2001
Location: North Carolina of the U.S.A.
Posts: 1,008
Default

Clarification:

Notebook = Parent form or MDI parent.

Page = Child form or MDI child.

I think I'm correct.
__________________
Search the forums if time permits and use the [vb][/vb] tags to put VB code in your post.
Reply With Quote
  #5  
Old 06-17-2002, 03:50 PM
kwijibo
Guest
 
Posts: n/a
Default

yes correct

but 'page' is only one a number of different MDI child forms.

i want to be able to create and delete any number of 'pages' without it affecting the order of the 'forms'.

thanks

r
Reply With Quote
  #6  
Old 06-17-2002, 03:54 PM
Agent Agent is offline
Senior Contributor
 
Join Date: Oct 2001
Location: North Carolina of the U.S.A.
Posts: 1,008
Default

You want to load a new form, but it is the same form as the other
'pages' or child forms?

Code:
Option Explicit

Private Sub Command1_Click()

    Dim frmNew As Form1     ' or any other form...
    
    Set frmNew = New Form1
    
    frmNew.Show             ' Show the form...
    
End Sub
__________________
Search the forums if time permits and use the [vb][/vb] tags to put VB code in your post.
Reply With Quote
  #7  
Old 06-17-2002, 03:57 PM
kwijibo
Guest
 
Posts: n/a
Default

thanks for that.

how do i delete the pages????
Reply With Quote
  #8  
Old 06-17-2002, 04:00 PM
BillSoo's Avatar
BillSooMaking NEW and DELETING OLD forms BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default

Unload

The child can unload itself, or you can specifically unload a particula page externally.

One way would be to use the activeform property...eg.
Unload ActiveForm

Another way would be to cycle through the forms collection until you get the form youwish to unload.
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
  #9  
Old 06-17-2002, 04:01 PM
Agent Agent is offline
Senior Contributor
 
Join Date: Oct 2001
Location: North Carolina of the U.S.A.
Posts: 1,008
Default

I don't understand 'delete the pages' but maybe you mean
unload the form ('pages').

You just use the unload statement as usual!

If you want to unload the child form ('page'?) that is 'active'
or being worked on, you use...
Code:
Unload FrmNOTEBOOK.ActiveForm
__________________
Search the forums if time permits and use the [vb][/vb] tags to put VB code in your post.
Reply With Quote
  #10  
Old 06-17-2002, 04:05 PM
kwijibo
Guest
 
Posts: n/a
Default

ok thanks

does UNLOAD actually remove the form??

if not, what is the difference between UNLOAD and END??

thanks

r
Reply With Quote
  #11  
Old 06-17-2002, 04:07 PM
BillSoo's Avatar
BillSooMaking NEW and DELETING OLD forms BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default

Unload removes the form from memory.

End abruptly terminates the program. Unless you have a *really* good reason, you should NOT use END in your program.
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
  #12  
Old 06-17-2002, 04:08 PM
Agent Agent is offline
Senior Contributor
 
Join Date: Oct 2001
Location: North Carolina of the U.S.A.
Posts: 1,008
Default

Unload will remove the form from memory. To my knowledge,
END will abruptly stop the program without removing all the
resources it takes up. That is, to, my knowledge. I'm not sure.
The only time I use end is in the Form_Load sub, because once
the program kept on running and wouldn't unload. You might also
need END in a module, if you just are using a module.

You could just .Hide the form but, that will just hide it.
__________________
Search the forums if time permits and use the [vb][/vb] tags to put VB code in your post.
Reply With Quote
  #13  
Old 06-17-2002, 04:11 PM
kwijibo
Guest
 
Posts: n/a
Default

k

that clears it up thanks

r
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms
 
Making NEW and DELETING OLD forms
Making NEW and DELETING OLD forms
 
-->