Click here to Skip to main content
16,005,826 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralNeed sample code for developing ftp client using Infragistics controls Pin
Member 159330515-Dec-04 19:02
Member 159330515-Dec-04 19:02 
GeneralRe: Need sample code for developing ftp client using Infragistics controls Pin
Dave Kreskowiak16-Dec-04 3:20
mveDave Kreskowiak16-Dec-04 3:20 
GeneralAbout Windows media player Pin
santosh jaiswal 200415-Dec-04 18:16
santosh jaiswal 200415-Dec-04 18:16 
GeneralRe: About Windows media player Pin
Dave Kreskowiak16-Dec-04 3:14
mveDave Kreskowiak16-Dec-04 3:14 
GeneralApplication Crash at Err Raise when Type Mismatch occured Pin
shinay15-Dec-04 12:33
shinay15-Dec-04 12:33 
GeneralRe: Application Crash at Err Raise when Type Mismatch occured Pin
Tom John16-Dec-04 1:51
Tom John16-Dec-04 1:51 
GeneralRe: Application Crash at Err Raise when Type Mismatch occured Pin
Dave Kreskowiak16-Dec-04 3:00
mveDave Kreskowiak16-Dec-04 3:00 
GeneralPopupMenu BMPs... Pin
TAlvord15-Dec-04 10:47
TAlvord15-Dec-04 10:47 
How do you add BMPs to a PopupMenu? I tried doing the same thing you do for standard menus and this does not work. Any ideas?

[code]
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Private Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Private Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal hBitmapUnchecked As Long, ByVal hBitmapChecked As Long) As Long
Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
Private Declare Function GetMenuItemInfo Lib "user32" Alias "GetMenuItemInfoA" (ByVal hMenu As Long, ByVal un As Long, ByVal b As Boolean, IpMenuItemInfo As MENUITEMINFO) As Boolean

Private Type MENUITEMINFO
cbSize As Long
fMask As Long
fState As Long
wID As Long
hSubMenu As Long
hbmpChecked As Long
hbmpUnchecked As Long
dwItemData As Long
dwTypeData As String
cch As Long
End Type

Private Const MIIM_ID = &H2
Private Const MIIM_TYPE = &H10
Private Const MFT_STRING = &H0&
Private Const MF_BITMAP = &H0&


Dim hMenu As Long, hSubMenu As Long, hID As Long

'Get the Menuhandle of the form
hMenu = GetMenu(frmMain.hwnd)

'Get the handle of the PopupMenu submenu
hSubMenu = GetSubMenu(hMenu, 0)

hID = GetMenuItemID(hSubMenu, 0)
SetMenuItemBitmaps hMenu, hID, MF_BITMAP, imgMenuItem(0).Picture, imgMenuItem(0).Picture
hID = GetMenuItemID(hSubMenu, 1)
SetMenuItemBitmaps hMenu, hID, MF_BITMAP, imgMenuItem(0).Picture, imgMenuItem(0).Picture
hID = GetMenuItemID(hSubMenu, 2)
SetMenuItemBitmaps hMenu, hID, MF_BITMAP, imgMenuItem(1).Picture, imgMenuItem(1).Picture
[/code]

Thanks,
Tim
GeneralRe: PopupMenu BMPs... Pin
Tom John15-Dec-04 22:40
Tom John15-Dec-04 22:40 
GeneralSwitching beteween forms in vb.net Pin
Ryan Coleman15-Dec-04 10:34
Ryan Coleman15-Dec-04 10:34 
GeneralRe: Switching beteween forms in vb.net Pin
Mekong River15-Dec-04 11:10
Mekong River15-Dec-04 11:10 
GeneralRe: Switching beteween forms in vb.net Pin
Zenly15-Dec-04 11:24
Zenly15-Dec-04 11:24 
GeneralRe: Switching beteween forms in vb.net Pin
Ryan Coleman15-Dec-04 13:23
Ryan Coleman15-Dec-04 13:23 
GeneralTest a connection to SQL Server Pin
marclenoir200515-Dec-04 10:18
marclenoir200515-Dec-04 10:18 
GeneralRe: Test a connection to SQL Server Pin
jonathan1517-Dec-04 2:56
jonathan1517-Dec-04 2:56 
GeneralInternal Domain Email Issues Pin
CitizenSoldier15-Dec-04 9:35
CitizenSoldier15-Dec-04 9:35 
GeneralFiles Closed but Not Really -- Database Error 16040 Pin
aubndez15-Dec-04 5:23
aubndez15-Dec-04 5:23 
GeneralForm creation crisis!!! Pin
carlos_rocha15-Dec-04 4:33
carlos_rocha15-Dec-04 4:33 
GeneralRe: Form creation crisis!!! Pin
Dennis C. Dietrich15-Dec-04 4:49
Dennis C. Dietrich15-Dec-04 4:49 
GeneralRe: Form creation crisis!!! Pin
carlos_rocha15-Dec-04 5:18
carlos_rocha15-Dec-04 5:18 
GeneralRe: Form creation crisis!!! Pin
Dennis C. Dietrich15-Dec-04 5:51
Dennis C. Dietrich15-Dec-04 5:51 
GeneralRe: Form creation crisis!!! Pin
carlos_rocha15-Dec-04 6:14
carlos_rocha15-Dec-04 6:14 
GeneralRe: Form creation crisis!!! Pin
Dennis C. Dietrich15-Dec-04 6:35
Dennis C. Dietrich15-Dec-04 6:35 
GeneralRe: Form creation crisis!!! Pin
carlos_rocha15-Dec-04 6:43
carlos_rocha15-Dec-04 6:43 
GeneralRe: Form creation crisis!!! Pin
carlos_rocha15-Dec-04 22:11
carlos_rocha15-Dec-04 22:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.