The code below will find the local IP address and not the public IP if you are behind a router.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
TextBox1.Text = GetIpAddressLinq.ToString()
'TextBox1.Text = GetIpAddress.ToString()
I suggest staying away from the registry, but there's no reason to use stream reader/writers as the .NET framework has a very nice Settings feature built-in. Here's a short article about the Settings: Easily Save and Retrieve Application and User Settings in VB.NET or C# Apps | DonDraper.com
Create a form.
Toss a DateTimePicker control on it and name that LastMenstrualDatePicker.
Toss a Label control on the form and name it DueDateLabel.
Double click the DateTimePicker, the IDE will create an event handler for the ValueChanged event.
Change the code to this:
First, we don't know the value of TextBox1.Text; but that doesn't really matter here. You are comparing a string (the Text property of a TextBox is of type String) to an integer (the value 1 or 2, without quotes surrounding it), they will never be equal.
I always suggest turning Option Strict...
I believe the reason JohnH suggested XML is not because it would result in a smaller file but because it will be much simpler to work with (once you learn how, of course). There are features built in to the .NET Framework that make dealing with XML very simple. There are no built in features...
http://www.bobpowell.net is a great site for learning GDI+.
The problem you are having is explained and solved in this article: The accursed PictureBox
From the documentation of the Control.CreateGraphics Method (System.Windows.Forms) :
I downloaded the project and here is the only really relevant code: