Results 1 to 6 of 6

Thread: Using *

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344

    Lightbulb

    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)

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>


    '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

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344

    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)

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344

    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)

  5. #5
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516
    Code:
    If Label1.Caption Like Label2.Caption
    
    'might work
    Not sure if it's in VB3, but give it a shot.
    Courgettes.

  6. #6
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    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
  •  



Click Here to Expand Forum to Full Width