{"id":3749,"date":"2019-03-25T17:45:47","date_gmt":"2019-03-25T20:45:47","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/employing-getscreen-and-showscreen-methods\/"},"modified":"2019-05-29T10:21:09","modified_gmt":"2019-05-29T13:21:09","slug":"employing-getscreen-and-showscreen-methods","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/","title":{"rendered":"Employing GetScreen and ShowScreen methods."},"content":{"rendered":"<div align=\"justify\">\n<p><b>Question:<\/b><\/p>\n<p>How can I use the Viewer&#8217;s <i>GetScreen <\/i>and the Frame&#8217;s <i>ShowScreen <\/i>methods? What are they for?<\/p>\n<p><b>Solution:<\/b><\/p>\n<p>The <i>GetScreen(ScreenName)<\/i> method returns a Screen object, whose name must be set up at <i>ScreenName <\/i>parameter. This method&#8217;s return value can be used at the Frame&#8217;s <i>ShowScreen <\/i>method.<\/p>\n<p>The <i>ShowScreen(Screen, Zoom, Scrollbars[, Arg])<\/i> method loads a screen at the Frame, closing any screen or frame previously loaded on it. The <i>Screen <\/i>parameter only accepts objects returned by the Viewer&#8217;s <i>GetScreen <\/i>method, and will fail if a screen object returned by another method or property is used.<\/p>\n<p>To illustrate these methods&#8217; usefulness, imagine a situation where you need to open a screen and run a few scripts. Before these methods were developed, you needed a script to open the screen, and in this screen you needed another script (usually on <i>OnPreShow <\/i>event) to access its child objects.<\/p>\n<p>The problem with this approach came when, for example, you needed to create libraries that depended on this script in the application, and which didn&#8217;t allow developing a library that could reduce coupling issues. With <i>GetScreen <\/i>and <i>ShowScreen <\/i>methods, you can open the screen via scripts, and before the screen opens, you can retrieve the Screen object and access its desired child objects.<\/p>\n<p>The attached demo application illustrates how to use an indexed windowed screen, which attributes the path of the XObject linked to the XControl directly to the script in the object&#8217;s Click event, requiring no sending\/receiving of the parameter on <i>OnPreShow <\/i>event.<\/p>\n<p>Script employed in this example:<\/p>\n<div align=\"left\"><span style=\"font-family: Courier New;\"><span style=\"color: #0000ff;\">Sub <\/span>Picture1_Click()<\/p>\n<p>Arg = XCMotor.Source.PathName<br \/>\n<span style=\"color: #0000ff;\">Set <\/span>newScreen = Application.GetFrame(<span style=\"color: #ff0000;\">&#8220;virtualFrame&#8221;<\/span>)<br \/>\nnewScreen.MoveFrame , , 250, 300<br \/>\nnewScreen.SetFrameOptions XCMotor.Source.Name, 15+64+256+2048<\/p>\n<p><span style=\"color: #0000ff;\">Set <\/span>screenObj = Application.GetScreen(<span style=\"color: #ff0000;\">&#8220;CommandScreen&#8221;<\/span>)<br \/>\nnewScreen.ShowScreen screenObj, 100, 0<br \/>\nscreenObj.Item(<span style=\"color: #ff0000;\">&#8220;IndexedScreen1&#8221;<\/span>).Source = Arg<\/p>\n<p><span style=\"color: #0000ff;\">End Sub<\/span><\/span><\/div>\n<p><b>NOTE<\/b>: The attached demo application was developed with Elipse E3 version 4.8 239.<\/p>\n<p>&nbsp;<\/p>\n<h3>Attachments:<\/h3>\n<p><a href=\"\/wp-content\/uploads\/2019\/03\/Sample-8-1.zip\">Sample.zip<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Question: How can I use the Viewer&#8217;s GetScreen and the Frame&#8217;s ShowScreen methods? What are they for? Solution: The GetScreen(ScreenName) method returns a Screen object, whose name must be set&hellip;<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[746,767],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Employing GetScreen and ShowScreen methods. - Elipse Knowledgebase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Employing GetScreen and ShowScreen methods.\" \/>\n<meta property=\"og:description\" content=\"Question: How can I use the Viewer&#8217;s GetScreen and the Frame&#8217;s ShowScreen methods? What are they for? Solution: The GetScreen(ScreenName) method returns a Screen object, whose name must be set&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:45:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-29T13:21:09+00:00\" \/>\n<meta name=\"author\" content=\"D\u00e9lio Damin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"D\u00e9lio Damin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/\"},\"author\":{\"name\":\"D\u00e9lio Damin\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778\"},\"headline\":\"Employing GetScreen and ShowScreen methods.\",\"datePublished\":\"2019-03-25T20:45:47+00:00\",\"dateModified\":\"2019-05-29T13:21:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/\"},\"wordCount\":312,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"Frames\",\"Viewer\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/\",\"name\":\"[:pt]Employing GetScreen and ShowScreen methods.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:45:47+00:00\",\"dateModified\":\"2019-05-29T13:21:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Employing GetScreen and ShowScreen methods.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778\",\"name\":\"D\u00e9lio Damin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g\",\"caption\":\"D\u00e9lio Damin\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/delio\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Employing GetScreen and ShowScreen methods. - Elipse Knowledgebase","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]Employing GetScreen and ShowScreen methods.[:] - Elipse Knowledgebase","og_description":"Question: How can I use the Viewer&#8217;s GetScreen and the Frame&#8217;s ShowScreen methods? What are they for? Solution: The GetScreen(ScreenName) method returns a Screen object, whose name must be set&hellip;","og_url":"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:45:47+00:00","article_modified_time":"2019-05-29T13:21:09+00:00","author":"D\u00e9lio Damin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"D\u00e9lio Damin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/"},"author":{"name":"D\u00e9lio Damin","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778"},"headline":"Employing GetScreen and ShowScreen methods.","datePublished":"2019-03-25T20:45:47+00:00","dateModified":"2019-05-29T13:21:09+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/"},"wordCount":312,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["Frames","Viewer"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/","url":"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/","name":"[:pt]Employing GetScreen and ShowScreen methods.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:45:47+00:00","dateModified":"2019-05-29T13:21:09+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/employing-getscreen-and-showscreen-methods\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"Employing GetScreen and ShowScreen methods."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778","name":"D\u00e9lio Damin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g","caption":"D\u00e9lio Damin"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/delio\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3749"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=3749"}],"version-history":[{"count":1,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3749\/revisions"}],"predecessor-version":[{"id":5132,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3749\/revisions\/5132"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=3749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=3749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=3749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}