|
-
Jul 31st, 2000, 10:33 AM
#1
Thread Starter
Hyperactive Member
In dos or most searching applications you can use the wild card * to give you better results if you wasnt sure of the full name of file. Such as.
*Car*.*
*Car*.exe
*car.exe
car*.exe
Car.*
*.*
Well i wan't to do something like that in visual basics....Ok I got 2 labels.
Label1.caption
label2.caption
label1.caption changes every second
label2.caption is a set time
since using intervals is never accurate hehe, I can't rely on my code unless I use a wild card.
So lets say the set time in label2 is
Label2.caption = "12:15:00 PM"
well i got a timer checking to see if label1 ever 1000 intervals........but i want it to check like a wile for example
"12:15*PM" Do ya get me? No matter what is in between the 15 and pm, (seconds)it reads it as the 12:15:00 PM....
HOPE THAT MADE SENSE! If you can help let me know.
-RaY
VB .Net 2010 (Ultimate)
-
Jul 31st, 2000, 10:39 AM
#2
_______
<?>
'do you mean ignore them
Dim currtime
currtime = Format(Now, "HH:MM AMPM")
MsgBox currtime
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jul 31st, 2000, 10:41 AM
#3
Thread Starter
Hyperactive Member
Nope
Ignore them is not what im trying to say. It has to match the 12:15: but doesnt care about the 00 and then cares about the PM....... so lets say if the file was car12.exe and 12 is the part we dont care about, we would say, car*.exe....got me?
-RaY
VB .Net 2010 (Ultimate)
-
Jul 31st, 2000, 10:44 AM
#4
Thread Starter
Hyperactive Member
Little example
label1.caption = "12:15:00 PM"
label2.caption = "12:15* PM"
if label1.caption = label2.caption then
msgbox "I know this code doesn't work but this is the direction im getting at"
end if
-RaY
VB .Net 2010 (Ultimate)
-
Jul 31st, 2000, 10:52 AM
#5
Fanatic Member
Code:
If Label1.Caption Like Label2.Caption
'might work
Not sure if it's in VB3, but give it a shot.
-
Jul 31st, 2000, 10:58 AM
#6
_______
<?>
Code:
If Left(lblCaption1,5) = "12:15" _
And Right(llbCaption1,2) = "PM" Then
'bla bla
else
'la tee da
End If
[Edited by HeSaidJoe on 07-31-2000 at 12:12 PM]
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
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
|