C# - Determine When A User Locks / Unlocks Their PC?

Jan 30, 2012

Possible Duplicate: How can I programmatically determine if my workstation is locked? Checking for workstation lock/unlock change with c#

I would like to determine when a Windows (XP, or 7) machine is locked, and unlocked.I would like to create a timesheet activity logging app, and pre-filling times in, with lunch, breaks taken, etc, would be very useful.Is it possible to pick up an event that fires when the Windows Operating System is locked and unlocked ?

View 3 Replies


ADVERTISEMENT

Way To Determine What Theme That End User Is Using

Jun 26, 2009

is there a way to determine what theme that the end user is using.for example im making a program where the glass is extended so if the end user uses the program on a computer that is not using the vista aero theme then the program will look different then it would if they were using the aero theme.how would i check to see if they have the aero theme and could i set the theme to aero from my program?

View 2 Replies

Determine If User Account Has Password

Mar 27, 2012

I need to be able to validate the windows password of the account that is currently logged in. I've managed to do this when the unit has a password. But if it does not have a password, passing an empty string does not work. It fails each time.I've been looking around, but haven't been able to find much on this. Does anyone know how to determine if the user password is empty?[code]

View 9 Replies

Determine Other User Of Excel File?

May 27, 2010

I am currently using the FileOpen method wrapped in a try/catch block to determine if a particular Excel file is currently in use or not.

When my app tries to access the file, I would like to be able to notify the user who it is that already has the file open. If I try to open the file in excel while it is in use, the message that Excel provides includes the network login of the user that has the file open. Is it possible to get this information via code so that I can tell the user of my app the login of whomever already has the file open?

View 1 Replies

Determine Current User's Email Address ?

Sep 25, 2008

Is there a 'simple' way to determine the current user's email address ? I want to automatically send an email when an application detects an unhandled exception, but would like it to come from the current user.I found this on the net and haven't yet worked out what its doing (although it seems to work). Unfortunately, as I'm not sure how it works, I also don't know what drawbacks there are to this technique.[code]...

View 5 Replies

Determine Form User Defined Control Is Placed On?

Jan 25, 2012

I'm writing a control that needs to check a property of the form it's placed in.Is there a way to do that?

View 1 Replies

Determine If The User Intended To Delete A File?

Jan 10, 2009

how i can able to determine if the user intended to delete a file. What im going to do is this application will be placed in a certain folder together with some files. And this program will determine if the user inteded to delete a file within the folder.

View 2 Replies

Determine What Characters The User Can Enter Into The Control?

Mar 2, 2010

In reading various answers regarding "masked TextBox Control, am I to assume that the masked textBox control uses a mask to determine what characters the user can enter into the control?

View 1 Replies

Determine Which Operating System The User Is Currently Running?

Nov 12, 2010

I'm trying to get an application to determine which operating system the user is currently running and use that to decide what to do. For example, a user uses the program and they're using Windows 7. I want it to know that and use predetermined variables throughout the program for Windows 7. Likewise if they're using Vista or XP/Macintosh.

View 4 Replies

Allow A User To Input A Word Or Phrase And Then Determine If It Is A Palindrome

Dec 8, 2011

I'm working on a problem where i have to allow a user to input a word or phrase and then determine if it is a palindrome (a words that reads the same forwards and backwards) . It also says that the program should use a Boolean-valued function procedure named IsPalindrome that returns the value True when the word or phrase is a palindrome and the value False otherwise.

View 3 Replies

Asp.net - Pass A Variable To User Control To Determine Display?

Nov 28, 2011

I've found various C# examples here, but I can't seem to get a VB version working.I want to be able to pass a simple variable into a User Control to determine whether it shows a certain section of data.It's basically a Customer Data form, and in some circumstances I need to show a line with the customers account number and sort code, and in some I don't, so my user control:

<controls:customerForm ID='customerForm' showBankDetails="no" runat='server' />

But I can't work out what to do with the showBankDetails variable in Code Behind to stop it from rendering that section, or simply hide it with a CSS snippet.How do I access that variable in the code behind using VB.NET?

View 1 Replies

Determine If Acrobat Reader Is Installed On User Computer?

Mar 8, 2009

I am creating a project with VB2008 Express Edition. The end result will be a CD containing tech manuals in pdf format which will be accessed via various buttons on a form. I am going to include Acrobat Reader Redisributable on the CD which the user can install by pressing a button on the form if required. What I want to do is this:- When the user inserts the CD into the PC, the form will load.When the form loads, I want to search the users PC to determine if Acrobat Reader is installed.If the Acrobat Reader program is not found on the system, then display a MessageBox to inform the user to install the reader from the CD.Would this involve searching the users registry? I would need to insert in my Form1_Load sectionTarget systems would be Windows XP/ Vista with programs on the C: drive as default.

View 4 Replies

Determine If User Or Program Made Change To Control

Mar 15, 2010

I have numberic updown control in my app. There may be times when I want to programatically change the vlaue (in which case I don't want to ValueChanged event handler code to run). There will certainly be times when the user makes a change (in which case, I would want the event handler code to run).

[Code]...

View 5 Replies

VS 2008 Determine If User Has Scrolled To The Bottom Of A Control?

Aug 22, 2010

I am modifying some code I found here to test to see if a user has scrolled to the end of the control. In this case the control is a Crystal Viewer but I posted here because I think the issue is based on the vertical scrollbar not the Crystal Viewer itself.

The code flags an error at

Me.CRViewer.Controls.OfType
Indicating 'OfType' is not a member of 'System.Windows.Forms.Control.ControlCollection'.

I understand the concept that I can't reference something that it is not but I don't know how to fix it. The original code was for a DataGridView.

The ultimate goal (not finished) is to find out when the user has used the mouse or possibly the scroll bar itself and if it hits the bottom of the page of the viewer, then trigger a new page so it looks like they can just keep using the mouse to scroll.

Public Sub New()
Me.InitializeComponent()
Dim vscroll As VScrollBar = Me.CRViewer.Controls.OfType(Of VScrollBar)

[Code]...

View 9 Replies

VS 2005 Determine And Alert User While Entering Password To Login?

Mar 13, 2010

I have created an application which asks the user to enter password to login.Now how can i inform the user(if his caps button is on) that his caps button is on while he is entering his password?

View 3 Replies

.NET App Locks File

Feb 2, 2010

I;m really new to VB.NET and desktop application development. Simplified this is what is happening in my application: [code]The last line will throw an Exception saying that img1 cannot be moved because it is in use. So my application is still using it, but how to make my application stop locking the file? There is nothing keeping a refrence to it (as far as I see)

View 2 Replies

C# - ASP.NET Locks Up Only In A Single Browser?

Apr 28, 2009

I have a complex application running on IIS7 and Vista. It usually works ok but sometimes during longer processing threads/pages it seems to block(appear like there is no more wp's), but it blocks only on a single browser. Eg I have firefox open and go to a page which sleeps for 10 mins, then I hit other normal pages and these pages also seem to block. But in internet explorer the pages run really fast. This only happens for 2 minutes at then they are back to normal, the original page is still loading in the background but now those other pages are working ok.

Note, I have changed, network.http.max-connections, network.http.max-connections-per-server, network.http.max-persistent-connections-per-proxy, network.http.max-persistent-connections-per-server all to 100. Maybe I have missed some?

View 2 Replies

Open Files Without Locks?

Apr 20, 2010

I am opening a bunch of excel files to read them line by line into sql at the moment - but ran into a small problem. When using something like this[code]...

if I then open the file manually, it will error the code. I put in some error protection, a try...catch block and if it errored, it will keep trying to open the file. If it opens the file, that means I closed it manually and the program will pick up from where it left off.

This isn't very successful, as other errors won't be trapped right, and the program will crash if I don't catch the errors (they cause an infinite error looping).

Is there a way to have the app/file open somehow, so if I open any other excel file, it won't open, or it will open but not error out in the program cause it's now physically open?

View 4 Replies

Put Permanent Cap Locks On A Form?

May 6, 2011

Put permanent Cap Locks on a Form?

View 18 Replies

Concurrency Control And Locks In Multithreading?

Apr 14, 2010

i understand that web service creates its own sessions so thats no problem to multi-thread. but i am writing my results into the database and files. how to do i do my concurrency control for writing into file and database here, can i do it on my calling app which is a console app or i will have to do it in my web service. i am not returning anything to the calling app.

View 7 Replies

Program Locks Opening EXCEL?

Apr 3, 2012

I'm developing a new program to add rows to a spreadsheet using VB.NET on a Windows 7 64 bit computer with Office 2010 installed. I have done this many times in the past with slightly different setups with no problems. This program locks on: xlWorkBook = xlApp.Workbooks.Open(FullFileName)After several minutes HRESULT=0x80131c08.ErrorCode=0x0 appears

I have to idea why it locks. The XLS does exist in the folder.

[Code]...

View 4 Replies

1 IDE Won't Release File Locks On Referenced DLLs

Mar 20, 2009

I develop an application through two multi project solutions.There is one solution for the data layer stuff and another one for the front end stuff.All the dlls are referenced in a startup project and have copy local = true. So the build output from the GUI solution and the dlls referenced from the data layer solution should be copied to this startup project's bin folder. This seemed to work without issue for some time, but after changing source control, after a rebuild of the data layer solution, I clean the GUI solution and get the following output: [code] I have researched this problem and it seems microsoft are aware of a problem, logged under MSB3061... but no solutions have been posted by MS. Several users have suggested stopping the indexing service from indexing bin and obj folders (I've done this). I've also ensured that none of the bin/obj folders are under source control. I downloaded FileMon from sysinternals and it says that devenv (GUI) has the file locks.

View 13 Replies

C# - Application Locks Up When It Should Get A Runtime Error During Debug?

Dec 18, 2009

I develop windows applications in VB.NET using Visual Studio 2008. Recently I reloaded my pc and moved from XP to Windows 7 64 bit. Now when I am debugging, when I should get a runtime error, the executable instead locks up when it should bring up the code with the line that it crashed on like you'd expect in debug.

This doesn't happen all the time, only when I get a runtime error in a separate assembly that is not in the assembly I'm debugging. It used to work fine, but now it locks up. If I run the executable outside of Visual Studio (without debug) I at least get a runtime error like you'd hope for. I don't even get that when debugging.

View 1 Replies

Crystal Report Viewer Locks Other Forms?

Feb 26, 2012

What will I do to allow other forms to perform while crystal report view is running?

Heres the code:

Public Sub printCurrentHistory()
If dt.Columns.Count = 0 Then
With dt
.Columns.Add("update_time")

[code]....

View 2 Replies

Functions Nearly Identical, One Works, One Locks Up The Whole Form?

Feb 9, 2012

I've have found answers here frequently in the past just from browsing. But now I'm completely dumbfounded.

I'm using Visual Basic 2010 Express, on Win7 32bit. My application talks to an Arduino via a virtual com port provided by a cheap Bluetooth to serial adapter. I use a text based protocol that is working fairly well. BUT one method in my code, taht seems functionally equivvalent to the other methods is locking up my whole window.

It does this whether I'm debugging or running the exe.Below are the offending method, and a simmilar one defined above it that works with no problems.

[Code]...

If I comment out the cal to write, everything works fine. Aside from me setting some state bools and playing with button titles in the first method, I can't see the difference as to why one works fine and the other hangs.

I really hope someone has some experience in the SerialPort object and VB that can shed some light on this.I've tried everything I can think of. I thought maybe it was the inline concatenation, so I dim'd a local and assigned the string to it, and passed that to Write. But I have another method that uses inline concatenation that doesn't do this.

View 1 Replies

Make A Program That Password Locks Any Folder?

Nov 23, 2010

I use VB 2008 express edition and i have this problem.I want to make a program that password locks any folder you want.(Using Icacls from command promt).My problem is that when i run the program

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If My.Computer.FileSystem.DirectoryExists(TextBox1.Text) Then

[Code].....

All this is done becouse i can't save the listbox contents in My.Mysettins.If anyone would be able to show me how to do it i would be helpfull.But please don't give me 50 lines of ununderstandable content.I want something that i will be able to understand becouse there no reason if i use it without knowing what it does.

View 1 Replies

Required Select Option That Locks After Selection

Mar 29, 2010

I have a combo box (named cboGrade) that includes three different options (3rd, 4th, and 5th). I want to make the user be required to select an option from the list and then once the selection has been made, lock the control until either the user finishes the game or clicks the button named btnBeginAgain. How do I do this? I'm using Visual Basic 2005 Express Edition.

View 3 Replies

Sending Email Via Form Button > Locks Up Until Sent?

Apr 25, 2010

I have a windows form. On it is a text box and send email button.When you click the Send Email, it sends the contents of the text box via the System.Net.Mail

Private Sub SendEmail()
Try
Dim MyMailMessage As New MailMessage()
MyMailMessage.From = New MailAddress("myemail@email.com")
MyMailMessage.To.Add("myemail@email.com")

[Code]...

View 12 Replies

VS 2005 - Four Types Of Locks Availbale In ADODB

Sep 28, 2009

1)What are different types of Cursors?

2)What are diff types of locks? In some sites-

Four types of locks availbale in ADODB

1.Optimistic
2.pessimistic
3.batch optimistic
4.readonly

In some sites Forwardonly , lock,adLockUnspecified

What are exact locks,can somebody tell me?

3) What is Z order Precedence?

4) dim X,Y as integer

They ask me X is of which datatype in VB & in VB.net? I told integer in both Vb & VB.Net,they told me wrong?

View 5 Replies

VS 2010 TCPClient - Program Locks Up For A Few Seconds?

Dec 21, 2011

I am making a program to test whether or not a host is online, assuming that host has blocked methods such as ping and netstat -t etc....

So I decided to try and connect to it, but the thing is every limitation I have set doesn't work. The program locks up for a few seconds (which I don't want in the first place) and I cannot terminate the client after say, 100ms of trying to connect.

[code]...

I have tried client.ReceiveTimeout but that didn't speed up the process, still takes the same amount of time for the program to respond.How should I go about testing if the server is up now? Or is there a way where the program wont lock for a few seconds as it does with the TCP method.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved