You can use SaveSetting()
@Jx_Man : can you show me an example code? please..
@Debasisdas : i already open the link that you provide to me, but that for visual studio 2005. is this compatible with vb6?
Yes it is.
please try this sample.
SaveSetting Your_Application_name.EXE, "textboxes", "text1", text1.Text or SaveSetting(App.EXEName, "Textboxes\frmMain", "Text1", frmMain.Text1.Text)
code in debasisdas link is for vb2005 but SaveSetting have same way to use in vb6.
there are sample code too in debasisdas link.
See if this help :
' Save form settings Function SaveFormSettings(ByVal AppName As String, frm As Object) SaveSetting AppName, frm.Name, "Left", frm.Left SaveSetting AppName, frm.Name, "Top", frm.Top SaveSetting AppName, frm.Name, "Width", frm.Width SaveSetting AppName, frm.Name, "Height", frm.Height SaveSetting AppName, frm.Name, "WindowState", frm.WindowState End Function ' Restore form settings. Function LoadFormSettings(ByVal AppName As String, frm As Object) Dim currWindowState As Integer ' in case no value is in the registry On Error Resume Next ' If the form is currently maximized or minimized, temporarily ' revert to normal state, otherwise the Move command fails. currWindowState = frm.WindowState If currWindowState <> 0 Then frm.WindowState = 0 ' Use a Move method to avoid multiple Resize and Paint events. frm.Move GetSetting(AppName, frm.Name, "Left", frm.Left), _ GetSetting(AppName, frm.Name, "Top", frm.Top), GetSetting(AppName, _ frm.Name, "Width", frm.Width), GetSetting(AppName, frm.Name, "Height", _ frm.Height) frm.WindowState = GetSetting(AppName, frm.Name, "WindowState", _ currWindowState) End Function ' Delete form settings Sub DeleteFormSettings(ByVal AppName As String, frm As Object) DeleteSetting AppName, frm.name End Sub Using these routines is straightforward: Private Sub Form_Load() LoadFormSettings "MyApp", Me End Sub Private Sub Form_Unload(Cancel As Integer) SaveFormSettings "MyApp", Me End Sub
Thanks jx_man and debasisdas..
You are really great guys..
I am wondering if there would be any chance that someone could help me out with this, I am trying to teach myself c++ which i find it really interesting and I came accross this and would love to see how it works so i could do it and learn ...
I have two tables, I will call them first-half and second-half (of the year)
Table: first id jan feb mar apr ----------------------- 2 80 90 70 60 3 50 40 60 30 Table: second id jan feb mar apr ----------------------- 2 50 70 60 90 3 80 60 50 ...
from turtle import * import random def allTriMedian (w=300): speed (0) vertices =  point = turtle.Point(x,y) for i in range (3): x = random.randint(0,300) y = random.randint(0,300) vertices.append(trutle.Point(x,y)) point = turtle.Point(x,y) triangle = turtle.Polygon(vertices) a = triangle.side() b = triangle.side() c = triangle.side() m1 = tirangle.median m2 = triangle.median ...