RVActions insert table popup dalog and TBX bug under Vista
Posted: Fri Sep 28, 2007 7:06 am
I have Toolbar2k + TBX and using TBXSubMenuItem to display RVActions.ShowTableSizeDialog.
Everything works fine under Win 98-XP but under Vista my TBXSubMenuItem pops up an empty window along with the ShowTableSizeDialog and after a couple popups I'm getting access violation
Here is my code to get ShowTableSizeDialog popup:
Everything works fine under Win 98-XP but under Vista my TBXSubMenuItem pops up an empty window along with the ShowTableSizeDialog and after a couple popups I'm getting access violation
Here is my code to get ShowTableSizeDialog popup:
Code: Select all
procedure TMainForm.TBXSubmenuItem20Click(Sender: TObject);
var Rect :TRect;
aViewer :TTBItemViewer;
aPoint1 :TPoint;
aPoint2 :TPoint;
begin
if TBXSubmenuItem20.Checked then begin
TBXSubmenuItem20.PostClick;
Exit;
end;
aViewer:=ToolBar7.View.Find(TBXSubMenuItem20);
Rect:=aViewer.BoundsRect;
aPoint1:=ToolBar7.ClientToScreen(Point(Rect.Left,Rect.Top));
aPoint2:=ToolBar7.ClientToScreen(Point(Rect.Right,Rect.Bottom));
Rect.Top:=aPoint1.Y;
Rect.Left:=aPoint1.X;
Rect.Bottom:=aPoint2.Y;
Rect.Right:=aPoint2.X;
TBXSubmenuItem20.Checked:=True;
rvActionInsertTable1.ShowTableSizeDialog(RichViewEdit1,Rect);
end;