|
-
May 14th, 2006, 11:06 AM
#1
Thread Starter
Member
[RESOLVED] 2 questions
Hello again
This time my mind want to create a picture browser
i have written this code
cdl.Filter = "Picture Files(*.Jpg,*.Gif,*.Bitmap)|*.Jpg;*.Gif;*.Bitmap"
cdl.DialogTitle = "Open File"
Form1.Picture1.Picture = (cdl.FileName)
and it is not working
what does it need ?
Let's go to the next question
when i write code like this
IF A=Tom then
MsgBox"dfsdf"
END IF
IF A= Jerry then
MsgBox"DSFdsf"
end if
when i write Jerry it doesn't working
what is the couse of the problem ?
Thanx in advance
The worst programmer ever 
-
May 14th, 2006, 11:11 AM
#2
Fanatic Member
Re: 2 questions
in your first example your missing the
cdl.open to show the dialog box
and try this for your second question
IF A=Tom then
MsgBox"dfsdf"
elseIF A= Jerry then
MsgBox"DSFdsf"
end if
now a question to you: are jerry and tom varables?
-
May 14th, 2006, 11:24 AM
#3
Thread Starter
Member
Re: 2 questions
First i forgot it but i wrote it and nothing happedn there is something to do with filename because it tells Type mismatch
For your question no i put random names
but i 'll be pleased if you answer to my question
ok ?
The worst programmer ever 
-
May 14th, 2006, 11:24 AM
#4
Fanatic Member
Re: 2 questions
If Jerry and Tom aren't variables then they require inverted commas around them, ie:
VB Code:
IF A="Tom" then
MsgBox"dfsdf"
END IF
IF A= "Jerry" then
MsgBox"DSFdsf"
end if
-
May 14th, 2006, 11:35 AM
#5
Re: 2 questions
you can also use a Select Case construct to make it easier to follow:
VB Code:
Select Case A
Case "Tom"
MsgBox "dfsdf"
Case "Jerry"
MsgBox "sdfadf"
End Select
-
May 14th, 2006, 11:35 AM
#6
Thread Starter
Member
Re: 2 questions
Danke
Thanx
Ευχάριστω
This is the only languages to tell thanx
The worst programmer ever 
-
May 14th, 2006, 11:40 AM
#7
Fanatic Member
Re: 2 questions
If your problem is solved then please click 'Thread Tools' > 'Mark Thread Resolved'
Thanks!
-
May 14th, 2006, 11:59 AM
#8
Thread Starter
Member
Re: 2 questions
the 1 question is ok the other one still remains
The worst programmer ever 
-
May 14th, 2006, 12:03 PM
#9
Re: 2 questions
you need to call .ShowOpen to show the dialog box:
VB Code:
cdl.Filter = "Picture Files(*.Jpg,*.Gif,*.Bitmap)|*.Jpg;*.Gif;*.Bitmap"
cdl.DialogTitle = "Open File"
cdl.ShowOpen
Form1.Picture1.Picture = LoadPicture(cdl.FileName)
-
May 14th, 2006, 12:53 PM
#10
Thread Starter
Member
Re: 2 questions
thanxs
i am going to set it to solved now
The worst programmer ever 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|