Results 1 to 16 of 16

Thread: Show tooltips text directly when caps lock is on

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    187

    Re: Show tooltips text directly when caps lock is on

    Quote Originally Posted by zeezee
    Hey, even if the project doesnt work, when I create and EXe from it , the EXe works. You can remove the referrence to tha manifest file int VBP file, then load the project. It s not needed for the project to work (it seems.)
    I have attached the changed project file also.
    Thing is, you can make the exe in many names like test1.exe, test2.exe, etc ...
    But you have to have the manifest file in the same name as the exe.
    like test1.exe.manifest, test2.exe.manifest, ...
    Change the given manifest file's name according to the exe you create. It should work. It works for this project.

    Another thing, please refer to this Article also. It says how to get this in the VB6 IDE. download the manifest file for VB6 and copy it to the folder where VB6.exe is located.In my machine its in "C:\Program Files\Microsoft Visual Studio\VB98" folder. then it works in the project also. its a cool stuff. I should add it to my project also.




    PS : Since I didnt want his in all y project, I did something to have two vb6 IDE's. I renamed manifest file as VB2.exe.manifest and made a copy of vb6.exe as vb62.exe.

    So I have two IDEs, one with normal VB6 Look and Feel and aone with XP Style look and feel.

    Cheers.
    hi zeezee,

    u attached only the project file, how bout the forms

  2. #2
    Frenzied Member
    Join Date
    Jul 2007
    Posts
    1,306

    Re: Show tooltips text directly when caps lock is on

    Quote Originally Posted by ashly
    hi zeezee,

    u attached only the project file, how bout the forms

    , this is the project file for the demo in that article. You got that demo right ???
    get the demo, extract it, replace this project file with the one in there. then it should work.
    Or
    Open the .VBP file with Notepad, then remove the line that says "Related Documents" (i think its the 4th or 5th) line.

    Make sure you register that dll file SSubTmr.dll. I ll upload the project with the changed project file andd the Dll is also in that file.there is a bat file , run it and it will register the dll.
    But I suggest that you copy this DLL to system32 directory and open it with regsvr32.exe (its in system32 too) if you are goin to use this for your project.

    for the IDE, the manifest is in the VB6_IDE_Manifest.zip

    Cheers
    Attached Files Attached Files
    Last edited by zeezee; Aug 6th, 2007 at 12:16 AM. Reason: add the attachement

  3. #3
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: Show tooltips text directly when caps lock is on

    Here's another program (that doesn't require an API call) that will turn Tool Tips On & Off by toggling the Caps Lock key. This program beats my first posting all to hell, as that code could be tricked and did not know if Caps Lock was on or off at start up. This one seems to work flawlessly and knows if the Caps Lock is on or off, at all times, including at start up! Please pardon my excessive remming as, I'm a novice and 61+ years old, and need as much remming as possible.

    The program requires two text boxes. All design time properties are default

    Have fun.
    CDRIVE

    Code:
    'This program demonstrates the use of the SendKeys Statement to test the state of the
    'Caps Lock key. The value returned from Text2 is used to turn Text1 Tool Tips on and
    'off by toggling the Caps Lock key. The Form1 Load event also tests the status of the
    'Caps Lock key immediately upon program start up.
    
    Private Sub Form_Load()
       Form1.Caption = "If Caps Lock On Then Tool Tips On!"
       Show
       Form1.KeyPreview = True
       Text1 = ""
       Text2 = ""
       Text2.SetFocus
       SendKeys "a"           'Send a lower case 'a' to Text2 to test for CapsLock
    End Sub                   'status at startup.
    
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
       Print " A KeyDown Event accured!"  'Used for testing only
       If KeyCode = vbKeyCapital Then
       Text2.Visible = True               'Reset visible property so Text2 can SetFocus
       Text2.SetFocus
       Text2 = ""                           'Clear Text2 on each Caps Lock press
       SendKeys "a"                         'Put a lower case 'a' in Text2 to be tested
    '   Else                                'by the KeyUp event.
    '   If KeyCode <> vbKeyCapital Then  'This 'Else If' block was only required prior
    '   Text1.SetFocus                   'to adding the Text2.Visible property to the
    '   End If                           'the program. Text1 automatically receives the
       End If                            'focus when Text2.Visible = False.
    End Sub
    
    Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
       Print " A KeyUp Event accured!"                'Used for testing only
       Text2.Visible = False
       If Text2 = Chr(65) Then                        'If Text2 returns an upper case 'a'
       Text1.ToolTipText = "Tool Tips Are On!"        '(Chr(65))then turn Tool Tips ON.
       ElseIf Text2 = Chr(97) Then                    'If Text2 returns a lower case 'a'
       Text1.ToolTipText = ""                         '(Chr(97))then turn Tool Tips OFF.
       End If
    End Sub
    Last edited by CDRIVE; Mar 7th, 2010 at 03:53 PM.

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