📄 register.tbl
字号:
<?xml version="1.0" encoding="gb2312"?>
<vg version="452" gridsize="10" range="0,0,389,179" caption="注册Visual Graph文件类型" bordericons="1" borderstyle="0" scrollbars="0" backcolor="$8000000F" frontcolor="$0" pattern="1">
<page name="Page" bounds="0,0,794,1122" visible="false" margin="100,100,100,100" paperwidth="2100" paperheight="2969"/>
<sheet name="页1" bounds="26,34,390,164">
<elliment name="立体框2" bounds="100,140,190,164" borderwidth="2">
<line name="Line1" linetype="0" backcolor="$80000014" pattern="1">
<points>
100,140,6
100,164,2
102,162,2
102,142,2
188,142,2
190,140,2
100,140,2
</points>
</line>
<line name="Line2" linetype="0" backcolor="$80000010" pattern="1">
<points>
190,164,6
190,140,2
188,142,2
188,162,2
102,162,2
100,164,2
190,164,2
</points>
</line>
<shape name="Rect1" bounds="102,142,188,162" linetype="0" backcolor="$8000000F" pattern="1"/>
<text name="Text1" bounds="102,142,188,162" border="$0" fontname="宋体" fontsize="16" text="确定"/>
<programe>
Property BorderWidth read GetBorderWidth write SetBorderWidth
Private Function GetBorderWidth()
return FBorderWidth
End Function
Private Function Initialize(Sender)
FBorderWidth=20
End Function
Published Function OnClick(Sender)
hKey = 0
HKEY_LOCAL_MACHINE = $80000002
REG_SZ=1
extern void=RegSetValue( int, int, int, string, int ) in advapi32.dll name RegSetValueA
extern int=GetCurrentDirectory( int, string ) in Kernel32.dll name GetCurrentDirectoryA
Buffer = Space(256)
ln=GetCurrentDirectory( 256, Buffer )
if( Buffer[ln] <> asc('\') )then
Buffer = Buffer + "\"
ln = ln + 1
end if
RegSetValue( HKEY_LOCAL_MACHINE, "Software\Classes\.tbl", REG_SZ, "tblfile", 7 )
RegSetValue( HKEY_LOCAL_MACHINE, "Software\Classes\tblfile", REG_SZ, "VG视图文件", 10 )
RegSetValue( HKEY_LOCAL_MACHINE, "Software\Classes\tblfile\defaulticon", REG_SZ, Buffer + "vg40.exe,1", ln + 10 )
RegSetValue( HKEY_LOCAL_MACHINE, "Software\Classes\tblfile\shell\edit", REG_SZ, "编辑(&E)", 8 )
RegSetValue( HKEY_LOCAL_MACHINE, "Software\Classes\tblfile\shell\edit\command", REG_SZ, Buffer + "vg40.exe %1", ln + 11 )
RegSetValue( HKEY_LOCAL_MACHINE, "Software\Classes\tblfile\shell\edit\ddeexec", REG_SZ, 'open("%1")', 10 )
RegSetValue( HKEY_LOCAL_MACHINE, "Software\Classes\tblfile\shell\edit\ddeexec\application", REG_SZ, 'visualgraph', 11 )
RegSetValue( HKEY_LOCAL_MACHINE, "Software\Classes\tblfile\shell\edit\ddeexec\topic", REG_SZ, 'system', 6 )
ShowMessage( "文件类型注册成功!" )
Close(1)
End Function
Private Function OnLButtonDown(Sender,X,Y)
cl=Line1.BackColor
Line1.BackColor=Line2.BackColor
Line2.BackColor=cl
End Function
Private Function OnLButtonUp(Sender,X,Y)
cl=Line1.BackColor
Line1.BackColor=Line2.BackColor
Line2.BackColor=cl
End Function
Private Function OnResize(Sender)
if Width < 3 * FBorderWidth then
Width = 3 * FBorderWidth
end if
if Height < 3 * FBorderWidth then
Height = 3 * FBorderWidth
end if
Rect1.SetBounds( Left + FBorderWidth, Top + FBorderWidth, Width - 2 * FBorderWidth, Height - 2 * FBorderWidth )
Line1.Points[0].x = Left
Line1.Points[0].y = Top
Line1.Points[1].x = Left
Line1.Points[1].y = Top + Height
Line1.Points[2].x = Left + FBorderWidth
Line1.Points[2].y = Top + Height - FBorderWidth
Line1.Points[3].x = Left + FBorderWidth
Line1.Points[3].y = Top + FBorderWidth
Line1.Points[4].x = Left + Width - FBorderWidth
Line1.Points[4].y = Top + FBorderWidth
Line1.Points[5].x = Left + Width
Line1.Points[5].y = Top
Line1.Points[6].x = Left
Line1.Points[6].y = Top
Line1.Refresh()
Line2.Points[0].x = Left + Width
Line2.Points[0].y = Top + Height
Line2.Points[1].x = Left + Width
Line2.Points[1].y = Top
Line2.Points[2].x = Left + Width - FBorderWidth
Line2.Points[2].y = Top + FBorderWidth
Line2.Points[3].x = Left + Width - FBorderWidth
Line2.Points[3].y = Top + Height - FBorderWidth
Line2.Points[4].x = Left + FBorderWidth
Line2.Points[4].y = Top + Height - FBorderWidth
Line2.Points[5].x = Left
Line2.Points[5].y = Top + Height
Line2.Points[6].x = Left + Width
Line2.Points[6].y = Top + Height
Line2.Refresh()
Text1.SetBounds( Rect1.Left, Rect1.Top, Rect1.Width, Rect1.Height )
Refresh()
End Function
Private Function SetBorderWidth(ABorderWidth)
if ABorderWidth >= 0 then
FBorderWidth = ABorderWidth
OnResize( This )
end if
End Function
</programe>
</elliment>
<elliment name="立体框1" bounds="210,140,300,164" borderwidth="2">
<line name="Line1" linetype="0" backcolor="$80000014" pattern="1">
<points>
210,140,6
210,164,2
212,162,2
212,142,2
298,142,2
300,140,2
210,140,2
</points>
</line>
<line name="Line2" linetype="0" backcolor="$80000010" pattern="1">
<points>
300,164,6
300,140,2
298,142,2
298,162,2
212,162,2
210,164,2
300,164,2
</points>
</line>
<shape name="Rect1" bounds="212,142,298,162" linetype="0" backcolor="$8000000F" pattern="1"/>
<text name="Text1" bounds="212,142,298,162" border="$0" fontname="宋体" fontsize="16" text="取消"/>
<programe>
Property BorderWidth read GetBorderWidth write SetBorderWidth
Private Function GetBorderWidth()
return FBorderWidth
End Function
Private Function Initialize(Sender)
FBorderWidth=20
End Function
Published Function OnClick(Sender)
Close(2)
End Function
Private Function OnLButtonDown(Sender,X,Y)
cl=Line1.BackColor
Line1.BackColor=Line2.BackColor
Line2.BackColor=cl
End Function
Private Function OnLButtonUp(Sender,X,Y)
cl=Line1.BackColor
Line1.BackColor=Line2.BackColor
Line2.BackColor=cl
End Function
Private Function OnResize(Sender)
if Width < 3 * FBorderWidth then
Width = 3 * FBorderWidth
end if
if Height < 3 * FBorderWidth then
Height = 3 * FBorderWidth
end if
Rect1.SetBounds( Left + FBorderWidth, Top + FBorderWidth, Width - 2 * FBorderWidth, Height - 2 * FBorderWidth )
Line1.Points[0].x = Left
Line1.Points[0].y = Top
Line1.Points[1].x = Left
Line1.Points[1].y = Top + Height
Line1.Points[2].x = Left + FBorderWidth
Line1.Points[2].y = Top + Height - FBorderWidth
Line1.Points[3].x = Left + FBorderWidth
Line1.Points[3].y = Top + FBorderWidth
Line1.Points[4].x = Left + Width - FBorderWidth
Line1.Points[4].y = Top + FBorderWidth
Line1.Points[5].x = Left + Width
Line1.Points[5].y = Top
Line1.Points[6].x = Left
Line1.Points[6].y = Top
Line1.Refresh()
Line2.Points[0].x = Left + Width
Line2.Points[0].y = Top + Height
Line2.Points[1].x = Left + Width
Line2.Points[1].y = Top
Line2.Points[2].x = Left + Width - FBorderWidth
Line2.Points[2].y = Top + FBorderWidth
Line2.Points[3].x = Left + Width - FBorderWidth
Line2.Points[3].y = Top + Height - FBorderWidth
Line2.Points[4].x = Left + FBorderWidth
Line2.Points[4].y = Top + Height - FBorderWidth
Line2.Points[5].x = Left
Line2.Points[5].y = Top + Height
Line2.Points[6].x = Left + Width
Line2.Points[6].y = Top + Height
Line2.Refresh()
Text1.SetBounds( Rect1.Left, Rect1.Top, Rect1.Width, Rect1.Height )
Refresh()
End Function
Private Function SetBorderWidth(ABorderWidth)
if ABorderWidth >= 0 then
FBorderWidth = ABorderWidth
OnResize( This )
end if
End Function
</programe>
</elliment>
<text name="Text1" bounds="26,34,390,70" autosize="true" border="$0" fontname="宋体" fontsize="16" textalign="0" text="把后缀为TBL的视图文件注册到Visual Graph
在Windows文件管理器里双击这些文件,即可运行。"/>
</sheet>
</vg>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -