how to use label to stay some time on form and unload itself
how to use label to stay some time on form and unload itself
Have you tried Seenu's code here?
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.
Using the code you used to solve the problem in the above thread.
vb Code:
Option Explicit Dim cnt As Integer Private Sub Form_Load() Label2.Visible = False Picture2.Height = Picture1.Height Picture2.BackColor = vbBlue Picture2.Width = 0 tm.Enabled = True tm.Interval = 1 End Sub Private Sub tm_Timer() cnt = cnt + 1 Label1.Caption = (cnt) & " % " If cnt > 100 Then Label2.Visible = True tm.Enabled = False Else Picture2.Width = (cnt / 100) * Picture1.Width End If End Sub
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.
you are wright ..Nightwalker83 .. but i want the label should be display only once when ist time form is load .. and when in next time of form loading label should be loaded
at ist instance of form load label is displayed and unloaded
and in 2nd instance of form load label should not be displayed,,
Not sure if this is what you want?
vb Code:
Option Explicit Dim cnt As Integer Private Sub Command1_Click() Unload Me Form2.Show End Sub Private Sub Form_Initialize() tm.Enabled = True tm.Interval = 1 End Sub Private Sub Form_Load() Label2.Visible = False Picture2.Height = Picture1.Height Picture2.BackColor = vbBlue Picture2.Width = 0 End Sub Private Sub tm_Timer() cnt = cnt + 1 Label1.Caption = (cnt) & " % " If cnt > 100 Then Label2.Visible = True tm.Enabled = False cnt = 0 Else Picture2.Width = (cnt / 100) * Picture1.Width End If End Sub
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.
thanks but i do not want to put any count system in label .. it is simple label which only should load when form is loaded and unload after few seconds .. and when in 2nd instance again form is loaded the label should not be loaded.. something like SaveSetting and GetSetting
Modify the code I have given you to make it work with the code weeluke gave you here.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.
Yes, but that code weeluke gave you can be modified to do what you want.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
Please consider giving me some rep points if I help you a lot.
DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
Please rate my post if you find it helpful!
Technology is a dangerous thing in the hands of an idiot! I am that idiot.
@Janu, can u attach the project herewith with some clear info abt the requirement?
Seenu
If this post is useful, pls don't forget to Rate this post.
Pls mark thread as resolved once ur problem solved.
ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms
sorry ! sample is here
i did not fully understand your request very good but this is what i thought might help
@janu, try this
Code:Private Sub Form_Load() Form1.Show Label1.Visible = False On Error Resume Next SaveSetting "hh", "StartupForm", "TimesRun", GetSetting("hh", "StartupForm", "TimesRun", 0) + 1 Timesrun = GetSetting("hh", "StartupForm", "TimesRun") ProUpdate = GetSetting("hh", "StartupForm", "ProductUpdate") If ProUpdate <> "Loaded" Then productupdate.Show vbModal Label1.Visible = True End If If booCheck = False Then popup.Label1.Caption = "You have used this Programme - " & Timesrun & " Times" popup.Show booCheck = True Else 'dont do anything End If End Sub
Seenu
If this post is useful, pls don't forget to Rate this post.
Pls mark thread as resolved once ur problem solved.
ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms
here is what else you could be asking
Sorry, but I don't get what your question. Janu, could you please explain a bit more about what you are trying to accomplish ?
![]()
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...