Ok i am making a game (based on windows95)....
i have it going good so far.
I have it so you can open notepad (this is in a panel and its not the real system notepad)
You can click save document and it saves the text it in a hidden textbox with a random filename (defined by user) and it saves it in a listveiw (windows explorer type thing)
The idea is i want it to be so that if you double click the listveiw item it will open the textfile (text stored in a hidden textbox)
Heres my code which is attempting to do this but i just can't think how to link them.
Anyone know a betterway of doing this?
Just for the record here is the code for my whole project:
i have it going good so far.
I have it so you can open notepad (this is in a panel and its not the real system notepad)
You can click save document and it saves the text it in a hidden textbox with a random filename (defined by user) and it saves it in a listveiw (windows explorer type thing)
The idea is i want it to be so that if you double click the listveiw item it will open the textfile (text stored in a hidden textbox)
Heres my code which is attempting to do this but i just can't think how to link them.
Private Sub btnsaveassave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsaveassave.Click
Dim savedfile As New TextBox
mycomputerfiles.Items.Add(txtfilename.Text & ".txt")
usersave = txtfilename.Text
Me.Controls.Add(savedfile)
txtcount = txtcount + 1
savedfile.Text = notepadtextbox.Text
savedfile.Name = (txtcount)
program2.Hide()
End Sub
Anyone know a betterway of doing this?
Just for the record here is the code for my whole project:
Public Class windows95
Dim txtcount As Integer
Dim usersave As String
Private Sub startbutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles startbutton.Click
startmenu.Show()
End Sub
Private Sub windows95_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
startmenu.Hide()
End Sub
Private Sub windows95_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
startmenu.Hide()
program.Hide()
program2.Hide()
notepad.Hide()
windowshelp.Hide()
taskbarprogram.Hide()
windowsexplorer.Hide()
notepadopenfile.Hide()
End Sub
Private Sub NotePadToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NotePadToolStripMenuItem.Click
program.Show()
programname.Text = "Notepad"
taskbarprogram.Show()
taskbarprogram.Text = "Notepad"
notepad.Show()
notepad.Dock = DockStyle.Fill
startmenu.Hide()
End Sub
Private Sub Closebutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Closebutton.Click
program.Hide()
notepad.Hide()
taskbarprogram.Hide()
windowshelp.Hide()
windowsexplorer.Hide()
programname.Text = ""
End Sub
Private Sub fullscreen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles maximize.Click
program.Dock = DockStyle.Fill
End Sub
Private Sub minimize_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles minimize.Click
program.Dock = DockStyle.None
End Sub
Private Sub HelpToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HelpToolStripMenuItem.Click
programname.Text = "Help Topics: Windows Help"
taskbarprogram.Show()
taskbarprogram.Text = "Help Topics"
program.Show()
windowshelp.Show()
windowshelp.Dock = DockStyle.Fill
startmenu.Hide()
End Sub
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
program.Hide()
notepad.Hide()
taskbarprogram.Hide()
End Sub
Private Sub SaveAsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveAsToolStripMenuItem.Click
program2.Show()
programname2.Text = "Save As"
saveas.Dock = DockStyle.Fill
End Sub
Private Sub Closebutton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Closebutton2.Click
program2.Hide()
End Sub
Private Sub btnsaveassave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsaveassave.Click
Dim savedfile As New TextBox
mycomputerfiles.Items.Add(txtfilename.Text & ".txt")
usersave = txtfilename.Text
Me.Controls.Add(savedfile)
txtcount = txtcount + 1
savedfile.Text = notepadtextbox.Text
savedfile.Name = (txtcount)
program2.Hide()
End Sub
Private Sub WindowsExplorerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WindowsExplorerToolStripMenuItem.Click
programname.Text = "Windows Explorer"
program.Show()
windowsexplorer.Show()
windowsexplorer.Dock = DockStyle.Fill
startmenu.Hide()
End Sub
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
notepadopenfile.Show()
End Sub
Private Sub btnnotepadopen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnnotepadopen.Click
notepadopenfile.Hide()
End Sub
End Class