{"id":1106,"date":"2008-05-20T18:22:56","date_gmt":"2008-05-20T18:22:56","guid":{"rendered":"https:\/\/kweaver.org\/cs\/vbnet-2005-and\/"},"modified":"2008-05-20T18:22:56","modified_gmt":"2008-05-20T18:22:56","slug":"vbnet-2005-and","status":"publish","type":"post","link":"https:\/\/kweaver.org\/cs\/vbnet-2005-and\/","title":{"rendered":"VB.Net (2005) and using the Registry"},"content":{"rendered":"<p style=\"margin-top: 0; margin-bottom: 0\">One of the decision I made on my program was to use the registry to store my data.&#160; Everyone else does and we are talking 4 small values.&#160; Using the registry with Visual Basic is not hard, just calls. <\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">Here&#8217;s how I retrieve the registry settings:<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160; <\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">Me.txtTDD.Text = GetSetting(&quot;InfusionSetHelper&quot;, &quot;Settings&quot;, &quot;TDD&quot;, &quot;&quot;)<br \/>\nMe.txtDays.Text = GetSetting(&quot;InfusionSetHelper&quot;, &quot;Settings&quot;, &quot;Days&quot;, &quot;&quot;)<br \/>\nMe.txtTotal.Text = GetSetting(&quot;InfusionSetHelper&quot;, &quot;Settings&quot;, &quot;Total&quot;, &quot;&quot;)<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">And here&#8217;s an example of setting them:<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\"> SaveSetting(&quot;InfusionSetHelper&quot;, &quot;Settings&quot;, &quot;Days&quot;, strDays) \n<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">Deleting  a setting:<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\"> DeleteSetting(&quot;InfusionSetHelper&quot;, &quot;Settings&quot;, &quot;TDD&quot;) <\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">&#160;<\/p>\n<p style=\"margin-top: 0; margin-bottom: 0;\">While this works and does a nice job, the documentation at <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/cy6azwf7(VS.80).aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/cy6azwf7(VS.80).aspx<\/a> says to do it another way, and that way is more compatible with Windows Mobile.&#160; I may change this code. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the decision I made on my program was to use the registry to store my data.&#160; Everyone else does and we are talking 4 small values.&#160; Using the registry with Visual Basic is not hard, just calls. &#160; Here&#8217;s how I retrieve the registry settings: &#160; Me.txtTDD.Text = GetSetting(&quot;InfusionSetHelper&quot;, &quot;Settings&quot;, &quot;TDD&quot;, &quot;&quot;) Me.txtDays.Text [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1106","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts\/1106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/comments?post=1106"}],"version-history":[{"count":0,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/posts\/1106\/revisions"}],"wp:attachment":[{"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/media?parent=1106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/categories?post=1106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kweaver.org\/cs\/wp-json\/wp\/v2\/tags?post=1106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}