show a service starup type (auto, disabled, manual). I have tried looking in to the system.seviceprocess.servicestartmode, but all that does is sets the startup type. how to use it to detect the type.
This is my first post in forum. Is it possible to read specific Event ID from remote machine?. In EventLog class there is no option to restrict the return data. WMI allows us to query specific logs, Similarly is any option in VB.NET?
Is there any work around to this Error: [URl]..I have a Windows Service that needs to interact with the desktop (actually just the Systray). This service is working fine under WinXP, but not under Vista. After reading the article above I find it difficult to comprehend that Microsoft would simply just "do away" with support for "Interact with Desktop" because of a flaw in the OS (this is an OS problem, not a developer issue). I've never heard of any professional organization removing a feature because they can't figure out how to make the feature secure?? I'm hoping this article is just out dated or was not for the released version of Vista.Under Vista Business x64, the option to "Allow service to interact with desktop" is a check box in the Service Properties (Log On) tab, so if this feature isn't available for Vista, when is the option displayed?? But it does appear that the check box does nothing when checked.
I'm writing a windows service (MacTimeFix.exe) to fix the Windows time on a Macintosh (it's like this: i live in Moscow (GMT+03:00), and Mac OS thinks that the system time is GMT+00:00 and adds 03:00 to it< and Windows thinks that system time is the local time).I need to execute my code when my VB app is closed. (it happens with the shutdown of Windows) The form is invisible (hidden), and the user mustn't click anything except windws shutdown button. It is a service. When i write a Form1_FormClosing sub, it works only on Alt+F4 or CloseButton and doesn't work when the app is stopped from Windows Task Manager or whatever also.I need a way to execute sub when app is closed with taskkill (without /force) or a way to execute a several app on Winshutdown.
Here is my code:
Public Class Form1 Dim SystemMary As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load SystemMary = Mid(TimeString, 1, 2)
I use VB 2008 Professional. Initially, when I'm in debug mode all the windows are visible: The Solution explorer, Server explorer, Auto window, the tool box, etc. Suddenly, whenever I'm in debug mode only the code editor is visible. I have tried opening them from the View and Window Menu but they don't show up until I exit the debug mode.
I have a windows service that utilizes an infinite loop and thread.sleep. The sleep time for the thread is 10 seconds.When the service is initially started AND has work to do (data exist in SQL), it immediately does it's processes. It continues to be responsive and process tasks every 10 seconds as long as it has work to do. If no data is present in SQL for an extended period (i.e. 15-20 minutes) then the service starts responding very slowly. It will eventually pick the data up and process it, but it takes more like 10 minutes instead of 10 seconds.
i use datagrid view in my project in Windows form. During run time there are 8 column, among these, in one column(PURPOSE) there is a value which is repeated 3-4 times depend on Query. now i want that i merge these 3-4 cell in PURPOSE column..so that the data which is repeated 3-4 times can only 1 time..
I'm calling a method and passing Time and TimeOfDay to it, then in my method, I'm populating a datagrid of entries. I'm not actually trying to set the System time, just record read it but I'm getting an error saying 'Insufficient permission when setting system time'. This didn't occur in XP, but does in Windows 7.
Windows resets the IDLE time every time the user touches the keyboard or the mouse. My application needs to reset the IDLE time at specific moments, but how to do this programmatically.
The following does NOT reset the IDLE time using VB, C# or QT4. - Programmatic mouse movement / click. - Programmatic keystroke. Somehow Windows knows these actions are simulated. How can I reset the IDLE time?
i want to capture the system logoff time and i have to store the time in .txt file. when ever the user logging in and logging off i have to capture the time and store the time in .txt file.i konw how to use windows services.but how to capture the log off time and log on time?
i am using MS access as my database and VB.net(2008) as my programming.my table has four columns.my table name is myRecordtbl and the columns are ,myid, myname, starttime and endtime.now i know how can i insert into table. but i got hard how to display times then i can choose to insert into my table.the time should be in the form of Hours:Minutes:Seconds AM or PM with up and down arrow.then when i select the time and hit ADD, it should insert into my table.
i have a combobox that has 3 cases. case "0" opens a dialog saying, "Not a valid choice"but case "1" and case"2" open up there own separate forms. (FormMain and Form3)How do i make it so if Form3 is open FormMain Can not be opened, And a messagebox appear saying so. I do not just want the ".hide" function. I already have that set.I have tried a few differant things, none of which worked. And i tried them in the formload and in the combobox selected index
Is it possible to shut down windows say if the time is around 6:00 pm using the VB.net code. has any one done that. I have the code to kill my program when it is after say 6:00 pm, I would like to shut down windows along with it. I can post the code for killing my program (actually I got it from here) if anyone wants it.
I have a print driver Windows app that uses a web service to connect to an authenticate its credentials. But the problem is, I don't want a user to login every time they want to print. Basically I want the login part of the app to only pop up if the printing functionality hasn't been used in 20 minutes.
tell me what would be the best way to go about this? I'm unfamiliar with Timer functions. This app isn't always on. It's on briefly then closed. So I need a solution where the timer is set somehow on the computer.And I don't want to write data to a text file when it can just be edited..
I did a MDI Winforms application and noticed behaviour that I have a question for. If one of the forms is opened with a Maximized Window State and another form is opened with a Normal Window State, the form Window State that used to be Maximized is changed to Normal. Can several windows be open in a MDI form with different window states at the same?
How can we schedule a windows service to run at specific time ( lets say every day morning at 6:00 AM )
For this i had a timer thread to sleep for 24 hours like below and start the service exactly at 6:00 AM ( but the requirement is.... no matter when the service starts, but it should run at 6:00 AM .... So how to do this )
Bottom Line : How to schedule Windows Service to run at specific time ?
On windows authentication (intranet web application). When the session is about to timeout, the client should be presented with a POP-UP that asks to click OK to extend the session or else cancel to timeout the session. Which is the better way to accomplish this task. By Using Ajax Call or By handling it in the code behind file when the session (userid) is nothing.
1. Does Windows load the .Net framework at boot time? How can I check (eg. some DLL running in the background)? How much RAM does the framework use, so that I check I have enough to pre-load at boot time? Once loaded, will it stay in RAM?
2. What is the point of JIT once the application is installed on a given computer? Are there drawbacks about compiling into binary code applications that I use often on my own computer so that no time is wasted recompiling the application every time it's ran? If not, can I compile apps for which I only the .Net bytecode?
3. Is the framework downward-compatible, ie. will a 2.0 application run if I only have the 4.0 framework installed?
Knowing the hWnd and the Title of all the desktop windows, I whould like to order them by start time order (them order on the task bar)In your opinion is there an API that gives those data? I can't use the Process.StartTime property because many of these windows have the Process.MainWindowTitle = "" and Process.MainWindowHandle = 0
in windows form in button click event how to export the file in a location select by showdialog & it will be delete permanently at a same time.How can i do this because in .net it will produces error "IO Exception was unhandled" or "The process can not access the file because it is used by anather process." .In button click event how to export the file & delete at same time in vb.net windows application.
When I select a standard windows form at design time, then in the toolbox, under the "general" section, there are ellipse, line, and rectangle, but they are all gray and so can't be used and I can't find any way to make them not gray and thus usable. What am I missing? The help system tells how to USE them but nothing about how to make them accessible, it just assumes they are.
I have no problem drawing a line on a form at run-time but I want to drop one on at design time and can't find any way that's my real problem.I'm not a heavy user of VB.NET so I figure there's probably something simple that I'm overlooking.
I have an application that should run every time when boot windows(xp/vista). I currently added this app to all programs and startup. How can I do in code. Is the best way to use registry and put the key in HKEY_CURRENT_USERSoftwareMicrosoft Windows CurrentVersion Run. It is very important to start every time when windows start.
I have written onw windows service..in that i have logic that is some part of code need to execute on certain time.. my service is running in every one min..
[code]...
But iam facing prob that it is considering seconds while running so can not compare above time..
I have a windows form where I want the time to constantly be updated. Right now it will take the current time from when the program was started.
For example, if I started the program at 4:30:29 PM that is what it will show the whole time the program runs.I need it to constantly be updated as the seconds tick by. So, If I started the program at 4:30:29 PM and ran it for exactly 5 minutes, the time displayed then should be 4:35:29 PM.The data being taken in and saved needs a time associated with it and the end user also need to know the current time as the program is ran in full-screen. [code]...
I made a code that starts the Disk Check on boot time it works fine on Windows Vista and Windows Xp but on windows 7 I checked the path at were windows 7 stores BootExecute and it is on the same path. Maybe the system is blocking it. Or do i have to change the code.
Here is the code:
Dim rk As Microsoft.Win32.RegistryKey rk = My.Computer.Registry.LocalMachine.OpenSubKey("SYSTEMCurrentControlSetControlSession Manager", True) rk.SetValue("BootExecute", "autocheck autochk /p ??" & Drive) 'Turn ON The Drive String just gets the name of the drive for example C: or D:
I had more problems coding for a windows 7 machine then Vista.
I have a windows 7 computer with vb 2008 express on it. it works really well, except only one thing. when I try to debug an application ( usually windows forms), it produces a run-time error saying: Error while trying to run project; unable to start debugging.