hacker
New Member
Banned
Posts: 7
|
Post by hacker on May 24, 2003 4:51:14 GMT -5
ok i got Toolbar1.Buttons.Add But not sure how to use it, i wanna add stuff(sub items) to a dropdown list(its the second button on the toolbar ) thnx
|
|
Trad
New Member
Posts: 1,122
|
Post by Trad on May 25, 2003 7:43:08 GMT -5
dont you use the VB studio thing to add them? like dialoh studio for mIRC, you can add toolbar stuff.
|
|
hacker
New Member
Banned
Posts: 7
|
Post by hacker on May 25, 2003 7:44:43 GMT -5
I want to make them at runtime hence the code
|
|
|
Post by Dynamic Sysop on May 25, 2003 11:05:19 GMT -5
if you simply want to add a button to a toolbar you use this ( with the type of button being the end bit of the add line )...
With Toolbar1 .Buttons.Add , , "test", tbrDefault End With
if you want to add an item to a Pop up menu that you have appearing ( on a drop down button ) then you are going to have to use a few api calls to get the menu / subitems of the menu and then you can add extra menu items at will during runtime, here's a few of the declares you'll need for that...
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function GetMenuInfo Lib "user32.dll" (ByVal hmenu As Long, ByRef LPMENUINFO As MENUINFO) As Long Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long Private Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
|
|
hacker
New Member
Banned
Posts: 7
|
Post by hacker on May 25, 2003 11:10:39 GMT -5
ok im more confused lol I already made a drop down button on my toolbar, i just want to know how to add an item to the dropdown (Toolbar1.Buttons.Add 3, , "History", tbrDropdown)
|
|
|
Post by Dynamic Sysop on May 25, 2003 11:38:18 GMT -5
Toolbar1.Buttons(2).ButtonMenus.Add , , "new item"
the ( 2 ) in that case is the second button ( tbrDropdown )
|
|
hacker
New Member
Banned
Posts: 7
|
Post by hacker on May 25, 2003 11:39:37 GMT -5
OMG I LOVE YOU!! TY! ;D ;D ;D ;D ;D Dim i As Integer For i = 1 To 5 history = regQuery_A_Key(HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\TypedURLs", "url" & i) Toolbar1.Buttons(2).ButtonMenus.Add , , history Next i If anyone was interested in what i used lol
|
|
Trad
New Member
Posts: 1,122
|
Post by Trad on May 25, 2003 16:58:11 GMT -5
NO lol
|
|
hacker
New Member
Banned
Posts: 7
|
Post by hacker on May 26, 2003 1:55:47 GMT -5
ok then
|
|