forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Open Windows Run Dialog

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Mon Jan 15, 2007 3:23 pm    Post subject: Open Windows Run Dialog Reply with quote

How can I open the windows run dialog from VDS? I thought this was said before, but I could not find it when searching the forum.

Thanks

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Mon Jan 15, 2007 5:27 pm    Post subject: Reply with quote

I know the key shortcut is Windows+R, but that is the extent of my ideas.

As a side note, is it possible to "send" the Windows key in VDS?

_________________
Joe Floyd
Back to top
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Mon Jan 15, 2007 5:43 pm    Post subject: Reply with quote

I need to be able to call it w/o using any send keys.
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Mon Jan 15, 2007 10:46 pm    Post subject: Reply with quote

Why don't you just create your own run dialog??

Or if your any good with API, maybe this link can help guide you.

http://www.codeproject.com/shell/runfiledlg.asp
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Jan 16, 2007 2:25 am    Post subject: Reply with quote

Pssst over here http://www.dragonsphere.net/forum Wink
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Tue Jan 16, 2007 4:43 pm    Post subject: Reply with quote

Cool, thanks. Here are links to the posts from DragonSphere.

ActiveX Way
http://www.dragonsphere.net/forum/viewtopic.php?t=28

Win32 Way
http://www.dragonsphere.net/forum/viewtopic.php?t=27

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Jan 16, 2007 5:24 pm    Post subject: Reply with quote

Oops Embarassed my fault Liquidcode... I guess you were not aware that only registered users of GadgetX can see those links above. Basicly here is the code below... I searched and tried many things to get this to work with only VDS but I could not figure out how to get VDS to accept a function ordinal number inplace of the function name Sad On the bright side GadgetX will do this for ya Very Happy You need 2.X.152.70 of GadgetX or newer for this to work.

ActiveX Way
Code:

#-----------------------------------------------------------------------------#
#                                                                             #
# This program demostrates how to call the FileRun dialog using GadgetX OLE support  #
#                                                                             #
#                                                                             #
# Author: Johnny Kinsey (A.K.A. DragonSphere)                                 #
#                                                                             #
# Copyright: copyright © 2007 Dragon Sphere Software                          #
#                                                                             #
#-----------------------------------------------------------------------------#

Title Show Run dialog
External GadgetX.dll,5.0
#DEFINE COMMAND,SET,DEFINE,OLE
#DEFINE FUNCTION,GET,OLE

Define Variable,Object,Shell

Ole Init
Set Shell,@Ole(Create,"Shell.Application")
Ole Call,Shell,"FileRun()"
Info Notice that the FileRun box is showing and this info box is too.


Win32 API Way
Code:

#-----------------------------------------------------------------------------#
#                                                                             #
# This program demostrates how to call the undocumented function SHRunDialog  #
# in the shell32.dll.  We are calling this function by Ordinal since the      #
# the shell32.dll does not export the function by name.  The ordinal number   #
# for the SHRunDialog function is #61                                         #
#                                                                             #
#  WARNING: This is an undocumented function and is subject to change         #
#                                                                             #
# Author: Johnny Kinsey (A.K.A. DragonSphere)                                 #
#                                                                             #
# Copyright: copyright © 2007 Dragon Sphere Software                          #
#                                                                             #
#-----------------------------------------------------------------------------#

Title Show Run dialog
External GadgetX.dll,5.0
#DEFINE COMMAND,FREEDLL,SET,DEFINE
#DEFINE FUNCTION,LOADDLL,GET,CALLFUNCPTR,GETFUNCPTR,MAKELONG,OLE

# Define a Handle for the shell32.dll
Define Variable,Handle,shell32
# Load the dll and save it's handle
Set shell32,@LoadDLL(shell32.dll)

# Define a Pointer for the SHRunDialog function memory address
Define Variable,Pointer,SHRunDialog
# Using MakeLong put the ordinal in the low word value and save it.
%%SHRunDialogOrdinal = #@MakeLong(61,0)
# Get the address of the function using the ordinal and save it.
Set SHRunDialog,@GetFuncPtr(shell32,%%SHRunDialogOrdinal)

# The SHRunDialog function requires the following strings to be wide character strings
%%Title = @Ole(VDSToBSTR,"Run")
%%Description = @Ole(VDSToBSTR,"Type the name of a program, folder, document, or Internet resource, and Windows will open it for you.")

%%WorkingDir = @Ole(VDSToBSTR,@Path(%0))

%%NoBrowse = 1
%%NoMRU = 2
%%NoBrowseAndNoMRU = 3
%%CalcDirectory = 4
%%NoLabel = 8
%%NoSeparateMem = 20

%%WM_GETICON = 127

# Build a hidden VDS window
  DIALOG CREATE,VDS hidden window,0,0,240,160
#  DIALOG SHOW
# Get the big icon
%%BigIcon = @SendMsg(@winexists(VDS hidden window),%%WM_GETICON,1,0)


# Call the function passing it the Handle of the Tray Window and above string addresses
# This function will wait until the user closes the dialog before returning.
%A = @CallFuncPtr(Micro$oft,DWORD,SHRunDialog,HANDLE|#Shell_TrayWnd,HANDLE|%%BigIcon,Pointer|%%WorkingDir,Pointer|%%Title,Pointer|%%Description,DWORD|%%CalcDirectory)
# Sorry the return value is always 0.  It would have been nice if MS gave us some clue as to what the user was doing :-(
FreeDLL shell32

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group