Those questions are on a different topic. You should create a new thread to ask your new questions and I will be happy to help you :)

hi sknake....
I have some problem in roundoff function.
Can u please solve it for me...........

well i create i new thread........
thread Title is:
How to use Menustrip and toolstrip in window application?

vinnijain: Please do not append your questions to someone elses thread. Create a new thread in the appropriate forum and someone will help you :)

If your roundoff method is C# then create a thread and one of the daniweb C# solvers will help out

hi sknake...........
i need your help....
i m having certain problems regarding the search funtionality, which you gave me.I want to modify that search engine.
i want that if a user has entered any string ,it should match the complete string with the text property of the form only, not the text which is present on the form and not with the form name.

Also it should check for critical errors like More than one spacing .If there is more than one spacing then also it should automatically remove the extra spaces and display the corresponding form.
Kindly please help me regarding this........

That is a small change. What have you tried so far?

whatever i have done that is in my application .which i have attested here.
Also there is one more thing that on the form which has search option , i cannot make the form open on the panel2 on that same form.

Hi sknake,
Kindly help me.............

So you only want to check the form's caption? The part in the top. and you want to match every word?

I was able to search forms by their text property.......
I want that the system should first calculate the length of string..If length is less than 20 characters then it should compare only first 15 characters only() removing all white spaces and if length is more than 20 characters it should compare first 30 characters (removing white spaces).

Also, I have made a panel below the search textbox (where we are searching strings), and I want to display the searched form in that panel...
How can I do this...............

upload your current project *again* and i will take a look

my project is here..........
Kindly help me ,I am not able to find any solution.......

You need to elaborate more on your search terms now that I have taken a look at it and thought about it. If the search term is <15 char, the form text is <15, or both? Give me a lots of different scenarios and how the matching should work.

Do you only want to match words [a-Z][0-9] or do you want to match symbols "!@#(@)#$&" too?

With searching you *rarely* get exact matches so you usually want it to be sort of generic.

yes,If the search term is <15 char, the form text is <15.So it should compare at least 12 characters out of 15.If the string is more than 30,then it should compare at least 30 characters.
And my string can contain [a-Z][0-9] and special characters both.
Kindly reply.....

Also there is one more thing that it should match the characters till the end .Even if it gets match after 5 characters but it should compare string till the end otherwise give an error.
For example:I have two forms with text "find the sum of all multiples" and "find the sum of all divisors"...
In these cases if user enters only "find the sum", then it should give an error.Untill and unless user enters completes string it should not show any of the forms.

>> Also, I have made a panel below the search textbox (where we are searching strings), and I want to display the searched form in that panel...

You can't do that on that frmSearch because they enter the keyword search term on that form. On frmResults you can have more than one form match the text so you would have to allow them to choose what panel to be displayed. Unless you wanted an artibrary rule such as "Only show the first form for any search text" but that makes the search meaningless because they could only ever see one result.

I have uploaded a modified version of your project and tested it against these terms:

61: Find the sum of all multiples of 9 lying between 300 and 700.
19: Find the sum of all
20: Find the sum of alX (should match since we compare 15 if length < 20)
25: Find the sum of all multi 
33: Find the sum of all multiples ofX (should match since we compare 30 if length > 20)

Is this a school assignment by the way? You having very odd goals for the application :)

Thanks for your reply....
But my problem is not solved yet....
I want only one result for the entered string not more than one . Thats why I want matching of the string till end so that it may display only distinct result.
I want such type of functionality that it matches the text of the form exactly and display only one result, no matter whatever the length of the string is.It should compare the entered string with the text of the form completely ....

Can u please help me in this......

Uh... you're on your own from here. You changed the requirements twice and now you're changing them again a third time because you didn't really just say what you wanted to have from the beginning.

What you really want is a ranking function that determines the *best match* not an exact match on words to always return a single form for any search phrase.

That should give you an idea but I keep redoing things and I can't see any effort on your part. This should be an easy task for you to go about.

this is last time i want you to solve the problem.....
Sorry but, i was not able to explain my problem to you initially.......
Actually, i want the best match n want to display single result's form on panel2. Otherwise it should give error..........
Kindly help me last time..........

Please don't be so harsh..........

you have solved many of my queries and I have learnt many new things from you .........
Kindly help me............

I think you should give Scott a gold metal and promptly send him a basket of freshly made chocolate chip cookies. That is all.

commented: :) +8

Think of what your question started out as:
"I want a way to search all forms for a search string"
(I assumed searching the form's name, caption, and control's text)

and what it has evolved to:
"I want a way to search all forms for a search text and calculate the relevance of the search text to the form's caption. The most relevant form should be displayed in a panel on the search screen."

Calculating search relevance is what google does. Its not that easy. I have answered your original question. Each time I answer a new aspect of your question it evolves. This thread is never going to end.

This is the last time, kindly reply to my question......
After your reply i wont be extending this thread at all..
If you solve my this problem, this thread will surely end.

What about this -- If you show the results form (which can have multiple forms listed on it) and when they highlight a row it will embed the form in a panel. Its almost the same thing but you don't have to make a search ranking function.

I dont want to show multiple forms in result form.When the string is entered in textbox and on clicking on search button, it should match exactly with the text property of the forms and should display that particular form only in the lower panel....

why not just do "if search term == form text" then and do away with the search functioning altogether. That will make it more or less useless though because nobody will ever know the exact text except for you... and you will forget the exact text when you haven't worked on the project for a day making it completley useless.

I know this thing.......
But I don't know how and where in the code I should apply this........

public static SearchResult[] FindString2(string Text)
    {
      List<SearchResult> result = new List<SearchResult>();
      foreach (Type type in Assembly.GetExecutingAssembly().GetTypes())
      {
        if (type.IsSubclassOf(typeof(Form)))
        {
          if (_excludeForms.Contains(type))
            continue;

          using (Form f = (Form)Activator.CreateInstance(type))
          {
            if (string.Compare(Text, f.Text, true) == 0) //exact match
              result.Add(new SearchResult(type, f.Text));
          }
        }
      }
      return result.ToArray();
    }

Its fine.....
Thanks a lot but the form that exactly matches, its content are not displaying in lower panel .I dont want link to be displayed in separate window(result window) but the matched form should be opened in lower panel below search button...

OK -- so at this point the only problem is the panel, right? If so then upload your project and I will make *the last change*

commented: 60 post. It's salient feature of great poster like scott. +11
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.