does any one knows why is it that when i call a WM_ message
for the API "SendMessage" function,
it is always an empty WM_
while it suppose to be signed &HD or &C1 values or something like that ?
Printable View
does any one knows why is it that when i call a WM_ message
for the API "SendMessage" function,
it is always an empty WM_
while it suppose to be signed &HD or &C1 values or something like that ?
i don'ts know what yous mean?
Did you remember to define the constant?
this is exactly my problem
lets say i want to use the WM_CLOSEWINDOW,
how do i know what to define ?????????????
const WMCLOSEWINDOW = &???????
you find out
it's WM_CLOSE
the value is &H10
Private Const WM_CLOSEWINDOW = &H10
;)
Use the API viewer
Thank you so much !!!!!!!!!!!!!!!!!!!!
:-)
can you tell me how can i use sendMessage inorder to resize
a remote window from within my program ?
i intend to turn a remote dos window in to a FULL SCREEN mode, but no mater what i do, it wont work. i tried everything !!
can you also tell me how/where can i look for those codes my self ?
thank you again.
something like this?
VB Code:
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long Private Sub Form_Load() Dim MyStr As String Dim dosHand As Long dosHand = FindWindow("tty", vbNullString) MyStr = String(GetWindowTextLength(dosHand) + 1, Chr$(0)) GetWindowText dosHand, MyStr, Len(MyStr) AppActivate MyStr SendKeys "%~" AppActivate MyStr End End Sub
?
thanx again
:-)
you see, the code you gave me sets the dos window to a normal size, i tried playing with it, but..
i tried already:
ShowWindow hwnd, 3 (API function), but it will return a big dos screen (not totaly full screen)
then i tried:
SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, wFlags)
but it only sets the focus to the minimized tab of the dos window on the toolbar, but not resizing it.
what happenes it that when i move from the dos program to the vb program, it makes the dos window minimized, and i want to return from the vb program to the dos program but it wont return to the dos's TOTALY FULL SCREEN mode (the one you can make by pressing Alt & Enter on a dos window)
i hope you are not troubled by me but chalanged :-)
thank you
can anyone please help?