From: Claire on
Hello,
Is there any workaround to change the form's BorderStyle property
before the form is loaded?
I need to change it from None to Fixed Single depending on user's
preferences.
That form is not the main form of the project.
Your thoughts appreciated,
Claire


From: Karl E. Peterson on
Claire wrote:
> Is there any workaround to change the form's BorderStyle property
> before the form is loaded?
> I need to change it from None to Fixed Single depending on user's
> preferences.

Technically, not before it's loaded, but you can change it during the
Form_Load event using the techniques demonstrated here:

http://vb.mvps.org/samples/FormBdr

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Mike Williams on
"Claire" <replyto(a)fra> wrote in message
news:%23i%236t$V7KHA.3504(a)TK2MSFTNGP05.phx.gbl...

> Is there any workaround to change the form's BorderStyle
> property before the form is loaded? I need to change it from
> None to Fixed Single depending on user's preferences.
> That form is not the main form of the project.

Don't know if you actually do mean "before the form is loaded". You can
change its BorderStyle after it loads, or as it loads:

Dim oldStyle As Long
oldStyle = GetWindowLong(Form2.hwnd, GWL_STYLE)
SetWindowLong Form2.hwnd, GWL_STYLE, oldStyle _
And Not WS_THICKFRAME
SetWindowPos Form2.hwnd, 0, 0, 0, 0, 0, _
SWP_FRAMECHANGED Or SWP_NOMOVE Or _
SWP_NOZORDER Or SWP_NOSIZE
Form2.Show

Mike



From: Claire on
Thank you Karl and Mike.
It does work perfectly.
Claire

"Claire" <replyto(a)fra> wrote in message
news:%23i%236t$V7KHA.3504(a)TK2MSFTNGP05.phx.gbl...
> Hello,
> Is there any workaround to change the form's BorderStyle property
> before the form is loaded?
> I need to change it from None to Fixed Single depending on user's
> preferences.
> That form is not the main form of the project.
> Your thoughts appreciated,
> Claire
>


From: Claire on
Almost done but I need to disable (grayed) X
How to do that?
Thanks,
Claire

"Claire" <replyto(a)fra> wrote in message
news:%23c8tkSX7KHA.3924(a)TK2MSFTNGP04.phx.gbl...
> Thank you Karl and Mike.
> It does work perfectly.
> Claire
>
> "Claire" <replyto(a)fra> wrote in message
> news:%23i%236t$V7KHA.3504(a)TK2MSFTNGP05.phx.gbl...
>> Hello,
>> Is there any workaround to change the form's BorderStyle
>> property before the form is loaded?
>> I need to change it from None to Fixed Single depending on user's
>> preferences.
>> That form is not the main form of the project.
>> Your thoughts appreciated,
>> Claire
>>
>
>