PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: resizing  (Read 819 times)

raymw

  • FireFly3 User
  • Junior FireFly Member
  • *
  • Posts: 64
resizing
« on: February 02, 2017, 11:12:40 AM »

Having designed a form, with a number of text boxes, buttons, etc, I've decided that I want to be able to resize everything, if the main form is resized. This can be done, by dragging the edge of the form (with a thick frame selected in the form design - WS_THICKFRAME in window styles of form). However, it is tedious to have to manually select each control and then individually change the resize rules. Is there a short cut, or even just enter s,s,s,s for each control resizerules? Am I being lazy?

edit to say answered now, see below
« Last Edit: February 02, 2017, 11:17:32 AM by raymw »
Logged

raymw

  • FireFly3 User
  • Junior FireFly Member
  • *
  • Posts: 64
Re: resizing
« Reply #1 on: February 02, 2017, 11:16:47 AM »

duh, just realised not a problem, just select everything with cctrl button, then resize once....Knew it worked for lining up stuff, didn't realise other attributes the same.
Logged

Eddy Van Esch

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 239
  • FF3 User
    • DevOTechS
Re: resizing
« Reply #2 on: February 02, 2017, 11:18:57 AM »

Am I being lazy?
Maybe, but that doesn't necessarily have to be a bad quality ...  ;D
That said ... Just select all the controls at the same time. Then go to control properties. The resizing rules set there will apply to all the controls that you had selected (which can be all of them).
Of course, s s s s would make the most sense. But you can set different resize rules for individual controls later.

PS. Have I mentioned that I absolutely love the FF control resizing feature ..?  ;)
Logged
Eddy

raymw

  • FireFly3 User
  • Junior FireFly Member
  • *
  • Posts: 64
Re: resizing
« Reply #3 on: February 02, 2017, 12:17:45 PM »

Thanks. I'm in a bit of a blank mode, today, but having got the text boxes, etc, to resize, by dragging around the form edges, I need to detect that size change in the software, to be able to alter other values. I would guess there is a message raised, when the cursor is moved when on edge of form, but how to I refer to that?
Logged

Eddy Van Esch

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 239
  • FF3 User
    • DevOTechS
Re: resizing
« Reply #4 on: February 02, 2017, 02:23:19 PM »

I would guess there is a message raised, when the cursor is moved when on edge of form, but how to I refer to that?

Easy. Use the WM_SIZE message:

Code: [Select]
'--------------------------------------------------------------------------------
Function FORM1_WM_SIZE ( _
                         hWndForm      As Dword, _  ' handle of Form
                         fwSizeType    As Long,  _  ' type of resizing request
                         nWidth        As Long,  _  ' new width of client area
                         nHeight       As Long   _  ' new height of client area
                         ) As Long
   zTrace "Ouch! This form is being resized!"
   Function = 0   ' change according to your needs
End Function
Logged
Eddy

raymw

  • FireFly3 User
  • Junior FireFly Member
  • *
  • Posts: 64
Re: resizing
« Reply #5 on: February 02, 2017, 04:23:40 PM »

I suppose it is easy, if you know where to look. Spent ages poking around, trying different searches within firefly...
Next, I want to be able alter font sizes. I'm not sure if the juice will be worth the squeeze, at the moment.
Best wishes,

Ray
Logged

raymw

  • FireFly3 User
  • Junior FireFly Member
  • *
  • Posts: 64
Re: resizing
« Reply #6 on: February 04, 2017, 06:09:06 PM »

Slightly different problem, not just related to freebasic, same with some other software.
I am developing a small program on my desktop pc, it runs fine on there, and by copying the exe to a laptop. Both running windows 10. The form and controls are all resizable. However I have a small Acer tablet PC, also running windows 10. When I run the program on there the form goes to full size over all the screen (except for task bar), and it cannot be resized. If I test for compatibility, it selects win8, and the program behaves properly, wrt resizing, etc. However, when running the program again, it will only resize properly if I do it by doing the 'check for compatibility' process again. Checking the program properties it is saying run in compatibility mode, windows8, as I'd expect, but it appears not to be running as it does in the compatibility test process. Any ideas?
Logged

raymw

  • FireFly3 User
  • Junior FireFly Member
  • *
  • Posts: 64
Re: resizing
« Reply #7 on: March 15, 2017, 02:41:36 PM »

I've found that if I create a one line .bat file on the tablet pc, the one line being the name of the .exe, then a 'dos box' opens full screen, but the the actual .exe appears the correct size, and closing the 'dos box', leaves everything as it should be, and I can use the .exe exactly as on the desktop pc wrt resizing, etc. I could probably hunt down a neater solution, but I've other fish to fry. This also works with other older programs written by others which otherwise open full screen on the tablet.
Logged