473,383 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

form1 attach with form2

hi everyvody
i create a project in visual basic 6.0 in this project i make 2 form :- form1 & form2.in form1 i have one command box.now when i click on command box of form1 then open form2.

for this what code. give me some tips plz.its very urgent
Feb 21 '07 #1
4 2183
hariharanmca
1,977 1GB
hi everyvody
i create a project in visual basic 6.0 in this project i make 2 form :- form1 & form2.in form1 i have one command box.now when i click on command box of form1 then open form2.

for this what code. give me some tips plz.its very urgent

Form2.Show
Feb 21 '07 #2
hi, what you should do is to declare a variable as new form2, in form1

write this code under the btn1_click event,
dim a as new form2,
if you have'nt yet added a new form go solution explorer its on the right pane pane that is the name of your proj, then right click- add new inherited form, then on the name field type as is(form2)


now go back to btn1

add this line


a.show
me.hide(optional if you would prefer to hide frm1 when it loses focus
Feb 28 '07 #3
If u want to make form1 to be waited till form2 ends den
form2.show 1
Feb 28 '07 #4
Killer42
8,435 Expert 8TB
hi, what you should do is to declare a variable as new form2, in form1...
Isn't that a lot of extra work? Why not just show form2?
Feb 28 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: nadir b | last post by:
hi I don't know how to change for exemple a form1 caption text from form2 don't forget that form2 has created from form1 I want sample code with c# *** Sent via Developersdex...
6
by: Jonathan | last post by:
Hi, I have 2 forms "Form1" & "Form2" In Form1, there is a button to click to open Form2 and set Form1.Enabled = False However, when i finish using Form2, i cannot Enable Form1? In Form2, i...
5
by: PAPutzback | last post by:
Form2 has one purpose to open and list some names and ids. I want to handle the list box click event on form2 so I can get the selected value onto a field in form1. I changed this Dim MyForm2...
1
by: Richard | last post by:
Hello there, I have a form that is called from a Sub Main procedure using application.run(Form1). On my main form there is a button to open an instance of Form2 and then at the same time hide...
5
by: John | last post by:
Hi, I can't find a simple example for a simple(?) problem. I am working on an application with a variable in form1, that variable is needed in form2 for a calculation but i can't get that...
3
by: Karan | last post by:
I am calling finalize when form2 loads and deactivates form1 which closes form1. However, same thing is not happening in form2 because finalize is already called. Does anybody has solution to it....
3
by: R. Harris | last post by:
Hi. I have 2 forms: form1 form2 On Form2 I have a listbox and a button. When I click the button it calls a function from form1 and within that function it updates the listbox on form2. My...
1
by: Suma | last post by:
Hi, i have a problem with the controls .i have to validate Form1 Radio button option is checked or Not in the Form2. even after checking the radio button also in FOrm2 it is always taking as...
7
by: Boki | last post by:
Hi All, I want to change WindowState of form1 from form2. I tried these two methods, but no luck on both. (1) Declare a public method: /* function of form1 */ public void...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.