473,397 Members | 2,028 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,397 software developers and data experts.

Pass values to existing open form

Hi all,

I am using two forms.From form1 button click i am opening form2,and i am passing values to form2 using delegate.when i click the button again form2 shouldn't open again but values should pass to already open form(form2) here i am added tab pages in tab control for every button click in one form.

how to do this...anyone help me...thnax in advance

Expand|Select|Wrap|Line Numbers
  1.  
  2. Form1 Code:
  3.  
  4. Dim frm As Form
  5.  
  6.             For Each frm In My.Application.OpenForms
  7.  
  8.                 Dim x1 As String = frm.ToString()
  9.                 Dim x2 As String = My.Forms.Form2.ToString()
  10.                 If x1 = x2 Then
  11.  
  12.                     MessageBox.Show("visible")
  13.  
  14.                     Exit Sub
  15.                 End If
  16.             Next
  17.  
  18.             im = New Form2 
  19.             im.Show()
  20.             Dim MyGreeting As GreetingDelegate
  21.             MyGreeting = New GreetingDelegate(AddressOf im.GoodMoring)
  22.             MyGreeting.Invoke(Textbox1.Text, Textbox2.Text)
  23.  
  24. Form2 Code:
  25. Public Sub GoodMoring(ByVal Fname As String, ByVal Username As String)
  26.             _strfriendname = Fname
  27.             _strUsername = Username
  28.             Dim wbReceive As New WebBrowser
  29.             Me.ctlTabPages.Add(New TabPages.TabPage(_strfriendname, wbReceive, "Created: " & DateTime.Now.ToLongTimeString()))
  30.         End Sub
  31.  
Nov 28 '07 #1
0 1041

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

Similar topics

2
by: Ben | last post by:
Hi, When clicking on a button, a new record must be created in an Access table. See my code: <% set objdc = Server.CreateObject("ADODB.Connection")...
3
by: Don Seckler | last post by:
I have a data entry form called Draw. This form is used to enter data in the table called Draw. The table has the following fields: WholesalerID, MagID, IssueID, CopiesDist, and the index is...
3
by: Lyn | last post by:
Hi, I have been experiencing a problem passing a LIKE statement in the WHERE argument of a DoCmd.Openform statement. I have posted that issue separately. However, in an attempt to work around...
8
by: Brian F | last post by:
Exactly what the subject says. I have an ASP page that I want my C# windows application to open in Internet Explorer, and if possible have it send along a list of values from a list box. Thank you.
4
by: tom | last post by:
Hi Experts, I want to pass the selectedDate value from my calender form to another web form or a web user control. Could you please show me how to do this? Thanks in advance.
1
by: colleen1980 | last post by:
Hi: Can any one please tell me that how to i pass the two textbox values in the new page. If i use the form action in the popup window page then the new page is open in the same popup window as i...
14
by: =?Utf-8?B?Umljaw==?= | last post by:
I have seen examples of passing data from FormB to FormA (Parent To Child) but I need an example of passind data from FormA to FormB. My main form is FormA; I will enter some data in textboxes and...
24
by: =?Utf-8?B?U3dhcHB5?= | last post by:
Can anyone suggest me to pass more parameters other than two parameter for events like the following? Event: Onbutton_click(object sender, EventArgs e)" Event handler: button.Click += new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.