PDA

Click to See Complete Forum and Search --> : 2 Simple Questions


absalom
Sep 1st, 2000, 04:05 PM
How Do you get the kewl menu that IE has the one where it is a menu but beside of that there is that animation second question:
How do you change another programs caption say if I had calculator open I could change the caption of it to say like Adding machine

Sep 1st, 2000, 04:13 PM
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long

Private Sub Command1_Click()
Dim hCalc As Long
'find Calculator's hWnd
hCalc = FindWindow("SciCalc", vbNullString)
'use SetWindowText to set the caption
Call SetWindowText(hCalc, "Adding Machine")
End Sub

absalom
Sep 1st, 2000, 04:57 PM
No one has answered my first question yet come on I 'm sure one of ya's knows

Sep 1st, 2000, 05:29 PM
IE uses a ToolBar for it's menu.

absalom
Sep 2nd, 2000, 03:02 PM
Then How do they get the video and menu on the toolbar

Sep 2nd, 2000, 04:02 PM
The video is not on the ToolBar, rather it's beside it. For this you can use a simple Animation Control.

absalom
Sep 2nd, 2000, 05:00 PM
Yes but how do you get the menu in the toolbar

parksie
Sep 2nd, 2000, 05:12 PM
IE uses a Rebar control for it's toolbars, which allows it to use menus in that way. It's way too complex for me to understand so I won't try and explain. V(ery) had some groovy code to do stuff like that, though.

hitcgar
Sep 6th, 2000, 01:14 PM
You could use the toolbar ButtonMenus to do this very easily as it's part of the standard functionality.


Private Sub Form_Load()
Dim i As Integer
Dim btn As Button

' Add five Button objects to the Toolbar control.
For i = 1 To 5
Set btn = tb1.Buttons.Add(Caption:="button " & i, Style:=tbrDropdown)
' Add two ButtonMenu objects to each Button.
btn.ButtonMenus.Add Text:="Help"
btn.ButtonMenus.Add Text:="Options"
Next i
End Sub


Beyond that I would suggest checking the MSDN site http://search.microsoft.com/us/dev/default.asp for the
original toolbar control http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/vbasic/vbcon98/vbconnegotiatingmenutoolbarappearance.htm
and see if it doesn't have more functionality than what's avail. in VB. :cool:

hitcgar
Sep 6th, 2000, 01:21 PM
You could use the toolbar ButtonMenus to do this very easily as it's part of the standard functionality.


Private Sub Form_Load()
Dim i As Integer
Dim btn As Button

' Add five Button objects to the Toolbar control.
For i = 1 To 5
Set btn = tb1.Buttons.Add(Caption:="button " & i, Style:=tbrDropdown)
' Add two ButtonMenu objects to each Button.
btn.ButtonMenus.Add Text:="Help"
btn.ButtonMenus.Add Text:="Options"
Next i
End Sub


Beyond that I would suggest checking the MSDN site http://search.microsoft.com/us/dev/default.asp for the
original toolbar control http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/vbasic/vbcon98/vbconnegotiatingmenutoolbarappearance.htm

:cool:

hitcgar
Sep 6th, 2000, 01:34 PM
You could use the toolbar ButtonMenus to do this very easily as it's part of the standard functionality.


Private Sub Form_Load()
Dim i As Integer
Dim btn As Button

' Add five Button objects to the Toolbar control.
For i = 1 To 5
Set btn = tb1.Buttons.Add(Caption:="button " & i, Style:=tbrDropdown)
' Add two ButtonMenu objects to each Button.
btn.ButtonMenus.Add Text:="Help"
btn.ButtonMenus.Add Text:="Options"
Next i
End Sub


Beyond that I would suggest checking the MSDN site http://search.microsoft.com/us/dev/default.asp for the
original toolbar control http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/vbasic/vbcon98/vbconnegotiatingmenutoolbarappearance.htm

:cool:

hitcgar
Sep 6th, 2000, 01:45 PM
You could use the toolbar ButtonMenus to do this very easily as it's part of the standard functionality.


Private Sub Form_Load()
Dim i As Integer
Dim btn As Button

' Add five Button objects to the Toolbar control.
For i = 1 To 5
Set btn = tb1.Buttons.Add(Caption:="button " & i, Style:=tbrDropdown)
' Add two ButtonMenu objects to each Button.
btn.ButtonMenus.Add Text:="Help"
btn.ButtonMenus.Add Text:="Options"
Next i
End Sub


Beyond that I would suggest checking the MSDN site http://search.microsoft.com/us/dev/default.asp for the
original toolbar control http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/vbasic/vbcon98/vbconnegotiatingmenutoolbarappearance.htm

:cool:

hitcgar
Sep 6th, 2000, 02:00 PM
You could use the toolbar ButtonMenus to do this very easily as it's part of the standard functionality.


Private Sub Form_Load()
Dim i As Integer
Dim btn As Button

' Add five Button objects to the Toolbar control.
For i = 1 To 5
Set btn = tb1.Buttons.Add(Caption:="button " & i, Style:=tbrDropdown)
' Add two ButtonMenu objects to each Button.
btn.ButtonMenus.Add Text:="Help"
btn.ButtonMenus.Add Text:="Options"
Next i
End Sub


Beyond that I would suggest checking the MSDN site http://search.microsoft.com/us/dev/default.asp for the
original toolbar control http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/vbasic/vbcon98/vbconnegotiatingmenutoolbarappearance.htm

:cool:

parksie
Sep 6th, 2000, 02:17 PM
Yes...we get the point!!!!

:D

V(ery) Basic
Sep 6th, 2000, 02:26 PM
All four of them in fact ;)



Originally posted by parksie
IE uses a Rebar control for it's toolbars, which allows it to use menus in that way. It's way too complex for me to understand so I won't try and explain. V(ery) had some groovy code to do stuff like that, though.

Thanks. Cash or cheque? Or an all-expenses paid with Alyssa?

PS (so that ppl don't call this post useless) I can post you some code. Any code. It's like the IE thing with Kick-ass menus. You can modify the code a little to make space for a little animation control in d corner.

parksie
Sep 6th, 2000, 02:28 PM
Cash or cheque? Or an all-expenses paid with Alyssa?

Hmmm...who's Alyssa? Blonde or brunette?

PS: Anti-useless post thingie: Could you send me that?

hitcgar
Sep 7th, 2000, 08:03 AM
Sorry guys. I remember only posting that thing ONCE!
Search me why it showed up thrice??:eek: