点击流程布局面板中的项目?

时间:2016-05-17 14:30:05

标签: vb.net

我的流程布局面板中有一些图像要点击,然后打开图像所在的目录。我不确定如何点击它。如果我设置鼠标单击或单击该流程布局面板的事件,单击该面板将转到该目录,但我希望它在单击图像时,任何帮助表示赞赏。这是我添加和点击面板的代码:

    private sub addpic()
         .......get picture and copy it on clipboard blah blah....

         Dim img as Image
         img = Clipboard.GetImage
         Dim imageControl As New PictureBox()
         imageControl.Height = 100
         imageControl.Width = 100
         Dim myCallback As New Image.GetThumbnailImageAbort(AddressOf ThumbnailCallback)
         Dim myBitmap As New Bitmap(img)
         Dim myThumbnail As Image = myBitmap.GetThumbnailImage(96, 96, myCallback, IntPtr.Zero)
         imageControl.Image = myThumbnail

         myFlowLayoutPanel.Controls.Add(imageControl)
    end sub

    Private Sub myFlowLayoutPanel_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles myFlowLayoutPanel.MouseClick
    Dim path As String
    path = "c:\picture.jpg"
    Process.Start(path, "iexplorer.exe")
    End Sub

0 个答案:

没有答案