Click here to Skip to main content
15,878,809 members
Home / Discussions / C#
   

C#

 
QuestionReach usercontrol's child control's methods Pin
op7516-May-14 4:09
op7516-May-14 4:09 
QuestionRe: Reach usercontrol's child control's methods Pin
Richard MacCutchan16-May-14 6:38
mveRichard MacCutchan16-May-14 6:38 
AnswerRe: Reach usercontrol's child control's methods Pin
OriginalGriff16-May-14 8:03
mveOriginalGriff16-May-14 8:03 
GeneralRe: Reach usercontrol's child control's methods Pin
Richard MacCutchan16-May-14 21:25
mveRichard MacCutchan16-May-14 21:25 
AnswerRe: Reach usercontrol's child control's methods Pin
Emre Ataseven17-May-14 10:55
professionalEmre Ataseven17-May-14 10:55 
AnswerRe: Reach usercontrol's child control's methods Pin
SledgeHammer0117-May-14 11:31
SledgeHammer0117-May-14 11:31 
GeneralRe: Reach usercontrol's child control's methods Pin
op7518-May-14 22:00
op7518-May-14 22:00 
QuestionFail to click on Child windows using API Pin
Member 1063699816-May-14 3:29
Member 1063699816-May-14 3:29 
I have used SPY to find the intended Child window and used those DllImport("user32", ... as indicated in http://msdn.microsoft.com/en-us/magazine/cc163738.aspx#S3, but it doesn't work with the following codes:

C#
WindowsEnumerator enumerator = new WindowsEnumerator();
          
foreach (WindowsEnumerator.ApiWindow top in enumerator.GetTopLevelWindows())
{
    if (top.MainWindowTitle == "Client Builder")
    {
        foreach (WindowsEnumerator.ApiWindow child in enumerator.GetChildWindows(top.hWnd))
        {
            if (child.ClassName == "Child_ClassName" && child.MainWindowTitle == "Child_Title")
            {
                IntPtr Chd_win = IntPtr.Zero;

                // GUI 
                Chd_win = FindWindowEx(hwnd, Chd_win, child.ClassName, child.MainWindowTitle);
                           
                PostMessage(Chd_win, WM_LBUTTONDOWN, 5, 5); // button down 
                PostMessage(Chd_win, WM_LBUTTONUP, 5, 5); // button up
                           
                MessageBox.Show(child.ClassName + ", " + child.MainWindowTitle, "");
            }
        }
    }
}


*) The Child Window pointer Chd_win always returns Zero even if it found the correct child.MainWindowTitle & child.ClassName (it confirms with the MessageBox.Show(child.ClassName + ", " + child.MainWindowTitle, "")

*) I can send the image with the SPY shows Child Window with the GUI if you provide the Email address (for easier to understand my problem)

Thanks in-advanced D'Oh! | :doh:
QuestionRe: Fail to click on Child windows using API Pin
Alan N16-May-14 5:46
Alan N16-May-14 5:46 
AnswerRe: Fail to click on Child windows using API Pin
Member 1063699816-May-14 6:43
Member 1063699816-May-14 6:43 
QuestionRe: Fail to click on Child windows using API Pin
Alan N16-May-14 8:32
Alan N16-May-14 8:32 
AnswerRe: Fail to click on Child windows using API Pin
Member 1063699816-May-14 10:34
Member 1063699816-May-14 10:34 
QuestionRe: Fail to click on Child windows using API Pin
Alan N19-May-14 1:50
Alan N19-May-14 1:50 
AnswerRe: Fail to click on Child windows using API Pin
Member 1063699819-May-14 6:04
Member 1063699819-May-14 6:04 
AnswerRe: Fail to click on Child windows using API Pin
Member 1063699819-May-14 6:33
Member 1063699819-May-14 6:33 
Questionsimple log in authorized member sample! Pin
Hakan Bulut16-May-14 0:26
Hakan Bulut16-May-14 0:26 
SuggestionRe: simple log in authorized member sample! Pin
Richard MacCutchan16-May-14 0:49
mveRichard MacCutchan16-May-14 0:49 
GeneralRe: simple log in authorized member sample! Pin
Hakan Bulut16-May-14 1:09
Hakan Bulut16-May-14 1:09 
GeneralRe: simple log in authorized member sample! Pin
Richard MacCutchan16-May-14 1:16
mveRichard MacCutchan16-May-14 1:16 
GeneralRe: simple log in authorized member sample! Pin
Hakan Bulut16-May-14 1:32
Hakan Bulut16-May-14 1:32 
GeneralRe: simple log in authorized member sample! Pin
Richard MacCutchan16-May-14 1:35
mveRichard MacCutchan16-May-14 1:35 
GeneralRe: simple log in authorized member sample! Pin
Hakan Bulut16-May-14 1:52
Hakan Bulut16-May-14 1:52 
GeneralRe: simple log in authorized member sample! Pin
OriginalGriff16-May-14 2:08
mveOriginalGriff16-May-14 2:08 
GeneralRe: simple log in authorized member sample! Pin
Richard MacCutchan16-May-14 2:28
mveRichard MacCutchan16-May-14 2:28 
GeneralRe: simple log in authorized member sample! Pin
Hakan Bulut16-May-14 2:47
Hakan Bulut16-May-14 2:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.