LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

toolbar window style

Oops, wrong message... (tought it was the OpenFile thread.) Howevery, the
sam eawnser applies...

Regards,


Wiebe.

"Wiebe@CARYA" wrote in message
news:3f6ab026@newsgroups....
> My solution was 'pure' LV... No external code, exept for the standard
API's.
>
> I'll see if I can recreate it. It sure was an interresting vi. Most of the
> code is needed to bypass LabVIEW's way of doing things (BTW: this way is
> 99.9% of the time very welkom...)
>
> Regards,
>
> Wiebe.
>
> "bfarley" wrote in message
> news:50650000000500000043230100-1042324653000@exchange.ni.com...
> > Just in case anyone else is interested, here is a quick class that
> > shows how I
did it. Beware - C# code ahead.
> >
> > using System;
> > using System.Runtime.InteropServices;
> >
> > class WinUtil
> > {
> > const int GWL_EXSTYLE = -20;
> > const int WS_EX_TOOLWINDOW = 0x00000080;
> > const int WS_EX_APPWINDOW = 0x00040000;
> >
> > [DllImport("user32.dll", EntryPoint="FindWindow")]
> > static extern IntPtr FindWindowWin32(string className,
> > string windowName);
> > [DllImport("user32.dll")]
> > static extern int GetWindowLong(
> > IntPtr window,
> > int index);
> > [DllImport("user32.dll")]
> > static extern int SetWindowLong(
> > IntPtr window,
> > int index,
> > int value);
> > public void MakeToolWindow(string WindowName)
> > {
> > IntPtr ptr = FindWindowWin32(null, WindowName);
> > int windowStyle = GetWindowLong(ptr, GWL_EXSTYLE);
> > SetWindowLong(ptr, GWL_EXSTYLE, windowStyle |
> > WS_EX_TOOLWINDOW);
> > }
> > }
>
>
0 Kudos
Message 11 of 12
(969 Views)
(I just thought I'd update this old thread since I found a way to do this)

Hello,

The attached VI shows how to make a VI look like a Windows toolbar window (narrower title bar, smaller close button etc.)

I found the useful documentation at

http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windowclasses/windowclassreference/windowclassfunctions/setwindowlong.asp?frame=true

Hope this is useful to someone,

Jaegen
Message 12 of 12
(963 Views)