473,387 Members | 3,781 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,387 software developers and data experts.

how pass data between forms

part of my application has a "Notepad" similar function with a separate
"Find" form.

-- how do I keep the Find form open yet have it pass data back to the Main
form to do repetitive searches -- llike Notepad ??

I've tried both "Show()" (which doesn't work) and "ShowDialog() (which works
fine but I don't know how to make it do repetitive "Next" searches).

It seems I need to do the searching from the Find form -- but I can't figure
out how to access the richtextbox form on the main form.
Nov 21 '05 #1
5 2084
"tcloud" <tc****@discussions.microsoft.com> schrieb:
part of my application has a "Notepad" similar function with a separate
"Find" form.

-- how do I keep the Find form open yet have it pass data back to the Main
form to do repetitive searches -- llike Notepad ??

I've tried both "Show()" (which doesn't work) and "ShowDialog() (which
works
fine but I don't know how to make it do repetitive "Next" searches).

It seems I need to do the searching from the Find form -- but I can't
figure
out how to access the richtextbox form on the main form.


Pass a reference that points to the richtextbox to the find form, in a
property, for example.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2


"Herfried K. Wagner [MVP]" wrote:
Pass a reference that points to the richtextbox to the find form, in a
property, for example.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


I'm sorry, but I don't understand that answer -- is there some place I can
see some sample code? I'm not an experienced programmer.
Nov 21 '05 #3
How about set the RichTextBox's Modifiers to Public, and in main form use
frmFind.RichTextBox1.Text?
"tcloud" <tc****@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...


"Herfried K. Wagner [MVP]" wrote:
Pass a reference that points to the richtextbox to the find form, in a
property, for example.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


I'm sorry, but I don't understand that answer -- is there some place I can
see some sample code? I'm not an experienced programmer.

Nov 21 '05 #4
"Wencheng Magiya" <go*******@hotmail.com> schrieb:
How about set the RichTextBox's Modifiers to Public, and in main form use
frmFind.RichTextBox1.Text?


That would work too, but it's better to decouple the two form classes.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5
=?Utf-8?B?dGNsb3Vk?= <tc****@discussions.microsoft.com> wrote in
news:FA**********************************@microsof t.com:
I've tried both "Show()" (which doesn't work) and "ShowDialog() (which
works fine but I don't know how to make it do repetitive "Next"
searches).


Maybe this helps?
http://www.codeproject.com/dotnet/Wo...thWinForms.asp

Its similar - just call methods in addition to what it shows.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Get your ASP.NET in gear with IntraWeb!
http://www.atozed.com/IntraWeb/
Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Casey | last post by:
Yeah, I know this question was asked by someone elselike 2 weeks ago. But I need some additional help. I have a program I'm developing, and multiple different forms will be opened. For now though,...
7
by: Zlatko Matić | last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL Server) and that we want to execute some parameterized query as a pass.through query. How can we pass parameters to the...
3
by: Todd Schinell | last post by:
Back in July, Jeffery Tan posted this: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=OWOTdf0VDHA.2296%40cpmsftngxa06.phx.gbl In response as to how to get click events from a...
6
by: juky | last post by:
Hi all, I have 2 applications one in VB.net and the other in VC6. I need to pass data between them. How can I do it? what's the best way to implement such communication ? Any comment will be...
1
by: woody | last post by:
I have a bit of a newbie question (basically stated in the subject of the posting). If need to get some data out of a SQL Server Database. Can I use a control from a form to supply a parameter. ...
19
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect...
4
by: rlntemp-gng | last post by:
I have one module where I would like to launch 2 different forms (that do exist), based on a form object and string that is passed into it. (prmTable is a string, not a table object simply because...
4
by: Lilith | last post by:
I have a form that invokes two other dialog forms for controlling the configuration of the program. The dialogs are invoked modally. Rather than pile up a large number of variables in the primary...
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...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
marktang
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,...
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,...

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.