Results 1 to 7 of 7

Thread: Dragging height

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455

    Question

    Dear VB users,

    Making a drag/drop program to move files, I discover a problem.

    At the moment I am dragging, the drag height must be the height of the filename.

    Searching for this value.

    The File1.FontSize can have many values.

    I did try:

    TextHeight("W")
    TextHeight(Text1.FontSize)
    TextHeight(Text1)

    All gives the same value: 195 (making the FontSize very small to very big!)

    How can I find the height of the draggingbox for the text I am dragging?

    Nice greetings,

    Michelle.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Cool

    OK, youre using twips or a userdef scale on that control. Just change it to pixels or divide it by 15
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455

    Question

    Hello kedaman,

    If I have two FileBoxen used for dragging and dropping. Both do have different FontSizes.
    I don't understand what I do have to calculate for a correct dragging box.

    Please can you give an example???

    Michelle

    [Edited by michelle on 04-12-2000 at 05:28 AM]

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Ok, michelle, filelistboxes don't have any scalemode so they use their parents scalemode, Is it/they set to pixel?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Wink

    Sorry, I didn't understand your problem here, Textheight doesn,t work for filelistboxes. Simply use Filelistboxname.fontsize
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455
    Hello kedaman,

    If I make a FileListBox with a FontSize for example 72. What will be the dragging box height.
    If it is to small you are seeing small box height.

    How can I calculate my dragging box height?

    Thanks for helping me.

    Michelle.

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Question

    I don't get it, why do you need a gigantic font (72) to a filelistbox? Anyway I think you need to check out what scalemode you have on your form, that I think could be twips. To calculate between twips and pixels it's 1 pixel = 15 twips (Or if you're using VB3, it can be 12 or something else)
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width