[SOLVED] Question about Common Dialog
Hey Guys
I have question about common dialog ,
I use one as open file dialog to open pictures ,
the thing is the pictures sometimes be big in size and take time to be drawn to the picturebox (may be in some cases 3-5 seconds) , so , is there any chance that I can make the dialog box disappear while it open the picture selected , not waiting for opening the pic then disappear????
Re: Question about Common Dialog
It's always a good idea to show your actual code but since you did not try the following:
Code:
Private Sub Command1_Click()
Dim strFileName As String
On Error GoTo ErrHandler
With CommonDialog1
.Filter = "Pictures (*.bmp;*.jpg;*.gif)|*.bmp;*.jpg;*.gif"
.Flags = cdlOFNExplorer
.CancelError = True
.ShowOpen
strFileName = .FileName 'assign file name to a variable
End With
DoEvents 'pass control to os
Picture1.Picture = LoadPicture(strFileName) 'finally load your image file
Exit Sub
ErrHandler:
Err.Clear
End Sub
Re: Question about Common Dialog
thanks RhinoBull for helping , my code was the same as yours but without DoEvents :)
cheers
Re: [SOLVED] Question about Common Dialog
How I can show common dialog ( commondialog1.showfont for Example) in center of screen ?