This is a migrated thread and some comments may be shown as answers.

How do you handle Native Win32 Windows Handling in webAii framework versions 2010.2.927 and 2010.2.830?

1 Answer 47 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Limu
Top achievements
Rank 1
Limu asked on 21 Oct 2010, 04:38 PM

I am using IE8, VS 2010, Silverlight app for our application. Also using webAii framework 2010.2.927.
I am trying to use the below code provided by telerik admin for file upload dunctionality. I am not able to define a new windows object and I get compilation error: The type or namespace name 'Window' could not be found are you missing an assembly reference?
I am not able to use the assembly artoftest.webaii.win32.window in this version. Is this a bug or have you changed the assembly?
Is there an alternative to this code to handle the fileupload dialog? Please help.

Window w = WindowManager.FindWindowRecursively(IntPtr.Zero, "Upload", true, 1000);
w.SetFocus();
w.SetActive();
app.Desktop.KeyBoard.SendString("MyFilePath");
ArtOfTest.WebAii.Win32.
 
Button openButton = new ArtOfTest.WebAii.Win32.Button(w.Handle, "Open", true);
openButton.Click();

Thanks

Shwetha

1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 25 Oct 2010, 08:07 PM
Hi Shwetha,

It sounds like you want to handle the standard Windows upload dialog. We have functions built into the API for this. How about this code instead?

FileUploadDialog dlg = new FileUploadDialog(ActiveBrowser, @"c:\path\filename.txt", DialogButton.SAVE);
myManager.DialogMonitor.AddDialog(dlg);
myManager.DialogMonitor.Start();
 
dlg.WaitUntilHandled(10000);
myManager.DialogMonitor.RemoveDialog(dlg);

This is documented here.

Greetings,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Limu
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or