Skip to content

Commit

Permalink
Remember last dir to save screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Feb 14, 2012
1 parent c986cb5 commit 8015338
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/i-nex/.settings
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ SearchComment=False
SearchString=True

[OpenFile]
Active=1
File[1]=".src/Finfosys.form"
File[2]=".src/Finfosys.class:548.10"
File[3]=".src/Global.class:127.23"
File[4]=".src/About.form"
File[5]=".src/About.class:63.30"
File[6]=".src/distrodetect.class:12.30"
File[7]=".src/battery.module:24.17"
Active=8
File[8]=".src/Disk_Drives.module:132.46"
File[9]=".src/ScreenShot.form"
File[10]=".src/ScreenShot.class:19.19"
Expand Down
10 changes: 9 additions & 1 deletion src/i-nex/.src/ScreenShot.class
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Public Sub Form_Resize()
End

Public Sub Form_Open()
If Not Exist(User.Home & "/.i-nex") Then
Mkdir User.Home & "/.i-nex"
Endif
If Exist(User.Home & "/.i-nex/lastsave") Then
ButtonBox1.Text = File.Load("" & User.Home & "/.i-nex/lastsave")
Else
ButtonBox1.Text = Desktop.Path
Endif
Me.Center
PictureBox1.Picture = ScreenShotM.pic
TextBox1.Text = Date & Time
Expand All @@ -17,7 +25,6 @@ Public Sub Form_Open()
ComboBox1.Text = ".png"
SpinBox1.Value = 70
Slider1.Value = 70
ButtonBox1.Text = Desktop.Path

End

Expand All @@ -30,6 +37,7 @@ End
Public Sub Button1_Click()

ScreenShotM.save(ButtonBox1.Text, TextBox1.Text, ComboBox1.Text, Slider1.Value)
File.Save("" & User.Home & "/.i-nex/lastsave", ButtonBox1.Text)
Me.Close
End

Expand Down
4 changes: 2 additions & 2 deletions src/i-nex/.src/ScreenShotM.module
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Public pic As Picture

Public Sub save(directory As String, filename As String, fileformat As String, filequality As Integer)

pic.Save("" & directory & "/" & filename & "" & fileformat & "", filequality)
Try pic.Save("" & directory & "/" & filename & "" & fileformat & "", filequality)

End

0 comments on commit 8015338

Please sign in to comment.