Focus help [VB.NET] [URGENT]
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts
Page 1 of 1
Hello, its me again i need help xp
Now I tried much and many codes from utube and tried to make my own it didnt work, so i need to ask,
I want if the form is focus label1.text = "Focused" if from isnt focused then it will say "NotFocused", but actually, the whole form is covered with 1 Panel so should it be about the panel? ?
Please any1 help!
Thanks loove;
Now I tried much and many codes from utube and tried to make my own it didnt work, so i need to ask,
I want if the form is focus label1.text = "Focused" if from isnt focused then it will say "NotFocused", but actually, the whole form is covered with 1 Panel so should it be about the panel? ?
Please any1 help!
Thanks loove;
Code: Select all
Private Sub Form1_Activated(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Activated
Label1.Text = "Focused"
End Sub
Private Sub Form1_Deactivated(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Deactivate
Label1.Text = "Not focused"
End Sub
Last edited by M1z23R on Sat Aug 11, 2012 3:53 pm, edited 2 times in total.
There seem to be some issues with that code. There is no Deactivated event, you should use MyBase.Deactivate instead.
Also the Activated event name is duplicated twice.
Also the Activated event name is duplicated twice.
I copy pasted same event, but i think it is the same. Sorry about that, i'll edit it.
Thanks #M1z23R , #mandai ,
im so afraid that u r helping alot guys!
im so afraid that u r helping alot guys!
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023