ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

New App - Floating Ruler - Feedback?

<< < (4/7) > >>

app103:
I couldn't figure out how to work around that so I ended up using a form border. A bit lame, but it works.
-Renegade (September 30, 2006, 09:09 PM)
--- End quote ---

I like the form border...a lot. Keep it in there. It's like having an extra set of guide lines. Can you make resizing possible by dragging the border?

Is there any way you can have normal controls on the titlebar? I'd like to be able to use FileBox Extender's extra buttons when needed, but without the min-max/restore-close on the titlebar I don't think I can. I can't access a menu when right clicking the taskbar button either, for toggling FileBox Extender's always on top or roll up options.

It would still be nice if it were 2 forms, one for the rulers, and one for the settings...that way you can move the settings panel out of your way and work in the upper portion of the screen if you need to. Right now you can't without entering negative numbers into the Y pos, which has the potential to cause the undesired effect of not being able to get the settings panel back without ending task on the program and restarting it. Having 2 separate forms would solve that problem. And the extra form for the settings doesn't even need to be always on top like the rulers.

The more I play with this, the more I can see this easily becoming a favorite tool.  :D

Renegade:
I like the form border...a lot. Keep it in there. It's like having an extra set of guide lines. Can you make resizing possible by dragging the border?-app103 (September 30, 2006, 10:32 PM)
--- End quote ---

Not without either changing it to a regular border/title bar, or overridding the base and adding in all that stuff, which is really more than I was prepared to do for it. There's something funny going on with the form and it won't resize properly or expose the resizing arrows. It was something that I just shuffled under the rug.

Is there any way you can have normal controls on the titlebar? I'd like to be able to use FileBox Extender's extra buttons when needed, but without the min-max/restore-close on the titlebar I don't think I can. I can't access a menu when right clicking the taskbar button either, for toggling FileBox Extender's always on top or roll up options.-app103 (September 30, 2006, 10:32 PM)
--- End quote ---

Same as above.  :(

It would still be nice if it were 2 forms, one for the rulers, and one for the settings...that way you can move the settings panel out of your way and work in the upper portion of the screen if you need to. Right now you can't without entering negative numbers into the Y pos, which has the potential to cause the undesired effect of not being able to get the settings panel back without ending task on the program and restarting it. Having 2 separate forms would solve that problem. And the extra form for the settings doesn't even need to be always on top like the rulers.-app103 (September 30, 2006, 10:32 PM)
--- End quote ---

I noticed that when I was extending it that I'd done it the wrong way and that it really needed two forms like you've mentioned, but I was quite frankly too lazy to do it right. I'll have to hack it up and redo it or just start from scratch (most likely).

The more I play with this, the more I can see this easily becoming a favorite tool.  :D
-app103 (September 30, 2006, 10:32 PM)
--- End quote ---

Glad to hear that! I won't get to redoing it for a bit, but I'll definitely get back to it in the near future - probably this week. But I'll get the next version done right. (It will be in .NET 2.0 though.)

One thing is certain though - It's pretty hard to get a design flaw past you.  ;)

Cheers,

Ryan

app103:
I just tried some things in Delphi to see if I could get it to work where it didn't have a titlebar and could be resizable...and at first I couldn't do it either.

The problem I had is that there is no way to get rid of the titlebar unless I set the form's border style to 'none'...which isn't resizable. Only 'sizable' & 'sizable tool window' can be resized by dragging the edge...and they both have titlebars.

Then I remembered a custom form I was working on awhile back...some really flashy looking thing...and remembered I was able to make it resizable. So I looked at how I did it and was able to create a transparent window with a border that was resizable.

The trick here is in procedure TForm1.CreateParams. It overrides the borderstyle of 'none' to give it a border and it's resizable.  ;)

Anything you may have had in your OnCreate procedure that resembled this, won't be needed...just remove or comment it out:


--- Code: Delphi ---procedure TForm1.FormCreate(Sender: TObject);begin  SetWindowLong( Handle, GWL_STYLE,     GetWindowLong( Handle, GWL_STYLE )     and not WS_CAPTION ) ;  ClientHeight := Height; end;

form properties & settings:
Spoiler
--- Code: Delphi ---object Form1: TForm1  Left = 210  Top = 157  HorzScrollBar.Visible = False  VertScrollBar.Visible = False  BorderStyle = bsNone  BorderWidth = 1  ClientHeight = 449  ClientWidth = 681  Color = clBtnFace  TransparentColor = True  TransparentColorValue = clLime  Font.Charset = DEFAULT_CHARSET  Font.Color = clWindowText  Font.Height = -11  Font.Name = 'MS Sans Serif'  Font.Style = []  FormStyle = fsStayOnTop  OldCreateOrder = False  OnCreate = FormCreate  DesignSize = (    681    449)  PixelsPerInch = 96  TextHeight = 13  object Panel1: TPanel    Left = 0    Top = 0    Width = 681    Height = 449    Anchors = [akLeft, akTop, akRight, akBottom]    BevelInner = bvLowered    BevelOuter = bvLowered    Color = clLime    TabOrder = 0    object Panel2: TPanel      Left = 1      Top = 1      Width = 185      Height = 41      BevelInner = bvRaised      Caption = 'drag me'      TabOrder = 0      OnMouseDown = Panel2MouseDown      object Button1: TButton        Left = 152        Top = 8        Width = 27        Height = 25        Caption = 'X'        Font.Charset = DEFAULT_CHARSET        Font.Color = clWindowText        Font.Height = -11        Font.Name = 'MS Sans Serif'        Font.Style = [fsBold]        ParentFont = False        TabOrder = 0        OnClick = Button1Click      end    end  endend

Form code:
Spoiler
--- Code: Delphi ---unit Unit1; interface uses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs, ExtCtrls, StdCtrls; type  TForm1 = class(TForm)    Panel1: TPanel;    Panel2: TPanel;    Button1: TButton;    procedure Panel2MouseDown(Sender: TObject; Button: TMouseButton;      Shift: TShiftState; X, Y: Integer);    procedure FormCreate(Sender: TObject);    procedure Button1Click(Sender: TObject);  private    { Private declarations }    procedure WMNCHitTest(var Msg: TWMNCHitTest);  message wm_NCHitTest;   public    { Public declarations }    procedure CreateParams(var Params: TCreateParams); override;   end; var  Form1: TForm1; implementation {$R *.dfm} procedure TForm1.CreateParams(var Params: TCreateParams);begin  inherited CreateParams(Params);  Params.Style := (Params.Style or WS_THICKFRAME);end; procedure TForm1.WMNCHitTest(var Msg: TWMNCHitTest);begin  inherited;  if  Msg.Result = htClient then    Msg.Result := htCaption;end;   procedure TForm1.Panel2MouseDown(Sender: TObject; Button: TMouseButton;  Shift: TShiftState; X, Y: Integer);begin  ReleaseCapture;  SendMessage(Form1.Handle, WM_SYSCOMMAND, 61458, 0);end; procedure TForm1.FormCreate(Sender: TObject);begin//prevents flickering when resizing   Form1.DoubleBuffered := true;   Panel1.DoubleBuffered := true;   Panel2.DoubleBuffered := true;end; procedure TForm1.Button1Click(Sender: TObject);beginApplication.Terminate;end; end.

I am not sure if the Delphi code will be any help to you, but I have been told that Delphi & C# are similar enough to be almost considered close cousins.

The full Delphi source and .exe file are attached if you need it or want to try out the form to see how it works.

cranioscopical:

I hear, and obey... You can now maximize it, but will still need to work manually for dual monitors.
--- End quote ---

Thanks very much! 
Judging from the interest, it looks as though your 'little application' will have to become a programming tour de force in order to satisfy all of our requests :)

Renegade:
***BUMP***

I'm currently doing some XSLT work and will need to use the floating ruler I posted here a few years ago.

However, it's really old and there are a few things that I think I'll end up improving/changing to help me out.

Anyways, just curious if anyone has been using it or if they found it useful or if they would find it useful. I know it's been a few years (about 4), so I'd just like to get an idea about whether or not I should bother making the new updates available for others. (This was the only place that I posted it.)

If you found/find/would find it useful, let me know.

Thanks,

Ryan

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version