Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
| Search | Today's Posts | Mark Forums Read
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 16th, 2006, 01:24 PM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to open a new VB 2005 form from a button?

I know it works like this..
Code:
        Dim form1 = New Form
        form1.Visible = True
but i want to disable the parent window while the child window is open. how to do it?
  #2 (permalink)  
Old August 19th, 2006, 03:55 AM
ytb ytb is offline
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ytb
Default


are you working with vb6? if yes ,do it like next:
dim form2 as new form1
form2.show 1

  #3 (permalink)  
Old August 19th, 2006, 11:48 AM
Authorized User
 
Join Date: Jul 2006
Location: Festac Town, Lagos, Nigeria.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to dilionyi
Default

Well i normally use the hide command to make the other form invisible so that the user can work only with the current form and that is

previousform.hide
or
previousform.visible=false

but if you are working with vb6 then you can use this it will inactivate the previous form until the current form is closed but it will still be visible though

dim myform as New form
myform.show(vbmodal)

  #4 (permalink)  
Old August 19th, 2006, 11:52 AM
Authorized User
 
Join Date: Jul 2006
Location: Festac Town, Lagos, Nigeria.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to dilionyi
Default

the equivalent in vb 2005 is

Dim myform As New System.Windows.Forms.Form
VB6.ShowForm(myform, (VB6.FormShowConstants.Modal))

hope this helps



  #5 (permalink)  
Old August 20th, 2006, 11:25 AM
Authorized User
 
Join Date: Aug 2006
Location: Charlotte, NC, USA.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anubisascends
Default

What do you mean by disable, do you want to disable all of the controls, or are you just wanting to stop a specific sub from happening?

Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
Albert Einstein
US (German-born) physicist (1879 - 1955)


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form does not open when commandbar button clicked Arsi BOOK: Professional Outlook 2007 Programming ISBN: 978-0-470-04994-5 21 March 5th, 2009 04:03 AM
Close all MdiChield form from open one form/Button salman .NET Framework 2.0 6 December 10th, 2007 03:21 AM
Reset Button in VB.net 2005 asta2007 Visual Studio 2005 1 May 29th, 2007 12:13 AM
HELP!!!Coding a command button to open a form solva Beginning VB 6 5 May 10th, 2005 09:56 PM
How to open Access form from VB application? Dmitriy Pro VB 6 1 October 29th, 2004 02:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.