Hi All,
I am developing windows application
My Intension is
Form1().vb is Parent window and Form2().Vb is Popup window.
In Form1().VB Im writing code like this
obj=new Form2()
obj.Form2_Load(sender,e)
obj.show()
In Form2().VB Im writing code like this
Me.Visable=false
obj=new form1()
obj.show()
Here im getting Form1() window two times.Is there any way to reload form1 that was opened first time?
Thanks,
Aswath.
7 16859
pass form1 as a parameter to form2
and call the show method from form2 for form1
I also noticed while calling form2 from form1, you called the form2_Load.
That is not necesary because it will be called when form2 is loaded onto the screen
cheers
HI,
Can u tell me how to pass form1 as parametar to form2?I dono plz give me the code.
Thanks
modify the constructor - class Form2
-
{
-
private Form1 frm1;
-
public Form2(Form1 f1)
-
{
-
this.frm1 = f1;
-
}
-
private void methodWhereForm1WillBeShown()
-
{
-
this.frm1.show();
-
}
-
}
-
-
class Form1
-
{
-
private void methodWhichOpensForm2()
-
{
-
Form2 f2 = new Form2(this);
-
f2.show();
-
}
-
}
-
any doubts now?
cheers
Hi,
Im using VB.Net.So plz give me vb.net code i can't able to understand cpp code.I want to refresh the form1() after closing/hiding form2().
Thanks,
Aswath.
Hi,
Im using VB.Net.So plz give me vb.net code i can't able to understand cpp code.I want to refresh the form1() after closing/hiding form2().
Thanks,
Aswath.
Hello
When u r opening the second form try to hide the first form show it canot be
visible ,when ever you want it just make that visible ,
Hi nmsreddy,
Thanks for replay,what u written is 100% correct but my intension is Form1() is Parent window and Form2() is popup window.So Form1() should be visible when Form2() is opened.I dono how to open popup window in windows application.so im doing this way.If u know plz help me..
Thanks,
Aswath.
- Class Form2
-
Private frm1 As Form1
-
Public Sub New(ByVal f1 As Form1)
-
Me.frm1 = f1
-
End Sub
-
Private Sub methodWhereForm1WillBeShown()
-
Me.frm1.show()
-
End Sub
-
End Class
-
-
Class Form1
-
Private Sub methodWhichOpensForm2()
-
Dim f2 As Form2 = New Form2(Me)
-
f2.show()
-
End Sub
-
End Class
Hi Mate,
Please start looking at vb/c# converters
The basic between the languages are very common, get the idea rather than trying to get code spoonfed
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Steve |
last post by:
I'm working in PHP, but am also using JavaScript, so perhaps there is
a better way to do this using more PHP code......
I setup a search screen for my database, the user enters data and
submits...
|
by: eric rudolph |
last post by:
I am writing a photo gallery and suppose 8 photos are displayed. When the
user clicks on a button under the picture, I want it to add that picture
name to a "favorites" list within the session...
|
by: Ellinghaus, Lance |
last post by:
> > Other surprises: Deprecating reload()
>Reload doesn't work the way most people think
>it does: if you've got any references to the old module,
>they stay around. They aren't replaced.
...
|
by: Cooper |
last post by:
Hello,
is possible to disable the reload (or update, for ie) of the a web page? If
yes, what i do? Otherwise if isn't possible, what i do for to set the
default value of a form when a user do a...
|
by: Mike Gifford |
last post by:
Hello,
I'm right now using
window.location.reload()
to refresh the browser. It behaves as I would want in Mozilla/Netscape,
but not in IE.
I want to refresh a form, but keep the cached...
|
by: Martin Ho |
last post by:
Hey Everyone,
I really hope there is someone who can figure out this problem.
Honestly, I spent 3 days now trying to find the solution, but nothing
works.
I'll try to explain the problem...
|
by: devonknows |
last post by:
hi ive got this at the end of my settings page, and i want it show the fmrSearch form change the check1.value, but everytime i do it, it takes two or three attempts for it to change (having to go...
|
by: =?Utf-8?B?UGF1bA==?= |
last post by:
Hi I tried a google search but could not find anything. I am trying to cause
one webpage to reload when a second web page is closed. The second webpage
loads data into a session variable and when...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |