Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact
A1VBCode Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      

Home » Classic Visual Basic (VB 6 or earlier) » API » Why vbhide don't work in Windows Vista?


Why vbhide don't work in Windows Vista?Expand / Collapse
Author
Message
Posted 12/15/2007 12:43:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 12/15/2007 10:07:33 AM
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


Post #23790
Posted 12/15/2007 3:01:50 PM


Forum God

Forum God

Group: Moderators
Last Login: 2 days ago @ 3:50:41 PM
Posts: 1,889, Visits: 5,252
I've replied to your other topic in the main VB forum.

Keith

I've been programming with VB for 15 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
Post #23793
Posted 9/30/2008 7:23:17 AM


Forum God

Forum God

Group: Moderators
Last Login: 2 days ago @ 3:50:41 PM
Posts: 1,889, Visits: 5,252
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.

Keith

I've been programming with VB for 15 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
Post #25838
Posted 5/7/2010 2:52:22 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/21/2010 1:02:38 AM
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
Post #29252
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Admin, Mod, Mark, Keithuk

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 5:00pm