{"id":1172,"date":"2009-02-26T01:11:58","date_gmt":"2009-02-26T09:11:58","guid":{"rendered":"http:\/\/www.sapien.com\/blog\/?p=1172"},"modified":"2009-02-26T14:35:19","modified_gmt":"2009-02-26T22:35:19","slug":"primalforms-file-dialog-hangs-on-windows-vista-sp1-with-net-30-35","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2009\/02\/26\/primalforms-file-dialog-hangs-on-windows-vista-sp1-with-net-30-35\/","title":{"rendered":"PrimalForms &#8211; File Dialog Hangs on Windows Vista SP1 with .Net 3.0 \/3.5"},"content":{"rendered":"<p>Some of our PrimalForms users may have encountered issues with the OpenFileDialog or SaveFileDialog running under Windows Vista.<\/p>\n<p>The bad news is that scripts which include OpenFileDialogs or SaveFileDialogs and that previously worked on Windows XP may encounter freezing issues on Vista SP1 systems with .Net 3.0\/3.5. The affected scripts will hang when PowerShell executes the File Dialog\u2019s ShowDialog function. It&#8217;s important to note that this issue is not limited to PowerShell but may affect any other .Net application.<\/p>\n<p>The good news is that there is a work-around for this issue. In order to prevent this problem, you must set the dialog\u2019s ShowHelp property to $True before calling the ShowDialog function. If you are using SaveFileDialog you will also want to set the CreatePrompt and OverwritePrompt properties to $True as well.<\/p>\n<p>$saveFileDialog1 = New-Object System.Windows.Forms.SaveFileDialog<\/p>\n<p>$saveFileDialog1.ShowHelp = $True<\/p>\n<p>$saveFileDialog1.OverwritePrompt = $True<\/p>\n<p>$saveFileDialog1.CreatePrompt = $True<br \/>\n$saveFileDIalog1.ShowDialog() #It is now safe to call this function<\/p>\n<p>The next version of PrimalForms will set these property values to $True by default; therefore you needn\u2019t worry about setting these properties manually. In addition to solving this issue, the next version of PrimalForms will also prevent the maximized form issue by including a scripted workaround.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some of our PrimalForms users may have encountered issues with the OpenFileDialog or SaveFileDialog running under Windows Vista. The bad news is that scripts which include OpenFileDialogs or SaveFileDialogs and that previously worked on Windows XP may encounter freezing issues on Vista SP1 systems with .Net 3.0\/3.5. The affected scripts will hang when PowerShell executes [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[310,311,21,25],"tags":[28,314,1003],"class_list":["post-1172","post","type-post","status-publish","format-standard","hentry","category-free-tools","category-primaltools","category-software-news","category-windows-powershell","tag-powershell","tag-primalforms","tag-primaltools"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/1172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=1172"}],"version-history":[{"count":1,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/1172\/revisions"}],"predecessor-version":[{"id":1182,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/1172\/revisions\/1182"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=1172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=1172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=1172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}