Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的 Windows 窗体应用程序中启用 Ctrl+F 或查找或搜索功能。
我的应用程序包括主演示者和副演示者。
我的搜索是简单的文本搜索,但在由可编辑控件组成的不同子演示者中。
每当找到搜索时,焦点就会设置到该子演示者的特定控件。
但是当再次单击“查找”按钮时,我想从最后一个搜索结果开始搜索,而不是从头开始搜索。
可以存储演示者状态吗?这样我就可以从上次搜索状态开始。
当您单击查找下一个开始时,将前一行编号存储在某个全局变量中
static public bool FindNext(string searchString, bool caseSensitive,int line no) { //Your code }