Thanks,
Ed
"gustavo gutierrez morales" wrote:
> Hi, i am trying to use the smartmenuxp.ocx:
> http://www.visual-basic.com.ar/vbsmart/library/smartmenuxp/smartmenuxp.htm
>
> in a vb application running under vista, but it locks the application when i
> select any menu option. I really like to use this control, because it lets
> me to add pictures to the options. Has anybody used succesffully this
> control in vista?
>
> Thanks,
>
> --
> Gustavo Gutierrez Morales
> SICORI, SA DE CV
> calle rio bravo norte 3
> col. rafael avila camacho
> San Pedro Cholula, Pue. cp 72765
> Tel (222)-2850544
> cel. (222)-4361610
>
>
>
I am having the same problem with my vb6 application using smartmenuxp.ocx.
Could you tell me if you have found a solution yet?
Thanks,
Ed
>Hi Gustavo,
>
>I am having the same problem with my vb6 application using smartmenuxp.ocx.
>
>Could you tell me if you have found a solution yet?
Solution to what?
--
Jan Hyde
Smartmenuxp.ocx does NOT run in my vb6 program on Vista computers.
I had to completely remove the ocx and go to traditional menus.
I had a different control that would put rounded corners on my screens, but
that control would not work with regular menus, so I went with smartmenuxp.
However, when running my app on Vista, the smartmenuxp menus do not work.
So, my solution was to removed the control that put the rounded corners and
smartmenuxp and just go with traditional menus provided in vb6.
Thanks,
Ed
I can't figure out what the difference is between these 2 operating systems
that causes it to work on the Business edition but not the Home edition.
I just get the feeling that something like UAC needs to be turned off on the
Home edition to make it work, but I don't know what.
Any ideas? I hate to have to resort to straight vb menus.
Thanks,
Ed
I had the same problem with Home Edition. I resorted to the standard menus
because I could not find a solution.
Bummer.
Marv
<ed barsano> escribió en el mensaje news:200872922...@exmsft.com...
Hi, Ed,
the malfunction of that control in Windows Vista is caused by the Windows API function 'GetPixel' (used within its internal procedure 'DrawMenuShadow') when the desktop composition is enabled. The control works perfectly when desktop composition is disabled:
Take a loot at:
· Desktop Window Manager:
http://msdn.microsoft.com/en-us/library/aa969540.aspx
Fortunately, the control has a '.Shadow' property, so the easiest solution for all projects wich are using this control is to set this property to False at either design-time or run-time to prevent the control to calculate and show de menu shadow.
A better solution, if you want to use the menu shadow when were posible, is to query the desktop composition state and determine whether you "can" show the menu shadow, or you "shouldn't". You can get this state using the function 'DwmIsCompositionEnabled' http://msdn.microsoft.com/en-us/library/aa969518.aspx (note that 'dwmapi.dll' does not exists in previous versions of Windows), so you can have a function as follows:
'*********************
Private Declare Function DwmIsCompositionEnabled Lib "dwmapi.dll" (pfEnabled As Long) As Long
Public Function IsCompositionDisabled() As Boolean
Dim pfEnabled As Long
Dim hResult As Long
' If you have a correct declaration, the only relevant error would be 'hResult',
' so, ignore any error not related to the function, for instance a 'File not found':
On Error Resume Next
hResult = DwmIsCompositionEnabled(pfEnabled)
If hResult <> 0 Then
' An error ocurred in DwmIsCompositionEnabled
' (Doc says that) hResult contains an error code
Debug.Print hResult
End If
IsCompositionDisabled = CBool(pfEnabled) = False
On Error GoTo 0
End Function
'*********************
Notice that if 'hResult' was <> 0, the function returns "IsDisabled=True", but actually is 'indeterminate'.
Now in your 'Form_Load' event you can set an appropiate value for the '.Shadow' property, for example:
SmartMenuXP1.Shadow = IsCompositionDisabled
But, take into account that if the user, an application, or the system, changes the desktop composition setting while your application is running, you will need to subclass at least one top-level window of your application, waiting for a WM_DWMCOMPOSITIONCHANGED notification. The system sends this message to all top-level windows when the setting changes.
You can declare this constant as:
Private Const WM_DWMCOMPOSITIONCHANGED As Long = &H31E
And have a callback function like:
'----------------------
Private Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long
Select Case uMsg
Case WM_DWMCOMPOSITIONCHANGED
' The desktop composition setting has changed
SetAllYourSmartMenuXPMenus.Shadow = IsCompositionDisabled
Case WM_DESTROY
UnSubclassYourWindow
'...etc
'...etc
'----------------------
For more information read the related functions from the documentation.
--
Regards
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
( ! ) Preceding answers in Google:
http://groups.google.com/group/microsoft.public.vb.vista.compatibility
( i ) Temperance in the forum:
http://www.microsoft.com/communities/conduct/default.mspx
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Vinchenzo vinç" <Vinç@newsgroup.nospam> escribió en el mensaje
news:OUPSU0U...@TK2MSFTNGP06.phx.gbl...
http:// pandazen.wordpress.com/2009/11/11/vbsmart-menu-xp-in-windows-vista
gustavo gutierrez morales wrote:
Re: smartmenuxp and vista
01-Sep-08
Vinchenzo:
A esta aportaci?n me refer?a cuando hablaba de traducirla. lamentablemente
mi ingl?s no es tan bueno como el tuyo.
!Felicidades!
"Vinchenzo vin?" <Vin?@newsgroup.nospam> escribi? en el mensaje
news:OUPSU0U...@TK2MSFTNGP06.phx.gbl...
"ed barsano" escribi? en el mensaje de noticias
news:200872922...@exmsft.com...
Hi, Ed,
the malfunction of that control in Windows Vista is caused by the
Windows API function 'GetPixel' (used within its internal procedure
'DrawMenuShadow') when the desktop composition is enabled. The control works
perfectly when desktop composition is disabled:
Take a loot at:
? Desktop Window Manager:
http://msdn.microsoft.com/en-us/library/aa969540.aspx
SmartMenuXP1.Shadow = IsCompositionDisabled
Previous Posts In This Thread:
On Thursday, May 29, 2008 8:11 AM
gustavo gutierrez morales wrote:
smartmenuxp in vista
Hi, i am trying to use the smartmenuxp.ocx:
http://www.visual-basic.com.ar/vbsmart/library/smartmenuxp/smartmenuxp.htm
in a vb application running under vista, but it locks the application when i
select any menu option. I really like to use this control, because it lets
me to add pictures to the options. Has anybody used succesffully this
control in vista?
Thanks,
--
Gustavo Gutierrez Morales
SICORI, SA DE CV
calle rio bravo norte 3
col. rafael avila camacho
San Pedro Cholula, Pue. cp 72765
Tel (222)-2850544
cel. (222)-4361610
On Tuesday, July 29, 2008 4:00 PM
MasterTrade wrote:
I was wondering if you found a solution for this.
I was wondering if you found a solution for this.
I am having the same problem on my Vista computers.
Thanks,
Ed
"gustavo gutierrez morales" wrote:
On Tuesday, July 29, 2008 10:31 PM
ed barsano wrote:
smartmenuxp and vista
Hi Gustavo,
I am having the same problem with my vb6 application using smartmenuxp.ocx.
Could you tell me if you have found a solution yet?
Thanks,
Ed
On Wednesday, July 30, 2008 4:01 AM
Jan Hyde (VB MVP) wrote:
Re: smartmenuxp and vista
ed barsano's wild thoughts were released on Tue, 29 Jul 2008
19:31:29 -0700 bearing the following fruit:
Solution to what?
--
Jan Hyde
https://mvp.support.microsoft.com/profile/Jan.Hyde
On Wednesday, July 30, 2008 9:45 AM
MasterTrade wrote:
Jan,Smartmenuxp.ocx does NOT run in my vb6 program on Vista computers.
Jan,
Smartmenuxp.ocx does NOT run in my vb6 program on Vista computers.
I had to completely remove the ocx and go to traditional menus.
I had a different control that would put rounded corners on my screens, but
that control would not work with regular menus, so I went with smartmenuxp.
However, when running my app on Vista, the smartmenuxp menus do not work.
So, my solution was to removed the control that put the rounded corners and
smartmenuxp and just go with traditional menus provided in vb6.
Thanks,
Ed
"Jan Hyde (VB MVP)" wrote:
On Sunday, August 03, 2008 11:35 PM
MasterTrade wrote:
During testing this week, I discovered that the menus with smartmenuxp work
During testing this week, I discovered that the menus with smartmenuxp work
with Vista BUSINESS, but NOT with Vista HOME edition.
I can't figure out what the difference is between these 2 operating systems
that causes it to work on the Business edition but not the Home edition.
I just get the feeling that something like UAC needs to be turned off on the
Home edition to make it work, but I don't know what.
Any ideas? I hate to have to resort to straight vb menus.
Thanks,
Ed
"MasterTrader" wrote:
On Friday, August 08, 2008 4:42 PM
Marv wrote:
Re: smartmenuxp and vista
I had the same problem with Home Edition. I resorted to the standard menus
because I could not find a solution.
Bummer.
Marv
On Friday, August 22, 2008 10:42 AM
gustavo gutierrez morales wrote:
i tried changing the screen theme from "windows Vista" to "Windows Classic".
i tried changing the screen theme from "windows Vista" to "Windows Classic".
And it works fine!
Of course, this is not the best solution. Someone gives a complete solution
in another group. It is in spanish. Let me translate it and i'll post it
here.
regards,
<ed barsano> escribi? en el mensaje news:200872922...@exmsft.com...
On Thursday, August 28, 2008 4:31 PM
Vin wrote:
"ed barsano" escribi=F3 en el mensaje de noticias
"ed barsano" escribi=F3 en el mensaje de noticias =
news:200872922...@exmsft.com...
smartmenuxp.ocx.
Hi, Ed,
the malfunction of that control in Windows Vista is caused by the =
Windows API function 'GetPixel' (used within its internal procedure =
'DrawMenuShadow') when the desktop composition is enabled. The control =
works perfectly when desktop composition is disabled:
Take a loot at:
=B7 Desktop Window Manager:
http://msdn.microsoft.com/en-us/library/aa969540.aspx=20
Fortunately, the control has a '.Shadow' property, so the easiest =
solution for all projects wich are using this control is to set this =
property to False at either design-time or run-time to prevent the =
control to calculate and show de menu shadow.
A better solution, if you want to use the menu shadow when were =
posible, is to query the desktop composition state and determine whether =
you "can" show the menu shadow, or you "shouldn't". You can get this =
state using the function 'DwmIsCompositionEnabled' =
http://msdn.microsoft.com/en-us/library/aa969518.aspx (note that =
'dwmapi.dll' does not exists in previous versions of Windows), so you =
can have a function as follows:
'*********************
Private Declare Function DwmIsCompositionEnabled Lib "dwmapi.dll" =
(pfEnabled As Long) As Long
Public Function IsCompositionDisabled() As Boolean
Dim pfEnabled As Long
Dim hResult As Long
=20
' If you have a correct declaration, the only relevant error would =
be 'hResult',
' so, ignore any error not related to the function, for instance a =
'File not found':
On Error Resume Next
hResult =3D DwmIsCompositionEnabled(pfEnabled)
If hResult <> 0 Then
' An error ocurred in DwmIsCompositionEnabled
' (Doc says that) hResult contains an error code
Debug.Print hResult
End If
IsCompositionDisabled =3D CBool(pfEnabled) =3D False
On Error GoTo 0
End Function
'*********************
Notice that if 'hResult' was <> 0, the function returns =
"IsDisabled=3DTrue", but actually is 'indeterminate'.
Now in your 'Form_Load' event you can set an appropiate value for =
the '.Shadow' property, for example:
SmartMenuXP1.Shadow =3D IsCompositionDisabled
But, take into account that if the user, an application, or the =
system, changes the desktop composition setting while your application =
is running, you will need to subclass at least one top-level window of =
your application, waiting for a WM_DWMCOMPOSITIONCHANGED notification. =
The system sends this message to all top-level windows when the setting =
changes.
You can declare this constant as:
Private Const WM_DWMCOMPOSITIONCHANGED As Long =3D &H31E
And have a callback function like:
'----------------------
Private Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) =
As Long
=20
Select Case uMsg
Case WM_DWMCOMPOSITIONCHANGED
' The desktop composition setting has changed
SetAllYourSmartMenuXPMenus.Shadow =3D IsCompositionDisabled
Case WM_DESTROY
UnSubclassYourWindow
'...etc
'...etc
'----------------------
For more information read the related functions from the =
documentation.
--=20
Regards=20
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -=20
( ! ) Preceding answers in Google:=20
=
http://groups.google.com/group/microsoft.public.vb.vista.compatibility=20
( i ) Temperance in the forum:=20
http://www.microsoft.com/communities/conduct/default.mspx=20
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
On Monday, September 01, 2008 6:27 PM
gustavo gutierrez morales wrote:
Re: smartmenuxp and vista
Vinchenzo:
A esta aportaci?n me refer?a cuando hablaba de traducirla. lamentablemente
mi ingl?s no es tan bueno como el tuyo.
!Felicidades!
"Vinchenzo vin?" <Vin?@newsgroup.nospam> escribi? en el mensaje
news:OUPSU0U...@TK2MSFTNGP06.phx.gbl...
"ed barsano" escribi? en el mensaje de noticias
news:200872922...@exmsft.com...
Hi, Ed,
the malfunction of that control in Windows Vista is caused by the
Windows API function 'GetPixel' (used within its internal procedure
'DrawMenuShadow') when the desktop composition is enabled. The control works
perfectly when desktop composition is disabled:
Take a loot at:
? Desktop Window Manager:
http://msdn.microsoft.com/en-us/library/aa969540.aspx
SmartMenuXP1.Shadow = IsCompositionDisabled
EggHeadCafe - Software Developer Portal of Choice
Silverlight 2 Beta 2 - Doing Data Part V: Realtime StockQuotes / Scrolling Display
http://www.eggheadcafe.com/tutorials/aspnet/576c2f4c-7131-4664-853f-49825833c8db/silverlight-2-beta-2--do.aspx
gustavo gutierrez morales wrote:
Re: smartmenuxp and vista
01-Sep-08
Vinchenzo:
A esta aportaci?n me refer?a cuando hablaba de traducirla. lamentablemente
mi ingl?s no es tan bueno como el tuyo.
!Felicidades!
"Vinchenzo vin?" <Vin?@newsgroup.nospam> escribi? en el mensaje
news:OUPSU0U...@TK2MSFTNGP06.phx.gbl...
"ed barsano" escribi? en el mensaje de noticias
news:200872922...@exmsft.com...
Hi, Ed,
the malfunction of that control in Windows Vista is caused by the
Windows API function 'GetPixel' (used within its internal procedure
'DrawMenuShadow') when the desktop composition is enabled. The control works
perfectly when desktop composition is disabled:
Take a loot at:
? Desktop Window Manager:
http://msdn.microsoft.com/en-us/library/aa969540.aspx
SmartMenuXP1.Shadow = IsCompositionDisabled
Previous Posts In This Thread:
Thanks,
Thanks,
Ed
"gustavo gutierrez morales" wrote:
smartmenuxp and vista
Hi Gustavo,
I am having the same problem with my vb6 application using smartmenuxp.ocx.
Could you tell me if you have found a solution yet?
Thanks,
Ed
https://mvp.support.microsoft.com/profile/Jan.Hyde
Thanks,
Ed
Thanks,
Ed
"MasterTrader" wrote:
Marv
"ed barsano" escribi=F3 en el mensaje de noticias
"ed barsano" escribi=F3 en el mensaje de noticias =
news:200872922...@exmsft.com...
smartmenuxp.ocx.
Hi, Ed,
the malfunction of that control in Windows Vista is caused by the =
Windows API function 'GetPixel' (used within its internal procedure =
'DrawMenuShadow') when the desktop composition is enabled. The control =
works perfectly when desktop composition is disabled:
Take a loot at:
=B7 Desktop Window Manager:
http://msdn.microsoft.com/en-us/library/aa969540.aspx=20
Fortunately, the control has a '.Shadow' property, so the easiest =
solution for all projects wich are using this control is to set this =
property to False at either design-time or run-time to prevent the =
control to calculate and show de menu shadow.
A better solution, if you want to use the menu shadow when were =
posible, is to query the desktop composition state and determine whether =
you "can" show the menu shadow, or you "shouldn't". You can get this =
state using the function 'DwmIsCompositionEnabled' =
http://msdn.microsoft.com/en-us/library/aa969518.aspx (note that =
'dwmapi.dll' does not exists in previous versions of Windows), so you =
can have a function as follows:
'*********************
Private Declare Function DwmIsCompositionEnabled Lib "dwmapi.dll" =
(pfEnabled As Long) As Long
Public Function IsCompositionDisabled() As Boolean
Dim pfEnabled As Long
Dim hResult As Long
=20
' If you have a correct declaration, the only relevant error would =
be 'hResult',
' so, ignore any error not related to the function, for instance a =
'File not found':
On Error Resume Next
hResult =3D DwmIsCompositionEnabled(pfEnabled)
If hResult <> 0 Then
' An error ocurred in DwmIsCompositionEnabled
' (Doc says that) hResult contains an error code
Debug.Print hResult
End If
IsCompositionDisabled =3D CBool(pfEnabled) =3D False
On Error GoTo 0
End Function
'*********************
Notice that if 'hResult' was <> 0, the function returns =
"IsDisabled=3DTrue", but actually is 'indeterminate'.
Now in your 'Form_Load' event you can set an appropiate value for =
the '.Shadow' property, for example:
SmartMenuXP1.Shadow =3D IsCompositionDisabled
But, take into account that if the user, an application, or the =
system, changes the desktop composition setting while your application =
is running, you will need to subclass at least one top-level window of =
your application, waiting for a WM_DWMCOMPOSITIONCHANGED notification. =
The system sends this message to all top-level windows when the setting =
changes.
You can declare this constant as:
Private Const WM_DWMCOMPOSITIONCHANGED As Long =3D &H31E
And have a callback function like:
'----------------------
Private Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) =
As Long
=20
Select Case uMsg
Case WM_DWMCOMPOSITIONCHANGED
' The desktop composition setting has changed
SetAllYourSmartMenuXPMenus.Shadow =3D IsCompositionDisabled
Case WM_DESTROY
UnSubclassYourWindow
'...etc
'...etc
'----------------------
For more information read the related functions from the =
documentation.
--=20
Regards=20
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -=20
( ! ) Preceding answers in Google:=20
=
http://groups.google.com/group/microsoft.public.vb.vista.compatibility=20
( i ) Temperance in the forum:=20
http://www.microsoft.com/communities/conduct/default.mspx=20
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
On Monday, September 01, 2008 6:27 PM
gustavo gutierrez morales wrote:
Re: smartmenuxp and vista
Vinchenzo:
A esta aportaci?n me refer?a cuando hablaba de traducirla. lamentablemente
mi ingl?s no es tan bueno como el tuyo.
!Felicidades!
"Vinchenzo vin?" <Vin?@newsgroup.nospam> escribi? en el mensaje
news:OUPSU0U...@TK2MSFTNGP06.phx.gbl...
"ed barsano" escribi? en el mensaje de noticias
news:200872922...@exmsft.com...
Hi, Ed,
the malfunction of that control in Windows Vista is caused by the
Windows API function 'GetPixel' (used within its internal procedure
'DrawMenuShadow') when the desktop composition is enabled. The control works
perfectly when desktop composition is disabled:
Take a loot at:
? Desktop Window Manager:
http://msdn.microsoft.com/en-us/library/aa969540.aspx
SmartMenuXP1.Shadow = IsCompositionDisabled
On Wednesday, November 11, 2009 3:35 AM
panda zen wrote:
smartmenuxp and vista
disable "Enable desktop composition"
http:// pandazen.wordpress.com/2009/11/11/vbsmart-menu-xp-in-windows-vista
EggHeadCafe - Software Developer Portal of Choice
FLASH: Fix for Windows Vista
http://www.eggheadcafe.com/tutorials/aspnet/2a257c6e-700c-4c95-94a8-3712c676eb02/flash-fix-for-windows-vi.aspx
"panda zen" escribi� en el mensaje de
noticias:20091111335...@gmail.com...