Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Save desktop icon postions
#1
i have seen this feature in other programs (ppro and ultramon).
how to do it with qm ?

is it possible to create a desktop shortcut at x/y screen ?

more advanced:

i have some qm shortcuts to functions on my desktop.
they should be only available when qm is running.
i could delete those shortcuts on qm exit and create them at qm start,
but i guess they will apear at the wrong position.

example: shortcut for vm_machines
(code is old, will be updated)

vm_machines
Code:
Copy      Help
Dir d; str fn fpath flist vm_exe="vmware.exe"
foreach(d "D:\vm\*" FE_Dir 0x1)
,fpath.formata("%s[]" d.FileName(1))
,flist.formata("%s[]" d.FileName)

_i=PopupMenu(flist)
if _i!=0
,_s.getl(fpath _i-1)
,str vmdk.format("%s\*.vmdk" _s)
,str vmx.format("%s\*.vmx" _s)
,str dsfn dsfp
,Dir v
,foreach(v vmdk FE_Dir)
,,dsfn=v.FileName
,,dsfp=v.FileName(1)
,foreach(v vmx FE_Dir)
,,dsfn=v.FileName
,,dsfp=v.FileName(1)
,,
,str title.getl(flist _i-1)
,;out _i

,
,ifi win(title "" "vmware")
,,act win(title "" "vmware")
,else
,,typelib ServicesManagerLib {2DE5E4C8-9DD5-11D2-9530-000000000000} 1.3
,,ServicesManagerLib.clsService se._create
,,BSTR b="VMware Authorization Service"
,,se.DisplayName=b
,,if se.CurrentState !=4
,,,se.StartService
,,b="VMware DHCP Service"
,,se.DisplayName=b
,,if se.CurrentState !=4
,,,se.StartService
,,b="VMware NAT Service"
,,se.DisplayName=b
,,if se.CurrentState !=4
,,,se.StartService
,,
,,dsfp.format("''%s''" dsfp)
,,dsfp.findreplace(".vmxf" ".vmx")
,,run vm_exe dsfp
,,;out dsfp
pi
#2
Enumeration and retrieving positions can be done with accessible object functions. Don't know how to restore. See LVM_... messages in MSDN. Or maybe exist special functions or interfaces for this.


Forum Jump:


Users browsing this thread: 1 Guest(s)