Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Why vbhide don't work in Windows Vista?


Why vbhide don't work in Windows Vista?

Author
Message
microtroyan
microtroyan
Forum God
Forum God (678 reputation)Forum God (678 reputation)Forum God (678 reputation)Forum God (678 reputation)Forum God (678 reputation)Forum God (678 reputation)Forum God (678 reputation)Forum God (678 reputation)Forum God (678 reputation)

Group: Forum Members
Posts: 2, Visits: 5
The next code works in XP but not in Windows Vista:



In XP execute the calculator (hide)

but in windows vista show the window's calculator.



I tried in Windows Vista as administrator, but I get the same result.



Please, help me.







Private Declare Function ShellExecute Lib "shell32.dll" Alias _

"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation _

As String, ByVal lpFile As String, ByVal lpParameters _

As String, ByVal lpDirectory As String, ByVal _

nShowCmd As Long) As Long



Private Sub Form_Load()

ShellExecute hwnd, "open", "C:\windows\system32\calc.exe", vbNullString, vbNullString, vbhide

End Sub





Keithuk
Keithuk
Forum God
Forum God (291K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
I've replied to your other topic in the main VB forum. Wink

Keith

I've been programming with VB for 17 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

Keithuk
Keithuk
Forum God
Forum God (291K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
Welcome to A1vbcode simrita

simrita (9/30/2008)
The next code works in XP but not in Windows Vista:

Shell "c:\windows\system32\calc.exe", vbHide

In XP execute the calculator (hide)
but in windows vista show the window's calculator.

Private Sub Form_Load()
ShellExecute hwnd, "open", "C:\windows\system32\calc.exe", vbNullString, vbNullString, vbhide
End Sub

You don't need to full path to Calc.exe because its in the Windows path.

Shell "calc.exe", vbHide

According to this. You can not hide the calculator in either XP or Vista with Shell or ShellExecute. Wink

Keith

I've been programming with VB for 17 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

borrows123
borrows123
Forum God
Forum God (507 reputation)Forum God (507 reputation)Forum God (507 reputation)Forum God (507 reputation)Forum God (507 reputation)Forum God (507 reputation)Forum God (507 reputation)Forum God (507 reputation)Forum God (507 reputation)

Group: Forum Members
Posts: 1, Visits: 2
That's nice work man..

Thank you for sharing this with us....

May Lord bless you ...

SY0-201 | 70-680 | 642-902 | 70-640

GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search