PDA

View Full Version : It Is Possible?



Samio
01-02-2008, 01:20 AM
found = File.Find("C:\\", "*.exe", true, false);
Label.SetText("Search", found);

Serach *.exe File And SetLable While Serarching == SerachFile(Found Or No)
Sorry.My English Is Very Bad.
Please Help Me.;)

Teqskater
01-02-2008, 02:26 AM
Please clear your message up cause i dont understand what you want to do.

Samio
01-02-2008, 10:03 AM
Hi,Please View This Code:


StatusDlg.Show(MB_ICONNONE, false);
found = File.Find("C:\\", "*.exe", true, false);
StatusDlg.Hide();

When Searching File,Searched Files Shown In StatusDlg.
I Want To Don't View StatusDlg And Set a Lable Object abreast Searched Files.
Please Help Me,It Is Very Important.

Protocol
01-03-2008, 09:15 AM
Hmmm,

If I understand you correctly, try this attachement. It first prompts you for a search folder. If none is found, it promtps the user as such. If one is found, it displays the name of the file and if multiple files are found, then it prompts the user and asks if they'd like to see the results.

And don't worry, your English is better than my Persian. ;)

Samio
01-03-2008, 10:56 AM
Hi.
No,It Is Not Correct.
Instead Of Showing Searched Files In The Statusdlg Show Them In The A Lable Object.In Other Words Lable Equals Searched Files.
Please View This Files.
5744
5745
:huh:huh:huh:huh:huh

Protocol
01-03-2008, 12:18 PM
Short answer is yes. This is possible.

Unfortunately, I don't think you can do this through the built-in file find function. There may be a way through the callback function, but I never use it, so I wouldn't know off-hand how to use that element (plus it would seem like a waste of the function since you don't seem to want the Status Dialos anyways). One way I would do it is to build your own search function that would list all of the files and files within subfolders, it would then split the path of each file found and compare extensions. All-the-while, the results would update the label object of your choice. Additionally, you could place a cancel condition in your search parameters to effectively emulate the cancel function in the Status Dialog box.

I would build this for you, but I spent too much time building the last one and I'm falling behind on my freelance projects. Someone else can help you with this, but I would suggest following the recipe above.

Have fun!

Samio
01-04-2008, 09:04 AM
Hi.Please Help Me With A Project.:o

bule
01-04-2008, 11:43 AM
This might help:


function FileFound(path)
Label.SetText("Label1", path);
return true;
end

found = File.Find("C:\\", "*.exe", true, false, nil, FileFound);

Samio
01-04-2008, 11:52 PM
Hi,Thank You Very Much Dear Blue.:p
I Want To Abort (Cancel) Seraching Operation With A Cancel Button.
What Is It Way?
Sorry,My English Is Very Bad.

Samio
01-05-2008, 01:29 AM
Hi,Please View This Project.
5754
It Is A Correct Way For Cancel Searching Operation Or No.:)