Click here to Skip to main content
15,798,278 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to get ios device capacity using MDM profiling Pin
Gerry Schmitz5-Aug-20 6:58
mveGerry Schmitz5-Aug-20 6:58 
QuestionDataBase in User Control Pin
Ismael_19994-Aug-20 5:15
Ismael_19994-Aug-20 5:15 
AnswerRe: DataBase in User Control Pin
OriginalGriff4-Aug-20 5:32
mvaOriginalGriff4-Aug-20 5:32 
GeneralRe: DataBase in User Control Pin
Gerry Schmitz4-Aug-20 7:12
mveGerry Schmitz4-Aug-20 7:12 
GeneralRe: DataBase in User Control Pin
OriginalGriff4-Aug-20 7:26
mvaOriginalGriff4-Aug-20 7:26 
QuestionHow can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w31-Jul-20 3:38
arnold_w31-Jul-20 3:38 
AnswerRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Eddy Vluggen31-Jul-20 3:53
professionalEddy Vluggen31-Jul-20 3:53 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w31-Jul-20 5:03
arnold_w31-Jul-20 5:03 
When I use the code from PINVOKE: Getting all child handles of window · Software adventures and thoughts[^] to get all the children, I get 30 pointers. When I then log the Window texts using the following
C#
List<IntPtr> allChildWindows = new WindowHandleInfo(parentMainWindowHandle).GetAllChildHandles();
for (int i = 0; i < allChildWindows.Count; i++)
{
    StringBuilder sb2 = new StringBuilder(1024);
    GetClassName(allChildWindows[i], sb2, sb2.Capacity);
    sb2 = new StringBuilder(1024);
    GetWindowText(allChildWindows[i], sb2, sb2.Capacity);
    Debug.WriteLine(sb2.ToString());
}
then I get mostly empty strings, but I do get some strings that appears to come from the main form's (not the "sub"-form's) components (buttons, labels, etc), e.g. "<all branches="">", "Help", "Refresh", "Walk Be&haviour", "&View", "OK", etc. What am I doing wrong, why do I get pointers to the main form's components and not to the "sub"-form?
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Richard MacCutchan31-Jul-20 5:49
mveRichard MacCutchan31-Jul-20 5:49 
AnswerRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w31-Jul-20 12:03
arnold_w31-Jul-20 12:03 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Gerry Schmitz31-Jul-20 13:41
mveGerry Schmitz31-Jul-20 13:41 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Richard Andrew x6431-Jul-20 17:22
professionalRichard Andrew x6431-Jul-20 17:22 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w1-Aug-20 0:09
arnold_w1-Aug-20 0:09 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w1-Aug-20 0:58
arnold_w1-Aug-20 0:58 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Richard Andrew x641-Aug-20 2:44
professionalRichard Andrew x641-Aug-20 2:44 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w1-Aug-20 2:55
arnold_w1-Aug-20 2:55 
AnswerRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Richard Andrew x641-Aug-20 2:47
professionalRichard Andrew x641-Aug-20 2:47 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w1-Aug-20 3:04
arnold_w1-Aug-20 3:04 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Richard Andrew x641-Aug-20 3:07
professionalRichard Andrew x641-Aug-20 3:07 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w1-Aug-20 3:45
arnold_w1-Aug-20 3:45 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Richard Andrew x641-Aug-20 4:24
professionalRichard Andrew x641-Aug-20 4:24 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w1-Aug-20 4:49
arnold_w1-Aug-20 4:49 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Richard Andrew x641-Aug-20 5:31
professionalRichard Andrew x641-Aug-20 5:31 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
arnold_w1-Aug-20 6:22
arnold_w1-Aug-20 6:22 
GeneralRe: How can I get handle (IntPtr) to a "sub"-form in another application? Pin
Richard Andrew x641-Aug-20 6:36
professionalRichard Andrew x641-Aug-20 6:36 

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.