Steven Low
Active member
- Joined
- Apr 14, 2005
- Messages
- 42
- Programming Experience
- 1-3
Hi guys
I wanna basically load word, pdf and powerpoint document onto a label or picture box. To view.
I am having problems with this. Heres what I have done soo far
I wanna basically load word, pdf and powerpoint document onto a label or picture box. To view.
I am having problems with this. Heres what I have done soo far
VB.NET:
[COLOR=blue][FONT='Courier New']Private[/FONT][/COLOR][FONT='Courier New'] [COLOR=blue]Sub[/COLOR] butload_Click([COLOR=blue]ByVal[/COLOR] sender [COLOR=blue]As[/COLOR] System.Object, [COLOR=blue]ByVal[/COLOR] e [COLOR=blue]As[/COLOR] System.EventArgs) [COLOR=blue]Handles[/COLOR] load.Click[/FONT]
[FONT='Courier New'] [COLOR=blue]Dim[/COLOR] OpenFile [COLOR=blue]As[/COLOR] [COLOR=blue]New[/COLOR] OpenFileDialog()[/FONT]
[FONT='Courier New'] [/FONT]
[FONT='Courier New'] [/FONT]
[FONT='Courier New'] [COLOR=green]' Configure the dialog [/COLOR][/FONT]
[FONT='Courier New'] [COLOR=blue]With[/COLOR] OpenFile[/FONT]
[FONT='Courier New'] .InitialDirectory = "G:\"[/FONT]
[FONT='Courier New'] .Filter = "Word Files (*.doc)|*.doc*"[/FONT]
[FONT='Courier New'] .CheckFileExists = [COLOR=blue]True[/COLOR][/FONT]
[FONT='Courier New'] [COLOR=green]' Open the dialog [/COLOR][/FONT]
[FONT='Courier New'] [COLOR=blue]If[/COLOR] .ShowDialog = DialogResult.OK [COLOR=blue]Then[/COLOR][/FONT]
[FONT='Courier New'] [/FONT]
[FONT='Courier New'] PictureBox1.Show()[/FONT]
[FONT='Courier New'] [/FONT]
[FONT='Courier New'] [COLOR=blue]End[/COLOR] [COLOR=blue]If[/COLOR][/FONT]
[COLOR=blue][FONT='Courier New'] [/FONT][/COLOR]
[FONT='Courier New'] [COLOR=blue]End[/COLOR] [COLOR=blue]With[/COLOR][/FONT]
[FONT='Courier New'] [COLOR=blue]End[/COLOR] [COLOR=blue]Sub[/COLOR][/FONT]