CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > .NET Programming > C-Sharp Programming
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    C-Sharp Programming Post questions, answers, and comments about C#.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old March 8th, 2007, 03:18 AM
    battula32 battula32 is offline
    Member
     
    Join Date: Nov 2004
    Posts: 102
    battula32 is an unknown quantity at this point (<10)
    Find Functionality in Notepad

    Hi All,

    I am working on flexgid, Here I need to find some of the strings populating in flexgrid. I designed find dialog layout just like Notepad find dialogbox.

    But I didn't get the total functionality of notepad find window.
    I am calling Find form as

    frmFind.ShowDialog();

    If I call like it will open like model dialog and I can not able to select the background( Flexgrid form) unless until I close this find dialog box, But i case of notepad we can able to select background notepad window also.

    Can anybody help on this how they acived this functionality, How they are calling the find window?. Is it model dialog box or not?

    regards
    Ravi.Battula
    Reply With Quote
      #2    
    Old March 8th, 2007, 03:55 AM
    Charu0306 Charu0306 is offline
    Member
     
    Join Date: Mar 2004
    Posts: 206
    Charu0306 is on a distinguished road (10+)
    Re: Find Functionality in Notepad

    When a modal dialog is shown, it requires that no other window receives input focus for that application. So, in Notepad, guess its modalless dialog only. Find dialogs are implemented as non-modal only usually.

    Keep it non-modal and only then you can select line in Flexgrid.
    __________________

    [If you find my answers useful, please leave your comments and rating for it.]
    Happy Coding!
    My Dev.: MS VS 2005 Version 8.0.50727.42 .NET 2.0.50727
    Mark your answers Tools>>RESOLVED once its answered.
    Reply With Quote
      #3    
    Old March 8th, 2007, 05:17 AM
    battula32 battula32 is offline
    Member
     
    Join Date: Nov 2004
    Posts: 102
    battula32 is an unknown quantity at this point (<10)
    Re: Find Functionality in Notepad

    If I call it as non-modal dialog, If I select the flexgrid, then Find window is going behind the Flexgrid form(Main window).

    But in case of notepad after selecting notepade text also, find window will appear upon notepad window, only it loses focus, still it stays on top of notepad (main window). I want know how they are handling this.

    regards
    Ravi
    Reply With Quote
      #4    
    Old March 9th, 2007, 01:24 AM
    Charu0306 Charu0306 is offline
    Member
     
    Join Date: Mar 2004
    Posts: 206
    Charu0306 is on a distinguished road (10+)
    Re: Find Functionality in Notepad

    Quote:
    Originally Posted by battula32
    If I call it as non-modal dialog, If I select the flexgrid, then Find window is going behind the Flexgrid form(Main window).

    But in case of notepad after selecting notepade text also, find window will appear upon notepad window, only it loses focus, still it stays on top of notepad (main window). I want know how they are handling this.

    regards
    Ravi
    Try to set MessaegBoxStyle as SetForegroundwindow . It should work here.
    __________________

    [If you find my answers useful, please leave your comments and rating for it.]
    Happy Coding!
    My Dev.: MS VS 2005 Version 8.0.50727.42 .NET 2.0.50727
    Mark your answers Tools>>RESOLVED once its answered.
    Reply With Quote
      #5    
    Old March 9th, 2007, 01:25 AM
    Charu0306 Charu0306 is offline
    Member
     
    Join Date: Mar 2004
    Posts: 206
    Charu0306 is on a distinguished road (10+)
    Re: Find Functionality in Notepad

    Actually, you can use the Datagrid's datasource Find method and then pass the Text typed by the user to search for that column value as a parameter to Find and select. If a record is found, you can highlight it then.

    Try to do it.
    __________________

    [If you find my answers useful, please leave your comments and rating for it.]
    Happy Coding!
    My Dev.: MS VS 2005 Version 8.0.50727.42 .NET 2.0.50727
    Mark your answers Tools>>RESOLVED once its answered.
    Reply With Quote
      #6    
    Old March 9th, 2007, 04:46 AM
    battula32 battula32 is offline
    Member
     
    Join Date: Nov 2004
    Posts: 102
    battula32 is an unknown quantity at this point (<10)
    Re: Find Functionality in Notepad

    Thanks Charu

    I will use SetForegroundWindow(...)

    Thanks and Regards
    Ravi.Battula
    Reply With Quote
      #7    
    Old March 9th, 2007, 05:32 AM
    Charu0306 Charu0306 is offline
    Member
     
    Join Date: Mar 2004
    Posts: 206
    Charu0306 is on a distinguished road (10+)
    Re: Find Functionality in Notepad

    Sure you're welcome.
    __________________

    [If you find my answers useful, please leave your comments and rating for it.]
    Happy Coding!
    My Dev.: MS VS 2005 Version 8.0.50727.42 .NET 2.0.50727
    Mark your answers Tools>>RESOLVED once its answered.
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > .NET Programming > C-Sharp Programming


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 06:30 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009