See if this helps to save and load a image, then use it as BackgroundImage of a Form.
Public Class Form1 Private myFile As String = "C:\test.txt" '// your file to save/load image path. Private myLoadedImageFile As String = "" '// used to store FullPath of image loaded. Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing IO.File.WriteAllText(myFile, myLoadedImageFile) '// Save FilePath of image. End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If IO.File.Exists(myFile) Then '// check if file containing FullPath of image exists. If IO.File.Exists(IO.File.ReadAllText(myFile)) Then '// read file and check if image exists. myLoadedImageFile = IO.File.ReadAllText(myFile) '// store image. Me.BackgroundImage = Image.FromFile(myLoadedImageFile) '// change BackgroundImage. End If End If Me.Visible = True Dim ofd As New OpenFileDialog With ofd .Title = "Select a image to use as Background..." If .ShowDialog = DialogResult.OK Then myLoadedImageFile = .FileName '// store FullPath to use for when saving. Me.BackgroundImage = Image.FromFile(.FileName) '// add image as BackgroundIMage to Form. End If End With End Sub End Class
I am developing a simple job card creator application with VB.net 2012, using Access 2010 as database.
The code I have generated to write data from a datagridview to the database table is successfully saving the data, but with an error "Parameter @name has no default value". The ...
write a C++ program which take inputs from the user/keyboard and calculate his ZAKAT.
get the input from user may include
-Amount invested in business
-Amount given to other business partners as loan
-Amount payable to others
I made a prime number finder, it finds the nearest prime that is above and below any integer (Does not work that well with giant numbers.)
Made this in cpp.sh
Why would I need the x=y+1-1;?
x=y; just doesnt seem to work
Why is this?
And I know my coding ...