Hello,
The code below can popup the property dialog of a file, it works well on XP,
Vista 32bit, but it will not work on Vista 64bit, how to correct it? i have
tried to change integer to intptr, but not work yet, thank you.
//////////////////////////////////////////////////////
<System.Runtime .InteropService s.StructLayout( System.Runtime. InteropServices .LayoutKind.Seq uential)>
Public Class SHELLEXECUTEINF O
Public cbSize As Integer
Public fMask As Integer
Public hwnd As Integer
<System.Runtime .InteropService s.MarshalAs(Sys tem.Runtime.Int eropServices.Un managedType.LPW Str),
Microsoft.Visua lBasic.VBFixedS tring(255)Publi c lpVerb As String = ""
<System.Runtime .InteropService s.MarshalAs(Sys tem.Runtime.Int eropServices.Un managedType.LPW Str),
Microsoft.Visua lBasic.VBFixedS tring(255)Publi c lpFile As String = ""
<System.Runtime .InteropService s.MarshalAs(Sys tem.Runtime.Int eropServices.Un managedType.LPW Str),
Microsoft.Visua lBasic.VBFixedS tring(255)Publi c lpParameters As String = ""
<System.Runtime .InteropService s.MarshalAs(Sys tem.Runtime.Int eropServices.Un managedType.LPW Str),
Microsoft.Visua lBasic.VBFixedS tring(255)Publi c lpDirectory As String = ""
Public nShow As Integer
Public hInstApp As Integer
Public lpIDList As Integer
Public lpClass As String
Public hkeyClass As Integer
Public dwHotKey As Integer
Public hIcon As Integer
Public hProcess As Integer
Private Const SW_SHOW As Integer = 5
Private Const SEE_MASK_INVOKE IDLIST As Integer = &HC
Private Declare Auto Function ShellExecuteEX Lib "shell32.dl l" Alias
"ShellExecuteEx " (ByVal SEI As SHELLEXECUTEINF O) As Integer
Public Shared Sub ShowPropertiesD ialog(ByVal Path As String)
If System.IO.File. Exists(Path) Or System.IO.Direc tory.Exists(Pat h)
Then
Dim shInfo As New SHELLEXECUTEINF O
shInfo.cbSize =
System.Runtime. InteropServices .Marshal.SizeOf (GetType(SHELLE XECUTEINFO))
shInfo.lpFile = Path
shInfo.nShow = SW_SHOW
shInfo.fMask = SEE_MASK_INVOKE IDLIST
shInfo.lpVerb = "properties "
ShellExecuteEX( shInfo)
End If
End Sub
End Class 0 1272 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Peter Olcott |
last post by:
Cab you write code directly in the Common Intermediate language? I need to
optimize a critical real-time function.
|
by: yxq |
last post by:
Hello,
The File.Delete(VS2005) function can not delete file on Vista-64bit, why?
And, what changes of API between 32-bit and 64-bit?
Thank you
|
by: slogging_away |
last post by:
I know, I know - flame away but its not clear to me if Python will run
on a system running Microsoft Vista. Is anyone successfully running
Python on Vista? If so, is it what version of Python are you
running? I'm ordering a new system and if Python won't work on Vista
then it will definately influence the OS selection.
Thanks in advance!
|
by: |
last post by:
Hello,
I am wrtting a program that does some sound effects... the files are stored
in a subfolder in the application folder...
and I check the existence of the files before calling the method to play the
sound.
It works perfectly well in Windows XP, but when I move my application to a
Vista machine, the sound does not play...
I used a debug statement to confirm that the files are seen in the code but
somehow it does not play...
If I use...
|
by: Nicolas Hinze |
last post by:
Dear all,
I installed Vista SP1 on my Vista x64 Enterprise machine. Now my
Visual Basic 2005 (.Net 2) does not behave correctly. It appears that
'for loops' have a problem of some sort. For example, I have a 'for
loop' to fill a dropdown control with numbers from x to z. Now that
dropdown stays empty. This behavior did not happen before SP1. I do
not get any error messages. Everything works perfectly on WinXP.
Anyone has any idea if...
| |
by: perry.yuan |
last post by:
Hi Gurus,
I am looking for C code for multiplying 32bit by 32bit operands and
getting a 64bit product. i.e.
U32 m1, m2;
U64 p = m1 * m2;
Of course I can use
|
by: =?Utf-8?B?TWlrZSBNaWtl?= |
last post by:
Multiple problems I believe are related. First SqlDatasource in designer
"Object reference not set to an instance of an object." I believe problems
is caused by unable to read and bind the connectionString settings in the
web.config file.
Second, when trying to run the ASP.Net web site administration tool recieve
the following error:
An error was encountered. Please return to the previous page and try again.
The following message...
|
by: =?Utf-8?B?dmlwZXJ4MTk2Nw==?= |
last post by:
We are having an issue with an application we are developing. We have a
Legacy COM DLL in C++ that we have converted to Visual Studio 2008. This COM
DLL has methods that are calling Managed C# assemblies as pass thru to
support legacy applications in an effort to move our code to the new Code
base. Our COM Object can be instantiated on Windows XP in any COM supported
environment using Visual C++, Visual Basic, ASP.NET or ASP and works...
|
by: =?Utf-8?B?TWljaw==?= |
last post by:
Hello. I have a table PC, running Vista Home Premium (64bit) and when I try
to write with the stylus, it is VERY slow to repsond to the touch, and it
often does'nt record a key stroke, or at least 'jitters' displaying dashes
(rather than continuous lines).
This renders it impossible to use my stylus in tablet mode - though it
responds well to touches from the stylus, when opening icons for instance, it
cannot be used for drawing or...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |