|
How we do we watch live video in windows media player? and how do we scan for the devices availabe in our system.
Tapasvi
|
|
|
|
|
hi guys,
Please tell me how i could get windows path(i.e. C:\windows, d:\winnt etc.) where it has installed, from vb code.
Thanks.
|
|
|
|
|
Environment.GetEnvironmentVariable("windir")
|
|
|
|
|
Thanks for suggession, could u tell me plz how we initialize the environment object variable in VB.
|
|
|
|
|
Just assign that call to a string, e.g.,
Dim x As String = Environment.GetEnvironmentVariable("windir")
Console.WriteLine(x)
This assumes you are using VB .NET or 2005. But are you using VB 6? I don't know the equivalent method for that.
Kevin
|
|
|
|
|
|
I create a VB.net(2005) application and I create the executable file (exe) how can I run it in a pc without installing vb.net (2005)
Sorry for this question :S
thank's
DADAX
-- modified at 17:47 Friday 12th May, 2006
|
|
|
|
|
|
|
how can i show my msql2000 database table in vb.net datagrid
|
|
|
|
|
|
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.
|
|
|
|