Results 1 to 14 of 14

Thread: Force app to foreground

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110
    I don't want it to be always on top

  2. #2
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    So when don't you want it to be on top then???
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    You don't want it to always be on top, but you want to force it to the foreground?

    I'm confused.

  4. #4
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    *Does the confused highland fling with Hack whilst waiting for a reply.......



    To front or not to front - that is the question?
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110
    I'm not sure why you are confused? Don't you think someone may want a nice feature that if you click the icon for the application, the one and only instance the developer wants available to the user, to come foreward to the foreground?

  6. #6
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    So if your app is running and the user tries to start it again, at that point you wish to bring the previous instance to the foreground.......?
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  7. #7

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110
    exactly. Right now if just says "This program is already running." and terminates

  8. #8
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    So where's that code, in the first form load or something, is it checking for App.Previnstance?

    (You do own the app don't you? - because if not it's a different approach)
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  9. #9

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110
    If App.PrevInstance Then
    MsgBox "Postit is already running.."
    End
    End If

  10. #10
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    Right - glad we got that sorted - what OS are you running the app on (makes a difference....)
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  11. #11

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110
    Um... Definately 98 & 2000 pro.. however I would like it to work across the board if that wont make the code 100X longer

  12. #12
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    it should be ok, if you have a look at www.mvps.org/vb/ and look for the forcefore.zip sample you'll see why I mentioned it, but this shouldn't hurt on NT or 95 for that matter, because you can just get the os version, and if it's the earlier ones you can just use a SetForeGroundWindow........


    hope this helps.....
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

  13. #13

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110
    awesome.... how since you are so resourceful... I want cryptology in my program as well... just something basic.. I actually already had it but it's some super complex code / module I got for basic, I havent used in 3 months and now it doesnt even run.. debugging it... uh .. no clue how... lol

    any advise?

    I dont want to spend money on these other COM's you can get, etc

  14. #14
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    no worries, you can use the Microsoft Crypto API......

    check out this sample......
    Attached Files Attached Files
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

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