From: Claire on 6 May 2010 17:05 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 6 May 2010 17:40 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 6 May 2010 17:51 "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 6 May 2010 19:34 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 6 May 2010 19:49 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 >> > >
|
Next
|
Last
Pages: 1 2 Prev: monitor if computer is in idle Next: Microsoft Responds to the Evolution of Online Communities |