Find Last Window Lock / Unlock Time In C#?
Feb 25, 2011I want to find the wheather my machine(XP installed) is locked or unlocked today.
View 1 RepliesI want to find the wheather my machine(XP installed) is locked or unlocked today.
View 1 RepliesI would like to create a program which able to lock several files from unauthorized person to use and unlock it when the authorized person wants to use
View 12 RepliesHow can we lock a file or folder so that it couldnot be opened by any1
View 6 Repliesis there a possible way using vb.net to lock and unlock PC Desktop? so that we will have restriction for each user? what code should i write?
View 4 Repliesi'm trying to Handle the Micosoft.Win32.SessionSwitch Event, so when Windows is going to be locked by the user, i will simply write a line to the console.When it's going to be unlocked, the same.
Here's the code:
Sub Main()
AddHandler Microsoft.Win32.SystemEvents.SessionSwitch,
_ SystemEvents_Sessionswitch()
Console.ReadLine()
[code]....
i want to build a software which can lock the computer (not to lock the computer as i lock in windows) and then another software that can unlock it.
View 5 RepliesMy request is a difficult one. What I wish to do is unlock a machine when my program recieves a command. I have searced a lot and found nothing which helps. The reason I wish to do this is simple. I have created an application which allows me to send SMS messages to my computer via twitter. One of the commands is to lock the work station. This was implemented without any problem. However, I do not know how to unlock it when the application recieves the unlock command.
View 22 RepliesSo far, i get know the way to lock and unlock file.. but in my project, i want to lock and unlock the *.exe program.
View 4 Repliesborder of that said window so the only place the mouse can't click the titlebar and the minimize,restore, and maximize button. The height of the titlebar depends on what OS the user is using so I'm having trouble because I can't give a definite value for this. How do I detect the height. and also for border i'm not sure if the borders have different widths with different operating systems. I'm using windows XP on classic mode, when I change to the themed mode, the height of the title bar changes so it won't work.
View 3 RepliesAt this moment, i am able to lock all the file path which taken from database. BUT, when i choose to unlock 1 particular file, it caused me some error.
View 7 Repliesi try to make an application that can communicate with the door magnetic device. So, when the visitor come to my house, i can control the door OPEN or LOCK using my PC. I;ve created a window form using VB.NET with button "OPEN" and "LOCK". Can anyone provide me some advise how to do this, or with some source code together found in other website?
View 3 RepliesI am trying to find the handle of the child window for the Yes button in the User Account Control window so i can click it. This window has a structure with a few child windows with the same name.
Dim hwnd As IntPtr = FindWindow(Nothing, "User Account Control")
Dim hwnd2 As IntPtr = FindWindowEx(hwnd, 0, "DirectUIHWND", vbNullString)
Dim hwnd3 As IntPtr = FindWindowEx(hwnd2, 0, "CtrlNotifySink", vbNullString)
Dim hwnd4 As IntPtr = FindWindowEx(hwnd3, 0, "Button", "&Yes")
There are multiple CtrNotifySink with its own Button child window or other child windows. How do i search thru the different CtrNotifySink window to find the one that contain the Yes button so i can send a click to it? I do need to find it before i can send a click, right? because i try just sending it to the main window with sendmessage and nothing happen.I even try sending it directly to the handle found by spy++ of the yes button with bm click but nothing happen?
I want to verify if the current system time falls within the specified time range between 7:30pm - 9:00pm. If it falls within the specified time range then display a message.
View 7 RepliesI'm converting a project from .net 1.1 to 3.5, and everywhere the following is used in the markup:
Design_Time_Lock: true
e.g.
<asp:linkbutton id="lbRun" style="Z-INDEX: 111; Design_Time_Lock: True" runat="server">Run</asp:linkbutton>
[Code]....
I've read up about the Design_Time_Lock attribute, and I can see when it will and won't be generated. However I don't really understand the point of it. And- more importantly- can all instances of it be safely removed throughout the code?
I have different query in access and vb.net.Sometimes record are inserted sometimes not.All coding is correct.when record is not inserted,it gives an exception that'could not open;database is locked'What is this exception???My database is not having password.
View 4 RepliesI am trying to find all text from a slightly older application. The thing is, the old scripit from windows NT finds the text I need no problem, but I cant seem to get it myself.
I find the main window, and cycle through its children, but must be looking at something wrong. I am missing 2 things: The title of the app has the name, and then some status information, the status information does not show up on the window title info. The text in the application itself does not reveal itself to me either
Here is a code snippet of how I try to get the info out:
Private Sub gettext(ByVal hd As IntPtr)
Dim Hwnd As IntPtr = hd
'Alloc memory for the buffer that recieves the text
[Code]....
I use VB with Visual Studio 2010.I have use the example code from the Microsoft Homepage: [URL]Its work fine!Now I have an application on my computer, there I want to send keys via SendKeys to another application.In the sample code is listed:
Dim calculatorHandle As IntPtr = FindWindow("SciCalc", "Calculator")
I am opening a PDF file in Acrobat then am sending the Menu keys using sendkeys.AcroHandle gets the value but the send keys always working with my .Net IDE. It is opening the .Net IDE file open menu. It supposed to open Acrobat File open.
AcroXAVDoc.Open(FileName, "Acrobat")
AcroHandle = FindWindow(vbNullString, "Acrobat - Adobe Acrobat Professional")
If (AcroHandle <> 0) Then
SetForegroundWindow(AcroHandle)
System.Windows.Forms.SendKeys.SendWait("%(FO)")
End If
what I am trying to do its to automate a user interraction by code.First I have a button named "start" once pushed I navigate with webbrowser to download a file. What I try to do it is to find the window "File download" by his title name, I allready made a seperate thread to loop into to list of process until it found the window "File download"
Where I need help, it is with the process list. I try that code below but I don't see the process "File download" in the list.and once I found it I would like to use sendMessage() api to simulate the click of save.I would like to find another window after to catch the window "save as" and click save and if the window that ask for overwriting appear I would like to find it too and click yes.
Why I use webbrowser instead of httpwebrequest it is because the web site required to login, i try using cookie, etc. No success so I decided to use webbrowser, I navigate first into the login page, I login manually and once it is done I can click the button to start downloading. I want to make an automatic download loop, I have lot of files to download on that site, sometimes .doc and other times it is .pdf
I didn't found a way yet how to force webbrowser to ask for downloading .pdf instead of opening it in acrobat, if someone can help me for that point too
[Code]...
I know how to display attached modules but how do i check if a file is locked by a dll.
View 1 RepliesI was wondering if anyone knows if there's a way to programatically unlock the currently logged in account (i.e. when the user hits Windows + L), or even to just unlock the screensaver password.
View 1 RepliesFind & replace by error is docked such that I cant see the code while I am using "Find".
I could not undock the window despite various attempts.
I'm trying to be able to get the caption of the currently active window. I've figured out that I should be using GetForegroundWindow, but when I use it I'm just getting a long string of numbers, which I think is the handle. How do I go from that to the actual caption?
View 4 RepliesI'm trying to make a program that runs programs using image analysis. It will Recognize images on screen so that they can be clicked. Well when i was working on it i had an ideal. I could get the edges of the screen/window i'm using. Make a calculation to grid off areas of parts of the screen. Making the program not have to process the entire screen every time. So that it only has to call to process a grided off zone.
How every i dont know how to get the edges of the screen/window. Could some one link info on how to do it or give some code snippits. Thx for an info that you give.
When I was coding a program, I was able to find the result of a function in the Immediate Window by using:
View 3 RepliesHaving an issue with a certain application ever since and update, and now errors out with a unique window title. How can I find if the window title exist in VB.Net 2008?Found this code, but looks like its for 6:
vb.net
Sub Tester()
MsgBox Window_Exists("PowerBuilder Application Execution Error (R0039)")
End Sub
[code]....
Also is there anyway to use a variable in the name title... say just the first 3 words of the title followed by somestring that is the equivalent of *?
we use a terminal emulator called facetwin to run our main unix based applicationswe want to attach a small document scanner and magnetic strip reader to the system this runs oncurrently we have a magnetic reader that emulates a keyboard so it sends keystrokes back to the unix app. however the new scanner does not.i can get around this by having the unix app send a special command that facetwin understands so it tells the local windows machine to run my vb application that controls the small document scannermy vb app then sendkey's back the relevant info.this is all great and works fine, yet i have a problemthere are 3copies of facetwin running at anyone time all are logged in as the same user but maybe processing diferent things.
View 2 RepliesI need to find an external application's handle using findwindow api by inputing the first word only.
Example instead of FindWindow(vbNullString, "Untitled - Notepad") typing FindWindow(vbNullString, "Untitled")
Dim MainHwnd As IntPtr = FindWindow(Nothing, "NameOFtheSoftware - Trial Version (0 days)")
'MenuClick(MainHwnd, CType(2, IntPtr), CType(0, IntPtr))
I am using the name of the window to do the clickingaction, But the software is a trialversion and changes the days amount. So how to make it that it doesnt need to find the whole windowname, but just a part of it.For Example: NameOFtheSoftware
i am using vb2008: now i can find the parent window with this block of code
Private Sub Button11_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
Dim theHandle As IntPtr
theHandle = FindWindow(Nothing, TextBox9.Text)
[code]....
i do know how to use sendkeys, but if i use that and click on something else while i send the keys it picks up that window and trys to send the keys there thats what i dont wantnow using the top block of code along with this module how can i get the childwindow with focus on the "Richcntl" box to send text to itin a diffent click button:in this block:
Private Sub Button13_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
End Sub