Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "RECT" in [All]

odbc32

.

/// <param name="Direction">[Input] Determines which data source the Driver Manager returns information on.</param>

.

static extern short SQLDataSources(IntPtr EnvironmentHandle, short Direction,

.

Declare Function SQLDataSources Lib "odbc32.dll" (ByVal EnvironmentHandle As Integer, ByVal Direction As Short, _

.

Depending on the value of Direction, you may access System DSN, User DSN or both. Since the same DSN name may be used in User and System DSN, watch out for possible duplicate values.

.

static extern short SQLExecDirect (int statementHandle,

.

    Private Shared Function SQLExecDirect(ByVal statementHandle As IntPtr, ByVal statementText As String, _

.
Documentation
[SQLExecDirect] on MSDN

wininet

.
Summary
Sends commands directly to an FTP server.
.
Summary
Creates a new directory on the FTP server
.

static extern bool FtpCreateDirectory(IntPtr hConnect, string lpszDirectory);

.

  Private Shared Function FtpCreateDirectory(ByVal hConnect As IntPtr, ByVal lpszDirectory As String) As Boolean

.
Documentation
[FtpCreateDirectory] on MSDN
.

Direct Link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/FtpDeleteFile.asp

.
Summary
.

Direct Link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/FtpFindFirstFile.asp

.
Summary
Retrieves the current directory for the specified FTP session.
.

static extern bool FtpGetCurrentDirectory(IntPtr hConnect,

.

   StringBuilder directory, ref int bufferLength);

.

Declare Function FtpGetCurrentDirectory Lib "wininet.dll" _

.

   (ByVal hConnect As IntPtr, ByVal directory As StringBuilder, ByRef bufferLength As Integer) _

.

    If FtpGetCurrentDirectory(Me.hINetConn, s, nLen) Then

.
Documentation
[FtpGetCurrentDirectory] on MSDN
.

Direct Link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/FtpGetCurrentDirectory.asp

.

    private const long INTERNET_OPEN_TYPE_DIRECT = 1;

.

Direct Link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/FtpGetFile.asp

.
Summary
Remove an directory at the FTP site
.

public static extern bool FtpRemoveDirectory(IntPtr ulSession, string lpszDirectory);

.

Declare Function FtpRemoveDirectory Lib "wininet.dll" (TODO) As TODO

.
Documentation
[FtpRemoveDirectory] on MSDN
.

Direct Link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/ftpputfile.asp

.
Summary
Changes to a different working directory on the FTP server.
.

static extern bool FtpSetCurrentDirectory(IntPtr hFtpConnection, string lpszDirectory);

.

Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA" (ByVal hConnect As IntPtr, ByVal lpszDirectory As String) As Boolean

.

Dim changed As Boolean = FtpSetCurrentDirectory(hINetConn, changePath)

.
Documentation
[FtpSetCurrentDirectory] on MSDN
.

Direct Link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/InternetFindNextFile.asp

.

Direct Link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/internetgetconnectedstate.asp

.

Direct Link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/InternetGetLastResponseInfo.asp

.

const int INTERNET_OPEN_TYPE_DIRECT = 1; // direct to net

.

Const INTERNET_OPEN_TYPE_DIRECT = 1 ' // direct to net

.

    IntPtr hInternet = InternetOpen("browser", INTERNET_OPEN_TYPE_DIRECT, null, null, 0);

user32

.
Summary
.

static extern bool AdjustWindowRect(ref RECT lpRect, uint dwStyle, bool bMenu);

.

Public Function AdjustWindowRect(<MarshalAs(UnmanagedType.Struct)>ByRef lpRect As RECT, _

.

Public Declare Function AdjustWindowRect Lib "user32" _

.

         (lpRect As RECT, _

.

RECT

.

System.Windows.Rect

.
Documentation
[AdjustWindowRect] on MSDN
. .
Summary
.

static extern bool AdjustWindowRectEx(ref RECT lpRect, uint dwStyle,

.

Public Function AdjustWindowRectEx(<MarshalAs(UnmanagedType.Struct)>byref lpRect As RECT, _

.

Public Declare Function AdjustWindowRectEx Lib "user32" _

.

         (lpRect As RECT, _

.

RECT

.

     RECT lpRect = new RECT(ClientRectangle);

.

     AdjustWindowRectEx(ref lpRect, CreateParams.Style, false, CreateParams.ExStyle);  

.
Documentation
[AdjustWindowRectEx] on MSDN
.

static extern TODO AlignRects(TODO);

.

Declare Function AlignRects Lib "user32.dll" (TODO) As TODO

.
Documentation
[AlignRects] on MSDN
.

The multiple-window-position structure is an internal structure; an application cannot access it directly.

.

Useful to create a temporary block in input for sensitive GUI operations. For instance when manually activating a screen saver from within a GUI function, a short blocking delay will prevent the user mouse movements directly after selection from accidently escaping the screen saver.

.

///     installed hooks will not receive hook notifications and may behave incorrectly as a result. You should call

.

   IntPtr lpRect, uint cKids, IntPtr [] lpKids);

.

static extern TODO ClientRectangle(TODO);

.

Declare Function ClientRectangle Lib "user32.dll" (TODO) As TODO

.
Documentation
[ClientRectangle] on MSDN
.

Control.RectangleToScreen

.

static extern bool ClipCursor(ref RECT lpRect);

.

Private Declare Function ClipCursor Lib "user32"(ByRef lpRect As RECT) As Long

.

public struct RECT

.

    /// Left position of the rectangle.

.

    /// Top position of the rectangle.

.

    /// Right position of the rectangle.

.

    /// Bottom position of the rectangle.

.

    /// Operator to convert a RECT to Drawing.Rectangle.

.

    /// <param name="rect">Rectangle to convert.</param>

.

    /// <returns>A Drawing.Rectangle</returns>

.

    public static implicit operator Rectangle(RECT rect)

.

        return Rectangle.FromLTRB(rect.Left, rect.Top, rect.Right, rect.Bottom);

.

    /// Operator to convert Drawing.Rectangle to a RECT.

.

    /// <param name="rect">Rectangle to convert.</param>

.

    /// <returns>RECT rectangle.</returns>

.

    public static implicit operator RECT(Rectangle rect)

.

        return new RECT(rect.Left, rect.Top, rect.Right, rect.Bottom);

.

    public RECT(int left, int top, int right, int bottom)

.

RECT rect =new RECT( 10, 10, 20, 20 );

.

ClipCursor(ref rect);

.

string folderPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

.

If you come across this error "System.Runtime.InteropServices.MarshalDirectiveException: Cannot marshal 'parameter #6': Invalid managed/unmanaged type combination (this value type must be paired with Struct).", you may want to use

. .
Summary
.

public static extern unsafe IntPtr CreateDialogIndirectParamA(

.
Documentation
[CreateDialogIndirectParam] on MSDN
.
Summary
.

static extern IntPtr CreateIconIndirect([In] ref ICONINFO piconinfo);

.

private static extern IntPtr CreateIconIndirect([In] ref ICONINFO iconInfo);

.

     IntPtr handle = CreateIconIndirect(ref ii);

.
Documentation
[CreateIconIndirect] on MSDN
.
Summary
.

static extern IntPtr CreateIconIndirect([In] ref ICONINFO piconinfo);

.

private static extern IntPtr CreateIconIndirect([In] ref ICONINFO iconInfo);

.

     IntPtr handle = CreateIconIndirect(ref ii);

.
Documentation
[CreateIconIndirect] on MSDN
.

                    // Get info about the directory

.

Either use this name directly or modify the first line of the signature to:

.
Summary
.

static extern bool DrawAnimatedRects(IntPtr hwnd, int idAni,

.

   [In] ref RECT lprcFrom, [In] ref RECT lprcTo);

.

Since only IDANI_CAPTION is implemented, to get the effect of IDANI_OPEN, simply swap the lprcFrom and lprcTo rectangles, but still specify the IDANI_CAPTION constant.

.

    struct RECT

.

      public RECT(System.Drawing.Rectangle rectangle)

.

        Left = rectangle.Left;

.

        Top = rectangle.Top;

.

        Right = rectangle.Right;

.

        Bottom = rectangle.Bottom;

.

      public RECT(System.Drawing.Point location, System.Drawing.Size size)

.

    static extern bool DrawAnimatedRects(System.IntPtr hwnd, int idAni,

.

      [System.Runtime.InteropServices.In] ref RECT lprcFrom,

.

      [System.Runtime.InteropServices.In] ref RECT lprcTo);

.

    static extern bool GetWindowRect(System.IntPtr hWnd, out RECT lpRect);

.

      RECT from = new RECT(form.Location, form.Size);

.

      RECT to;

.

        GetWindowRect(hWnd, out to);

.

        DrawAnimatedRects(form.Handle, IDANI_CAPTION, ref to, ref from);

.

        DrawAnimatedRects(form.Handle, IDANI_CAPTION, ref from, ref to);

.

    ref struct RECT {

.

    RECT() {

.

    RECT(System::Drawing::Rectangle rectangle) {

.

        Left = rectangle.Left;

.

        Top = rectangle.Top;

.

        Right = rectangle.Right;

.

        Bottom = rectangle.Bottom;

.

    RECT(System::Drawing::Point location, System::Drawing::Size size) {

.

    bool DrawAnimatedRects(int hwnd, int idAni, RECT^ lprcFrom, RECT^ lprcTo);

.

    bool GetWindowRect(int hWnd, RECT^ lpRect);

.

    RECT^ from=gcnew RECT(this->Location, this->Size);

.

    RECT^ to=gcnew RECT();

.

        GetWindowRect(hWnd, to);

.

        DrawAnimatedRects(this->Handle.ToInt32(), IDANI_CAPTION, to, from);

.

        DrawAnimatedRects(this->Handle.ToInt32(), IDANI_CAPTION, from, to);

.
Documentation
[DrawAnimatedRects] on MSDN
.

static extern bool DrawEdge(IntPtr hdc, ref RECT qrc, uint edge,

.

RECT

.
Summary
.

static extern bool DrawFocusRect(IntPtr hDC, [In] ref RECT lprc);

.

RECT

.

    Public Declare Auto Function DrawFocusRect Lib "user32" ( _

.

    ByRef lpRect As Rect _

.

    <StructLayout(LayoutKind.Explicit)> Public Structure Rect

.

Where DrawFocusRect is used:

.

    Dim FR As Win32.Rect

.

    FR = New Win32.Rect

.

    Win32.DrawFocusRect(hdc, FR)      'static/shared method

.
Documentation
[DrawFocusRect] on MSDN
.

        // The following style can be used to adjust the bounding rectangle of the push button.

.

        /// Bounding rectangle is adjusted to exclude the surrounding edge of the push button.

.

        DFCS_ADJUSTRECT = 0x2000,

.

   ref RECT lprc, uint dwDTFormat, ref DRAWTEXTPARAMS lpDTParams);

.

private const int DT_CALCRECT = 0x00000400;

.

   ref RECT lprc, uint dwDTFormat, ref DRAWTEXTPARAMS lpDTParams);

.

public struct Rect

.

delegate bool EnumMonitorsDelegate(IntPtr hMonitor, IntPtr hdcMonitor, ref Rect lprcMonitor, IntPtr dwData);

.

Public Structure Rect

.

Delegate Function EnumMonitorsDelegate(hMonitor As IntPtr, hdcMonitor As IntPtr, ByRef lprcMonitor As Rect, dwData As IntPtr) As Boolean

.

        public Rect MonitorArea { get; set; }

.

        public Rect WorkArea { get; set; }

.

        delegate (IntPtr hMonitor, IntPtr hdcMonitor, ref Rect lprcMonitor,  IntPtr dwData)

.

After correction create an object of EnumReport class and call the functions using the object!

.

The correct signature for EnumWindows in the example:

.
Summary
.

static extern int FillRect(IntPtr hDC, [In] ref RECT lprc, IntPtr hbr);

.

Private Shared Function FillRect(hDC As IntPtr, ByRef lprc As RECT, hbr As IntPtr) As Integer

.

RECT

.
Documentation
[FillRect] on MSDN
.
Summary
.

static extern int FrameRect(IntPtr hdc, [In] ref RECT lprc, IntPtr hbr);

.

RECT

.
Documentation
[FrameRect] on MSDN
.
Summary
.

static extern bool GetClientRect(IntPtr hWnd, out RECT lpRect);

.

Private Shared Function GetClientRect(ByVal hWnd As System.IntPtr, _

.

   ByRef lpRECT As RECT) As Integer

.

RECT

.

The Win32 RECT structure is not compatible with the .NET System.Drawing.Rectangle structure.

.

public static RECT GetClientRect(IntPtr hWnd)

.

    RECT result;

.

    GetClientRect(hWnd, out result);

.

RECT clientRect = GetClientRect(handle);

.

ClientRectangle property of the System.Windows.Forms.Control class

.
Documentation
[GetClientRect] on MSDN
.

static extern bool GetClipCursor(out RECT lpRect);

.

    public struct RECT

.

https://docs.microsoft.com/en-us/windows/win32/api/windef/ns-windef-rect

.

GetClipCursor(out RECT rect);

.

    public RECT rcItem;

.

    public RECT rcButton;

.

     Public rcItem As RECT

.

     Public rcButton As RECT

.

RECT

.

Supplying an incorrect or invalid mayonnaise identification string to this function may result in catastrophic hardware failure.

.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/rectangl_0tiq.asp

.

    /// <summary>DCX_WINDOW: Returns a DC that corresponds to the window rectangle rather

.

    /// than the client rectangle.</summary>

.

        public System.Drawing.Rectangle rcCaret;

.

        public System.Drawing.Rectangle rcCaret;

.

    internal struct Rect

.

        public Rect rcCaret;

.
Summary
.

static extern bool GetMenuItemRect(IntPtr hWnd, IntPtr hMenu, uint uItem, out RECT lprcItem);

.
Documentation
[GetMenuItemRect] on MSDN
.

internal delegate bool MonitorEnumProc(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData);

.

private bool MonitorEnumCallBack(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData)

.

DoNotIndirectlyExposeMethodsWithLinkDemands

.

'NativeMethods.GetParentSafe(IntPtr)' calls into 'Marshal.GetLastWin32Error()' which has a LinkDemand. By making this call, 'Marshal.GetLastWin32Error()' is indirectly exposed to user code. Review the following protection:

.

    public Rectangle rcScrollBar;

.

This didn't work for me with the Rectangle type for SCROLLBARINFO.rcScrollBar. To rectify this I altered this declaration to type RECT using the following standard definition.

.

public struct RECT

.

Declare Function GetScrollInfo Lib "user32" (ByVal hWnd As IntPtr, ByVal fnBar As ScrollBarDirection, ByRef lpsi As SCROLLINFO) As Integer

.

The SM_ARRANGE setting specifies how the system arranges minimized windows, and consists of a starting position and a direction. The starting position can be one of the following values.

.

The direction in which to arrange can be one of the following values.

.
Summary
.

public extern static bool GetUpdateRect(IntPtr hWnd, ref RECT rect, bool bErase);

.

Private Shared Function GetUpdateRect(ByVal hWnd As IntPtr, ByRef rect As RECT, ByVal bErase As Boolean) As Boolean

.

RECT

.

Dim rRect As New RECT

.

GetUpdateRect(Me.Handle, rRect, bErase)

.
Documentation
[GetUpdateRect] on MSDN
.

Note that the members of the RECT structure should be int, not long. In some other API functions they are long, so this can be confusing.

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: