{"id":905,"date":"2022-12-08T08:04:39","date_gmt":"2022-12-08T07:04:39","guid":{"rendered":"http:\/\/lesmrdtrucs.mataf35400.fr\/?page_id=905"},"modified":"2022-12-08T08:06:53","modified_gmt":"2022-12-08T07:06:53","slug":"trouver-lappli-qui-a-le-focus","status":"publish","type":"page","link":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/trouver-lappli-qui-a-le-focus\/","title":{"rendered":"Trouver l&rsquo;appli qui a le focus\u200b"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"905\" class=\"elementor elementor-905\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3ccc9f6a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3ccc9f6a\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-168abcda\" data-id=\"168abcda\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6bdfee78 elementor-widget elementor-widget-text-editor\" data-id=\"6bdfee78\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Dans les d\u00e9clarations du module:<br \/><span style=\"color: #339966;\"><em>&lsquo;&#8212;&#8212;&#8212;&#8212;&#8212;D\u00e9termination de l&rsquo;appli qui a le focus. Sert \u00e0 ne pas donner le focus intempestivement<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>Global App_hwnd As Long<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>Global App_Title As String<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>Public Declare Function GetWindowText Lib \u00ab\u00a0user32.dll\u00a0\u00bb Alias \u00ab\u00a0GetWindowTextA\u00a0\u00bb (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>Public Declare Function GetWindowTextLength Lib \u00ab\u00a0user32\u00a0\u00bb Alias \u00ab\u00a0GetWindowTextLengthA\u00a0\u00bb (ByVal hwnd As Long) As Long<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>Public Declare Function GetForegroundWindow Lib \u00ab\u00a0user32.dll\u00a0\u00bb () As Long<\/em><\/span><br \/><br \/>La fonction qui va bien:<br \/><span style=\"color: #0000ff;\"><em>Function RecupereAppliFocus() As String<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Dim MonEntree As String, MaPoignee As Long, MonTexte As String<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Dim hWndlength As Long, hWndTitle As String, returnvalue As Long\u00a0\u00a0 \u00a0<\/em><\/span><br \/><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0MaPoignee = GetForegroundWindow<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0hWndlength = 255\u00a0\u00a0 \u00a0&lsquo;GetWindowTextLength(MaPoignee)<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0hWndTitle = String$(hWndlength, 0)<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0returnvalue = GetWindowText(MaPoignee, hWndTitle, (hWndlength + 1))<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0RecupereAppliFocus = Replace(hWndTitle, Chr(0), \u00ab\u00a0\u00a0\u00bb)<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>End Function<\/em><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Dans les d\u00e9clarations du module:&lsquo;&#8212;&#8212;&#8212;&#8212;&#8212;D\u00e9termination de l&rsquo;appli qui a le focus. Sert \u00e0 ne pas donner le focus intempestivementGlobal App_hwnd As LongGlobal App_Title As StringPublic Declare Function GetWindowText Lib \u00ab\u00a0user32.dll\u00a0\u00bb Alias \u00ab\u00a0GetWindowTextA\u00a0\u00bb (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As LongPublic Declare Function GetWindowTextLength Lib \u00ab\u00a0user32\u00a0\u00bb Alias \u00ab\u00a0GetWindowTextLengthA\u00a0\u00bb (ByVal hwnd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","footnotes":""},"class_list":["post-905","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages\/905","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/comments?post=905"}],"version-history":[{"count":4,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages\/905\/revisions"}],"predecessor-version":[{"id":912,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages\/905\/revisions\/912"}],"wp:attachment":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/media?parent=905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}