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 GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: Today @ 11:19:17 AM
Posts: 1,795, Visits: 4,572
I've replied to your other topic in the main VB forum.

Keith

http://www.martin2k.co.uk/forums/index.php?act=idx

I've been programming with VB for 14 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 GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: Today @ 11:19:17 AM
Posts: 1,795, Visits: 4,572
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

http://www.martin2k.co.uk/forums/index.php?act=idx

I've been programming with VB for 14 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: 5/7/2010 2:48:37 AM
Posts: 1, Visits: 1
That's nice work man..
Thank you for sharing this with us....
May Lord bless you ...

BORROWS
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

PermissionsExpand / Collapse

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