Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using "Tip of the day"

Status
Not open for further replies.

wijenjoh

Programmer
May 21, 2001
8
NL
Hello All,

We want to use the "Tip of the day" form. We open it by using code:
frmTip.Show
in our startup form. It works fine until the user disables the "Show tips at startup"-checkbox. After closing and restarting the program it gives the following error:
Run-time error '364':
Object was unloaded
Has anyone a solution for this.

In fact, we want to edit this "Tip of the day" form as a disclaimer and to tell the users something important. So what we really need is only the "Do not show this form anymore" checkbox and the code that will save whether or not this form should be displayed at startup. But we cannot find anything about this option. Please help us making a form that can be shown at startup until the user decides different.
Many thanx in advance.

Sujesh, Bart, John
 
Hi,

Perhaps you could consider the use of an ini-file or an xml-file to save options like these in. On start-up you read the options from the ini-file or the xml-file and take actions accordingly.

Good luck!

Jordi Reineman
 
Hey wijenjoh,

I have a slight similar problem 2 yours with the same sun-time error, but a slightly different scenario.

If U resolved your problem, I'd B happy if U could help me out.

Please write me at jjcool@bezeqint.net, & I'll describe my scenario 2 U.

Thanks alot,
J.
 

Judai,

Once again please start your own thread.


wijenjoh,

This is really easy if you consider using the savesetting and getsetting functions. Here is an Example for you...

Put this code in the form load of your main form

[tt]

Dim ShowTips As String

Me.Show

ShowTips = GetSetting(App.EXEName, "StartUp", "ShowTips", "Yes")

If UCase(ShowTips) = "YES" Then
formTips.Show
End If


[/tt]

and put this code in your ok button for form tips

[tt]
Option Explicit

Private Sub Command1_Click()

If Check1.Value = vbChecked Then
SaveSetting App.EXEName, "StartUp", "ShowTips", "NO"
Else
SaveSetting App.EXEName, "StartUp", "ShowTips", "YES"
End If
Unload Me

End Sub

[/tt]

So this will take care of your do I show the form or not part. Then you will have to over ride this functionality based upon if there is a message to display or not.

I hope this helps good luck


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top