|
|
Does anyone have a suggestion for simply returning all current Window handles on the system, including the child windows? I have managed to return the parent window handles, but I have had issues returning child windows.
Here is some of my code.
<br />
<br />
Module mdlGatherHandle<br />
Public Delegate Function CallBack( _<br />
ByVal hwnd As Integer, ByVal lParam As Integer) As Boolean<br />
<br />
Public Delegate Function CallBack2( _<br />
ByVal prthwnd As Integer, ByVal hwnd As Integer, ByVal lParam As Integer) As Boolean<br />
<br />
Declare Function EnumWindows Lib "user32" (ByVal x As CallBack, ByVal y As Integer) As Integer<br />
Public Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As Integer, ByVal lpEnumFunc As CallBack2, ByVal lParam As Integer) As Integer<br />
<br />
Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hWnd As Integer, ByVal lpString As String, ByVal cch As Integer) As Integer<br />
<br />
Dim buf, Title As String<br />
Dim length As Long<br />
Dim i, g_TableHwnd As Integer<br />
<br />
Public Function Report(ByVal hwnd As Integer, ByVal lParam As Integer) As Boolean<br />
<br />
' Get the window's title.<br />
length = GetWindowText(hwnd, buf, 255)<br />
'Title = Microsoft.VisualBasic.Left(buf, length)<br />
'On Error Resume Next<br />
fMain.List1.Items.Add(hwnd)<br />
'On Error GoTo 0<br />
<br />
' See if the title contains the target.<br />
<br />
Return True<br />
<br />
<br />
End Function 'Report<br />
<br />
Public Function Report2(ByVal prthwnd As Integer, ByVal hwnd As Integer, ByVal lParam As Integer) As Boolean<br />
<br />
' Get the window's title.<br />
On Error Resume Next<br />
length = GetWindowText(prthwnd, buf, 255)<br />
On Error GoTo 0<br />
'Title = Microsoft.VisualBasic.Left(buf, length)<br />
On Error Resume Next<br />
fMain.List1.Items.Add(prthwnd)<br />
On Error GoTo 0<br />
<br />
' See if the title contains the target.<br />
<br />
Return True<br />
<br />
<br />
End Function 'Report<br />
<br />
<br />
End Module<br />
<br />
My ultimate goal is to be able to read all text in every application. This would be used for security purposes. ex. Checking to make sure users are not entering account numbers in web pages and so on.
Thanks for you help
|
|
|
|
|
I have a windows application project with several different forms. I don't use any parent/child MDI stuff, just hide one form before displaying another. The problem I'm having is that a user may maximize, resize, or reposition a form and when they switch back to the main form I can't get the main form's windowstate/size/position to set to the global variables I have that store these values whenever the active window is changed. Here is my method to set the form's properties to the global variables.
Public Sub LoadFormSizeLocation(ByRef frm As Form)<br />
frm.Location = New Point(gblIntX, gblIntY)<br />
frm.Width = gblIntWidth<br />
frm.Height = gblIntHeight<br />
frm.WindowState = gblWindowState<br />
frm.Refresh()<br />
<br />
End Sub
In debug it appears that the frm.Location, frm.Width, and frm.Height get set to my new point, but once it hits the frm.Windowstate = gblWindowState line the frm.Location, frm.Width, and frm.Height revert back to the maximized location/width/height.
I'd appreciate any help or advice.
-- modified at 12:43 Wednesday 24th May, 2006
|
|
|
|
|
Hi al do any one know if it is possible to control two soundcard together using directX?
Please advices
|
|
|
|
|
I have create a application on every computer in my office,
all of them are user a same domain (let say "myDomain"),
How can I get myDomain computer list?
And then send message to come of computer.
How can I do so ? TCP client /server ?
|
|
|
|
|
1. We have VB code that was developed in VS2003 that we need to access from VBA code in Excel 2000 (under Windows 2000 Professional if it matters). I have VS2003 on my machine but the users of this application will not.
2. The VB code (I have the source) came with the following instructions to export this code to an app that uses COM
a. Create a key file: "C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\sn" -k key.snk
b. Compile/Build the the wrapper dll. NOTE: A HARD-CODED reference MUST BE INCLUDED in the AssemblyInfo.vb file. See the source code for details!!!!
c. Attach the key to the object: "C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\sn" -i key.snk RunRegressionCOMWrapper
d. Run the gacutil program to make it visible to excel and other COM object users: C:\WINNT\Microsoft.NET\Framework\v1.1.4322\gacutil /i RunRegressionCOMWrapper.dll
3. I was able to access and use the DLL on my machine after going through the above process, however we have been unable to deploy it on other machines. On other machines we copy the files, use the same hard-coded path and perform steps c & d above, the VBA code compiles on the new machine but can not create the object giving an “error 429 Active X can not create object”
4. What are we missing? Does this process require VS2003 on the deployment machines? If so is there a better solution?
|
|
|
|
|
so i hope that i have the correct form..
I have a PopupControlExtender which works great... The only thing is that i have a dropdownlist control in the PopupControlExtender and when the popup control pops up and i try to walk the list the list stays visible and the PopupControlExtender disapears.
In other words when i take focus off of the PopupControlExtender and onto the ddl that is nested in the PopupControlExtender the PopupControlExtender visiable= false and the ddl stays visible.. So therefore i have a ddl floating in the spot where the PopupControlExtender was once at?
What can i do about this?
Erik
|
|
|
|
|
I'm creating a windows service in VB .NET that moves some files around after a user logs off. Detecting the logoff is easy, moving the files around is easy, but I would like to find a way to display a form while the machine is logged off indicating that work is still being performed. I can create a form with a user logged on with no problems using the "Allow service to interact with desktop" checkbox, but have been unable to find a way to display the form before login. Any suggestions? Thanks.
|
|
|
|
|
Josh McCune wrote: but I would like to find a way to display a form while the machine is logged off
Can't be done using normal methods. The logon screen is being shown on a seperate desktop. Even screen savers are shown on a completely different desktop.
You could probably enumerate the Window Stations, and the Desktops in them, to find the one that the logon screen is on. You'll then have to switch to that Desktop in your code, provided the account your service is running under has the permissions to call SwitchDesktop. You can find out more about this here[^]. Oh! There is no built in support for this in the .NET Framework BCL.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello there
My requirement is to use the "A word or phrase" option of a window inside my application. and display the result in the search result screen which I build.
Rizwan Bashir
|
|
|
|
|
I'm doing some standard date validation using the IsDate() function and have found a scenario that I wasn't expecting as follows:
MessageBox.Show(IsDate("01/Jan/2006").ToString) 'Returns True as expected
MessageBox.Show(IsDate("01/Jan/200a").ToString) 'Returns False as expected
MessageBox.Show(IsDate("01/Jan/200z").ToString) 'Returns True, unexpected!!!
Can anyone help?
Cheers, Ian.
|
|
|
|
|
I think that the "z" is interpreted as time zone zero, e.g. Greenwich mean time.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for that.
Is there a way to exclude time zone information from the text string so that 'z' becomes an invalid character using standard VB.Net functionality? I don't want to get into writing additional functions for date validation when VB.Net should be doing this for me.
Cheers, Ian.
|
|
|
|
|
Use DateTime.TryParseExact.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks, I'll give this a try.
Cheers, Ian.
|
|
|
|
|
Message Error show :Procedure declaration does not match description of event or procedure having the same name. This error message is showed in procedure
Private Sub adcVT_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
With pRecordset
If bThem Then Exit Sub
If .EOF Or .BOF Then Exit Sub
txtMaVT = IIf(IsNull(!MaVT), "", !MaVT)
txtTenVT = IIf(IsNull(!TenVT), "", !TenVT)
txtDVTinh = IIf(IsNull(!DVTinh), "", !DVTinh)
txtMaVT_DVTK = IIf(IsNull(!MaVT_DVTK), "", !MaVT_DVTK)
If !LoaiVT Then
chkVattu.Value = 1
Else
chkVattu.Value = 0
End If
End With
End Sub
- I don't find procedure having same name when I check my project
- I think there 's error dll in my pc but I don't know them. Can u help me what 's error dll or why error ?
Thank u alot !
Baggio
|
|
|
|
|
Hi Baggio,
I am just guessing here because the "smile" covered up part of the error.
I think that I had this problem once. My error was located in this part of the code:
baggioberto wrote: Private Sub adcVT_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
The problem was that I tried to type in the procedure's heading instead of selecting it from the drop down boxes. I had one letter wrong which generated the error. You can also get this error if you try to put code for a different procedure under the wrong heading.
I know that I haven't explained this very well but I'm hoping that you can figure out what I'm trying to say.
Good luck, Garner
|
|
|
|
|
Sir,
i want to know the currently logged username programically .
Thanks
|
|
|
|
|
you can get the currently logged in username with 'System.Environment.Username'
Tosch
|
|
|
|
|
|
|
A simple search would have given you lots of answers[^].
|
|
|
|
|
hello
i have to set a property map feature using google map.
and i don't get any solution that how can i link this google map with particular property.
plz help.
thanx
|
|
|
|
|
HI to all
I need a source code in any one one the following lanaguge of a program
java, VB, C, C++, VB.net
which objective is to block the web site
like diiferent "Web site blokcer"
a complete source code if any one have please please send me at
mnadeem_2000@ayahoo.com
muhammadnadeem_2002@hotmail.com
Please its URGENT
-- modified at 4:11 Friday 12th May, 2006
|
|
|
|
|