Creating a Find Dialog

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • New 2 .NET

    #1

    Creating a Find Dialog

    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 .SelectionLengt h = 13 without reloading frmMain? So far, I have only been able to set parts of a form before loading it in .NET.

    Thanks!
  • Sahil Malik

    #2
    Re: Creating a Find Dialog

    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" <New 2 .NET@discussion s.microsoft.com > wrote in message
    news:14A143C7-35EA-4E7B-B1EF-88BD010B00C6@mi crosoft.com...[color=blue]
    > Hi,
    > I am trying to create a find Dialog box for my notepad "test" application,[/color]
    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:[color=blue]
    > frmMain.rtfText .SelectionLengt h = 13 without reloading frmMain? So far, I[/color]
    have only been able to set parts of a form before loading it in .NET.[color=blue]
    >
    > Thanks![/color]


    Comment

    • Cor Ligthert

      #3
      Re: Creating a Find Dialog

      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.whateve r?

      I hope this helps?

      Cor
      [color=blue]
      > Hi,
      > I am trying to create a find Dialog box for my notepad "test" application,[/color]
      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:[color=blue]
      > frmMain.rtfText .SelectionLengt h = 13 without reloading frmMain? So far, I[/color]
      have only been able to set parts of a form before loading it in .NET.[color=blue]
      >
      > Thanks![/color]


      Comment

      Working...