Windows context menu
Windows context menu
Hi,
In my application I must send XML files generated from Xbase program signed with an electronic signature (XAdES).
These I can add with another, installed on computer, program. In this case I must run this program, choice directory
and file, and add signature. However, this program add to the Windows context menu option "Sign", which is
available, when I right click on this file. In this case signature program is already invoked for this file. My question is:
how, if is possible, can I implement/add these context menu in Xbase program (or run this, what is made under "Sign"
option)?
Regards
Piotr
In my application I must send XML files generated from Xbase program signed with an electronic signature (XAdES).
These I can add with another, installed on computer, program. In this case I must run this program, choice directory
and file, and add signature. However, this program add to the Windows context menu option "Sign", which is
available, when I right click on this file. In this case signature program is already invoked for this file. My question is:
how, if is possible, can I implement/add these context menu in Xbase program (or run this, what is made under "Sign"
option)?
Regards
Piotr
Re: Windows context menu
I don't know what you mean by "Windows context menu"
The eXpress train is coming - and it has more cars.
Re: Windows context menu
Roger,
I mean "Menu which is displayed under Windows on Desktop or disk explorer, when right click on file"
here is screenshot:
https://onedrive.live.com/redir?resid=D ... hoto%2cpng
Piotr
I mean "Menu which is displayed under Windows on Desktop or disk explorer, when right click on file"
here is screenshot:
https://onedrive.live.com/redir?resid=D ... hoto%2cpng
Piotr
Re: Windows context menu
hi,
when left click on Desktop and than right click -> Menu.
Menu Item are in Registry underyou have to create a new Item e.g. "USB Eject" and add "Command".
edit : have re-read your Msg ... you already have that Menu Entry as you say.
so look at your HKEY_CLASSES_ROOT\DesktopBackground\Shell\ for your search Key and if it have a "Command" String which can use with Runshell()
when left click on Desktop and than right click -> Menu.
Menu Item are in Registry under
Code: Select all
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\USB Eject]
"ICON"="hotplug.dll,-100"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\USB Eject\Command]
@="D:\\ALASKA\\USB\\LBDRIVE.EXE"
so look at your HKEY_CLASSES_ROOT\DesktopBackground\Shell\ for your search Key and if it have a "Command" String which can use with Runshell()
greetings by OHR
Jimmy
Jimmy
Re: Windows context menu
Jimmy,
thanks for your answer. In registry these options don't have a command - in this case I don't know an command for RunShell().
When I use XbpFileDialog(), I can display this menu, but... don't have all option. This Windows component is not so "rich" like f.e. explorer.exe. Using explorer.exe the menu is the same like on desktop. It's possible make XbpFileDialog() more "rich"?
Piotr
thanks for your answer. In registry these options don't have a command - in this case I don't know an command for RunShell().
When I use XbpFileDialog(), I can display this menu, but... don't have all option. This Windows component is not so "rich" like f.e. explorer.exe. Using explorer.exe the menu is the same like on desktop. It's possible make XbpFileDialog() more "rich"?
Piotr
Re: Windows context menu
Hi, Piotr.
2. Use a component.
The XbpFileDialog uses the standard API dialog and shows different behaviours depending on the OS.
1. Create your own with Directory() and so on.It's possible make XbpFileDialog() more "rich"?
2. Use a component.
The XbpFileDialog uses the standard API dialog and shows different behaviours depending on the OS.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Windows context menu
You could write your own replacement for XbpFileDialog() but that would take some time.
Do you need all the functionality of XbpFileDialog()?
Does it need to provide navigation to any folder?
Do you need all the functionality of XbpFileDialog()?
Does it need to provide navigation to any folder?
The eXpress train is coming - and it has more cars.
Re: Windows context menu
Roger,
I don't need navigation. All I need, is only select file (files) from one directory (using pattern, like Test_*.XML) and
have possibility run (with right mouse button) full "context menu" which is available normally on desktop with this right button.
The directory and file (files pattern) is know before.
Piotr
I don't need navigation. All I need, is only select file (files) from one directory (using pattern, like Test_*.XML) and
have possibility run (with right mouse button) full "context menu" which is available normally on desktop with this right button.
The directory and file (files pattern) is know before.
Piotr
Re: Windows context menu
This can easily be written using @..DCBROWSE.. RBSELECT .. RBDOWN
Code: Select all
FUNCTION MyFolderBrowse()
LOCAL GetList[0], GetOptions, aDir, aHeadings, i, oBrowse
DC_AutoRestoreWindow( { HKEY_LOCAL_MACHINE, ;
aDir := Directory()
aHeadings := { 'File;Name', ;
'File;Size', ;
'Date;Last;Write', ;
'Time;Last;Write', ;
'File;Attr', ;
'Size;Extend;Attr', ;
'Create;Date', ;
'Create;Time', ;
'Date;Last;Access', ;
'Time;Last;Access' }
@ 0,0 DCSAY 'Click Right Button in a Column for menu' ;
SAYSIZE 50 COLOR GRA_CLR_BLUE
@ 1,0 DCBROWSE oBrowse DATA aDir PRESENTATION DC_BrowPres() ;
SIZE 40,20 FIT ;
ID 'DIRECTORY_BROWSE' ;
HEADLINES 3 ;
RBSELECT ;
RBDOWN BrowseMenuBlock(@oBrowse)
FOR i := 1 TO Len(aHeadings)
DCBROWSECOL ELEMENT i HEADER aHeadings[i] ;
WIDTH 6 PARENT oBrowse ;
SORT _SortBlock(i,aDir)
NEXT
DCGETOPTIONS ;
NOMINBUTTON ;
NOMAXBUTTON ;
AUTORESIZE ;
BUTTONALIGN DCGUI_BUTTONALIGN_CENTER
DCREAD GUI ;
FIT ;
BUTTONS DCGUI_BUTTON_OK ;
OPTIONS GetOptions ;
TITLE 'Directory Browse' ;
MODAL ;
SETAPPWINDOW
RETURN nil
* -------------
STATIC FUNCTION _SortBlock( i, aDir )
RETURN {||ASort(aDir,,,{|a,b|a[1]<b[1]})}
* -------------
STATIC FUNCTION BrowseMenu( oBrowse )
STATIC soMenu, soBrowse
LOCAL GetList[0], i
IF Valtype(soMenu) # 'O' .OR. soMenu:status()<=0 .OR. soBrowse # oBrowse
IF Valtype(soMenu) = 'O'
soMenu := nil
ENDIF
soBrowse := oBrowse
DCSUBMENU soMenu
DCMENUITEM 'Run a program' PARENT soMenu ACTION {||RunShell(oBrowse:dataSource[oBrowse:arrayElement[1]],'MyProgram.Exe')}
DCREAD GUI ;
PARENT oBrowse ;
EXIT
ENDIF
RETURN soMenu
* --------------
STATIC FUNCTION BrowseMenuBlock( oBrowse )
RETURN {|x,y,z,o|o := BrowseMenu( oBrowse ), ;
o:popup( nil, x, 1 , ;
XBPMENU_PU_DEFAULT + XBPMENU_PU_MOUSE_RBDOWN ) }
The eXpress train is coming - and it has more cars.
Re: Windows context menu
how does it look like ?Piotr D wrote:thanks for your answer. In registry these options don't have a command - in this case I don't know an command for RunShell().
XbParts often does not offer "all" Property ... try this Ot4xb Version.Piotr D wrote:When I use XbpFileDialog(), I can display this menu, but... don't have all option. This Windows component is not so "rich" like f.e. explorer.exe. Using explorer.exe the menu is the same like on desktop. It's possible make XbpFileDialog() more "rich"?
greetings by OHR
Jimmy
Jimmy