make an in mage pop up

how to make an image pop up when you click a button

Page 1 of 1

2 Replies - 4993 Views - Last Post: 09 August 2007 - 10:24 PM Rate Topic: -----

#1 mifboy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 48
  • Joined: 25-June 07

make an in mage pop up

Posted 09 August 2007 - 01:52 PM

when you do

 label1.text = "hi" 


and when you click the button hi comes up how u do it for an image
Is This A Good Question/Topic? 0
  • +

Replies To: make an in mage pop up

#2 KeyWiz  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 8
  • View blog
  • Posts: 438
  • Joined: 26-October 06

Re: make an in mage pop up

Posted 09 August 2007 - 08:53 PM

Picture1.Picture = LoadPicture("c:\ME.bmp") ' or any legal path
Was This Post Helpful? 0
  • +
  • -

#3 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: make an in mage pop up

Posted 09 August 2007 - 10:24 PM

View PostKeyWiz, on 9 Aug, 2007 - 08:53 PM, said:

Picture1.Picture = LoadPicture("c:\ME.bmp") ' or any legal path


Except I believe he's trying to do it in the form of a message box, but those cant be customized. What you would have to do is create a separate form to act as your "popup", put a picturebox on it, load it with your picture. Then in your button click event add

'This shows the form Modal, 
'no other form can be interacted with until this one is closed.
FormName.Show VbModal



If you dont want the form Modal then do it this way

'Open the form
FormName.Show
'Set focus to the form
FormName.SetFocus



On the form thats showing your picture, be sure to add a Close button so the user can close it.

Hope this helps :)

Happy Coding!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1