English 中文(简体)
照片Box1_Click和不同的形象
原标题:PictureBox1_Click and different image

...... 我试图使一个正常的纽托邦尽可能减少和撤出...... 我想有三种不同的情况,例如纽顿有:

(1) 开放式窗口从1.png开出

(2) 当你变换时,它显示出走:2.png

3) 当你停用时,它再次显示标准出勤率。

4) 当你报到时(浮点);显示出走3.png =>这种情况一概知道如何在视觉基本面解决。 感谢你提供帮助。

我的法典:

Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
    Me.WindowState = FormWindowState.Minimized
    PictureBox1.Image = My.Resources.exit_3
End Sub

Public Sub PictureBox1_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseHover
    PictureBox1.Image = My.Resources.exit_2
End Sub

Public Sub PictureBox1_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseLeave
    PictureBox1.Image = My.Resources.exit_1
End Sub

在点击后,照相机3没有显示。 影像从2头开始,从1头开始,正在做罚款。

问题回答

clickhandler改为mousedownmouseup 用于打捞图像

Private Sub PictureBox1_MouseDown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseDown
    PictureBox1.Image = My.Resources.exit_3
End Sub

Private Sub PictureBox1_MouseUp(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseUp
    PictureBox1.Image = My.Resources.exit_2
End Sub

代码手稿

Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
    Me.WindowState = FormWindowState.Minimized
End Sub

MouseLeave是在Click事件之后发射的,当时该表格被减少到最低限度。 图像将贴出Click手勒的_3,然后立即返回休假手里的1人。 这里是确定这一方法的一种方式:

Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
    Me.WindowState = FormWindowState.Minimized
End Sub

Public Sub PictureBox1_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseHover
    PictureBox1.Image = My.Resources.exit_2
End Sub

Public Sub PictureBox1_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseLeave
    if Me.WindowState = FormWindowState.Minimized then
        PictureBox1.Image = My.Resources.exit_1
    else
        PictureBox1.Image = My.Resources.exit_3
    end if
End Sub




相关问题
Bring window to foreground after Mutex fails

I was wondering if someone can tell me what would be the best way to bring my application to the foreground if a mutex was not able to be created for a new instance. E.g.: Application X is running ...

How to start WinForm app minimized to tray?

I ve successfully created an app that minimizes to the tray using a NotifyIcon. When the form is manually closed it is successfully hidden from the desktop, taskbar, and alt-tab. The problem occurs ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

Handle DataTable.DataRow cell change event

I have a DataTable that has several DataColumns and DataRow. Now i would like to handle an event when cell of this DataRow is changed. How to do this in c#?

Apparent Memory Leak in DataGridView

How do you force a DataGridView to release its reference to a bound DataSet? We have a rather large dataset being displayed in a DataGridView and noticed that resources were not being freed after the ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

WPF-XAML window in Winforms Application

I have a Winforms application coded in VS C# 2008 and want to insert a WPF window into the window pane of Winforms application. Could you explain me how this is done.

热门标签