Creating a Find Dialog

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am trying to create a find Dialog box for my notepad "test" application, to help me learn .NET (I am an experienced vb6 programmer). How do I create variables that are available on all forms (vb6 public) and how to I do something like:
frmMain.rtfText.SelectionLength = 13 without reloading frmMain? So far, I have only been able to set parts of a form before loading it in .NET.

Thanks!
 
You are gonna love .NET compared to VB6.

Though it is a bit different to get used to. The find dialog box is
implemented as nothing but ... guess what .. yet another class.

So if your callee is frmMain, and your called is dlgFind

you could from frmMain say .. dlgFindInstance.VariableName (assuming
VariableName is public)
OR
from dlgFind, you could in it's contructor pass an instance of frmMain,
which can access it's variables properties etc, or you could go the
this.Parent (C#) route instead. VB.NET I guess is Me.parent or sump'n like
dat. :)

- Sahil Malik
Independent Consultant
You can reach me thru my blog - http://dotnetjunkies.com/WebLog/sahilmalik/



New 2 .NET said:
Hi,
I am trying to create a find Dialog box for my notepad "test" application,
to help me learn .NET (I am an experienced vb6 programmer). How do I create
variables that are available on all forms (vb6 public) and how to I do
something like:
frmMain.rtfText.SelectionLength = 13 without reloading frmMain? So far, I
have only been able to set parts of a form before loading it in .NET.
 
Hi New

I answered it above, however your last question is different.

A form is a class, and a class you can name by me. What I wrote in your
other message for "text" is for every methode or property the same for a
class. "me.whatever?

I hope this helps?

Cor
Hi,
I am trying to create a find Dialog box for my notepad "test" application,
to help me learn .NET (I am an experienced vb6 programmer). How do I create
variables that are available on all forms (vb6 public) and how to I do
something like:
frmMain.rtfText.SelectionLength = 13 without reloading frmMain? So far, I
have only been able to set parts of a form before loading it in .NET.
 
Back
Top