Click here to Skip to main content
16,019,018 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Retrieve data from an XML *.config file. Pin
Brad Fackrell6-Jul-05 2:46
Brad Fackrell6-Jul-05 2:46 
GeneralCant get GetTitleBarInfo working properly... Pin
AndrewVos5-Jul-05 11:44
AndrewVos5-Jul-05 11:44 
GeneralRe: Cant get GetTitleBarInfo working properly... Pin
Anonymous5-Jul-05 14:38
Anonymous5-Jul-05 14:38 
GeneralRe: Cant get GetTitleBarInfo working properly... Pin
Anonymous5-Jul-05 15:39
Anonymous5-Jul-05 15:39 
GeneralRe: Cant get GetTitleBarInfo working properly... Pin
AndrewVos6-Jul-05 2:07
AndrewVos6-Jul-05 2:07 
GeneralRe: Cant get GetTitleBarInfo working properly... Pin
AndrewVos6-Jul-05 2:12
AndrewVos6-Jul-05 2:12 
GeneralRe: Cant get GetTitleBarInfo working properly... Pin
AndrewVos6-Jul-05 3:13
AndrewVos6-Jul-05 3:13 
GeneralRe: Cant get GetTitleBarInfo working properly... Pin
Anonymous6-Jul-05 9:12
Anonymous6-Jul-05 9:12 
AndrewVos,

Sorry, I was woring on it between other code so it didn't get my full attention or time, I think this solution should work now that I've had time to see what was going on. It works on my end.

'----------------------------------------

Imports System.Runtime.InteropServices

'----------------------------------------

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)> _
Structure Rect
Public rLeft, rTop, rRight, rBottom As Int32
Public Function ToRectangle() As Rectangle
Return Rectangle.FromLTRB(rLeft, rTop, rRight, rBottom)
End Function
Public Overrides Function ToString() As String
Return "Rect: " & ToRectangle.ToString
End Function
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)> _
Structure TitleBarButtonStates
Public TitleBarState As TBBStates
Public Reserved As TBBStates
Public MinState As TBBStates
Public MaxState As TBBStates
Public HelpState As TBBStates
Public CloseState As TBBStates
End Structure

Enum TBBStates
STATE_SYSTEM_UNAVAILABLE = &H1
STATE_SYSTEM_PRESSED = &H8
STATE_SYSTEM_INVISIBLE = &H8000
STATE_SYSTEM_OFFSCREEN = &H10000
STATE_SYSTEM_FOCUSABLE = &H100000
End Enum

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Ansi)> _
Public Structure TITLEBARINFO
Dim cbSize As Int32
Dim rcTitleBar As Rect
Dim rgstate As TitleBarButtonStates
End Structure

Private Declare Function GetTitleBarInfo Lib "user32.dll" ( _
ByVal hwnd As Int32, ByRef pti As TITLEBARINFO) As Long

Public Shared Function GetTitleBarInfo(ByVal Handle As Int32) As TITLEBARINFO
Dim TitleInfo As TitleBarInfo
'Initialize structure
TitleInfo.cbSize = Len(TitleInfo)
GetTitleBarInfo(Handle, TitleInfo)
' *debug* the information we got back
With TitleInfo.rcTitleBar
System.Diagnostics.Debug.WriteLine(" (" & CStr(.rLeft) & "," & CStr(.rTop) & ")-(" & CStr(.rRight) & "," & CStr(.rBottom) & ")")
End With
With TitleInfo.rgstate
System.Diagnostics.Debug.WriteLine(.TitleBarState)
End With
'return with the TitleInfo
Return TitleInfo
End Function

'----------------------------------------------------------
My last test Return was:

Last DLL ErrorBlush | :O

(51,33)-(318,59)

STATE_SYSTEM_FOCUSABLE


whew.. Hope this helps...
GeneralRe: Cant get GetTitleBarInfo working properly... Pin
Anonymous7-Jul-05 4:14
Anonymous7-Jul-05 4:14 
GeneralRe: Cant get GetTitleBarInfo working properly... Pin
AndrewVos7-Jul-05 4:40
AndrewVos7-Jul-05 4:40 
GeneralRe: Cant get GetTitleBarInfo working properly... Pin
Anonymous7-Jul-05 10:19
Anonymous7-Jul-05 10:19 
GeneralRegistry Entry (SaveSettings) Pin
Mtognetti5-Jul-05 10:35
Mtognetti5-Jul-05 10:35 
GeneralRe: Registry Entry (SaveSettings) Pin
Dave Kreskowiak6-Jul-05 2:59
mveDave Kreskowiak6-Jul-05 2:59 
GeneralRe: Registry Entry (SaveSettings) Pin
Anonymous6-Jul-05 8:24
Anonymous6-Jul-05 8:24 
GeneralSet folder permissions -- PLEASE HELP! Pin
spelltwister5-Jul-05 9:25
spelltwister5-Jul-05 9:25 
QuestionIs the IF statement the best choice for this? Pin
btoyer5-Jul-05 9:15
btoyer5-Jul-05 9:15 
AnswerRe: Is the IF statement the best choice for this? Pin
Anonymous5-Jul-05 9:29
Anonymous5-Jul-05 9:29 
GeneralErrorProvider: Clear ALL Pin
Brad Fackrell5-Jul-05 9:07
Brad Fackrell5-Jul-05 9:07 
GeneralRe: ErrorProvider: Clear ALL Pin
Anonymous5-Jul-05 11:26
Anonymous5-Jul-05 11:26 
QuestionStringFormat.Format16bppArgb1555 ? Pin
[Marc]5-Jul-05 8:36
[Marc]5-Jul-05 8:36 
AnswerI mean PixelFormat.Format16bppArgb1555 Pin
[Marc]5-Jul-05 16:23
[Marc]5-Jul-05 16:23 
QuestionHow to Share data b/t parent and child form ? Pin
Madni Abbasi5-Jul-05 3:51
Madni Abbasi5-Jul-05 3:51 
AnswerRe: How to Share data b/t parent and child form ? Pin
Dave Kreskowiak5-Jul-05 5:47
mveDave Kreskowiak5-Jul-05 5:47 
GeneralVBscript to output SQL stored procedure results Pin
brokenchode5-Jul-05 3:23
brokenchode5-Jul-05 3:23 
GeneralRe: VBscript to output SQL stored procedure results Pin
Dave Kreskowiak5-Jul-05 5:56
mveDave Kreskowiak5-Jul-05 5:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.