|
Sir,
I want to know the drive where the currently running operating system is installed .Can you please send me code in vb.net programically.
Thanks and regards
Amaneet Brar
|
|
|
|
|
Hi,
Environment.SystemDirectory or Environment.GetFolderPath(Environment.SpecialFolder.System) should be what you are looking for.
|
|
|
|
|
Sir,
I want to protect my files and folders by applying password .Can you please send me any code project in vb.net?Sir, I am not storing password protected folder or file name or password in databases.
Thanks and Regards
Amaneet Brar
|
|
|
|
|
The short answer is "you can't do this."
The long answer is "you can do this." But only if you have VERY intimate knowledge of NTFS and can write file system filters and extensions. Is this wise to do is VB.NET? Nope. Not even C# either. The Managed languages are too high a level to write something like this efficiently.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sir,
Can you please suggest me any language to perform this task.Actually now a days i am working in Asp.net, vb.net , C#.
Thanks And regards
Amaneet Brar(from India)
|
|
|
|
|
Hands down, C++. Nothing else is going to do it for you.
It would also help if you had a VERY in-depth knowledge of NTFS, writing device drivers, file system extensions, file system filters, and the Windows Device Driver Development kit.
If you have no experience with any of this, you've got about 1 years worth of research to do...
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 20:19 Sunday 14th May, 2006
|
|
|
|
|
Thank You for the suggestion
Regards
Amaneet Brar
|
|
|
|
|
Iam Sivakumar.
I developed an application in VB.NET. Now I want to know how to create an EXE that could run on the PC where .NET is not installed.
Please Help Me.....
N.Sivakumar
|
|
|
|
|
I'm not sure, but I think it isn't possible. The least you need is the compact framework.
|
|
|
|
|
DH Julio wrote: The least you need is the compact framework.
The compact framework is for running applications on Pocket PC and Windows CE devices.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
|
|
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
|
|
|
|