SIMPLE Questions Thread!

Posts 3145 of 82 · Page 3 of 6
Quote Originally Posted by MugNuf View Post
How do you get the position of your mouse and something on the form? So if your mouse is on it, it changes the image, and when its off of it, it changes back.

I have this so far, but when you take your mouse off, it doesn't do anything.
Code:
    Private Sub PictureBox6_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox6.MouseHover
        If MousePosition = PictureBox6.MousePosition Then
            PictureBox6.Image = NextGenMTs.My.Resources.Minimize
        Else
            PictureBox6.Image = Nothing
        End If
    End Sub
Brinuz is right...there are two events for handling this. 1 is when you take your mouse over the picturebox and second is when you leave your mouse from the pbox.

Here's the code for what you are trying to do:

[php]Private Sub PictureBox6_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseHover
PictureBox6.Image = NextGenMTs.My.Resources.Minimize
End Sub

Private Sub PictureBox6_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseLeave
PictureBox6.Image = Nothing
End Sub[/php]

Hope this helps !!
Quote Originally Posted by Hassan View Post
Brinuz is right...there are two events for handling this. 1 is when you take your mouse over the picturebox and second is when you leave your mouse from the pbox.

Here's the code for what you are trying to do:

[php]Private Sub PictureBox6_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseHover
PictureBox6.Image = NextGenMTs.My.Resources.Minimize
End Sub

Private Sub PictureBox6_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseLeave
PictureBox6.Image = Nothing
End Sub[/php]

Hope this helps !!
You did exactly what i did, like an hour ago. I already got it done, but thanks for the help dude!
Quote Originally Posted by MugNuf View Post
You did exactly what i did, like an hour ago. I already got it done, but thanks for the help dude!
Glad to see that problem is solved. But when you post a prob and its solved, edit it and write "Problem Solved" ... !!!
Quote Originally Posted by Hassan View Post
Glad to see that problem is solved. But when you post a prob and its solved, edit it and write "Problem Solved" ... !!!
Looky here, i learned two things from this thread after all .
Quote Originally Posted by Hassan View Post
Glad to see that problem is solved. But when you post a prob and its solved, edit it and write "Problem Solved" ... !!!
No, leave it so that people asking the same question can search for it
How would i go about making a form load in visual basic (2008), and make TextBox1 & 2 Transparent?

I googled it, but all i could find was shit for Vb05/06.
Quote Originally Posted by MugNuf View Post
How would i go about making a form load in visual basic (2008), and make TextBox1 & 2 Transparent?

I googled it, but all i could find was shit for Vb05/06.
what you mean with that? transparent and be able to write at it? or just hide them? if you want to hide them just do:

Code:
tbXXX.hide()
or go on proprieties Visible = False

or do you want them to like they are not there but be able to write at it?
Change its border style to None. and change its background color to form color, or w/e.

or you do actually want to make it's background transparent?
Quote Originally Posted by 'Bruno View Post
what you mean with that? transparent and be able to write at it? or just hide them? if you want to hide them just do:

Code:
tbXXX.hide()
or go on proprieties Visible = False

or do you want them to like they are not there but be able to write at it?
Change its border style to None. and change its background color to form color, or w/e.

or you do actually want to make it's background transparent?
That one. Its a custom background image for the form, so changing the border style to none and the color wont work.
Quote Originally Posted by MugNuf View Post
That one. Its a custom background image for the form, so changing the border style to none and the color wont work.
Transparent textboxes would look funny. There's no simple way to do it as far as I know, if users have to input data that is. If the textbox is only functioning as a display (i.e your code assigns the text, not the user) you could always use a label, change the border and set backcolor to transparent and AutoSize to false.

Somehow I think this didn't help you too much, as you probs already know you can do that with a label, but oh well.
Quote Originally Posted by MugNuf View Post
That one. Its a custom background image for the form, so changing the border style to none and the color wont work.
well form what i know you cant do it that simple... or you cant even do it like J-Deezy said. well, it not that logical to have a textbox if you cant see it ( how can you click on something to write, without seeing it? ).
There is ways to do that, like getting keys pressed by your keyboard and write them on a label or so.
Quote Originally Posted by new_user View Post
wew._.
need help!
theres an error on debugging

can you guys help?
Save the project and click build. Than try and debug it.
I know its over a week old, but a new thread for a simple question is lame xd.

Anyway, i can't figure out how i can go through a listbox, and it SendKeys everything in the listbox one by one.

So, it starts with the first Item, and works its way down to the last, then repeats.
Quote Originally Posted by MugNuf View Post
I know its over a week old, but a new thread for a simple question is lame xd.

Anyway, i can't figure out how i can go through a listbox, and it SendKeys everything in the listbox one by one.

So, it starts with the first Item, and works its way down to the last, then repeats.
Code:
For each N as string in Listbox1.Items

SendKeys.Send(N)
'This line is optional, it waits for 1 second before sending the next item. Remove if needed !!
System.Threading.Thread.Sleep(1000)

Next
How can I get the value of dropdown boxes and change the value again? I want the value of Form2.ComboBox1 to change Form2.ComboBox2 to one of the settings. These are the non-editable Drop Down Boxes. Please & Thank you
Quote Originally Posted by mwb1234 View Post
How can I get the value of dropdown boxes and change the value again? I want the value of Form2.ComboBox1 to change Form2.ComboBox2 to one of the settings. These are the non-editable Drop Down Boxes. Please & Thank you
Could you elaborate a bit?
Posts 3145 of 82 · Page 3 of 6
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?