|
Hi!
I want my application to close if the user is not performing any keyboard or mouse activity and no process (copying file, query database etc.) is running for 5 minutes.
Can somebody how can I do this?
Thank You
|
|
|
|
|
|
I think it works for Keyboard and Mouse activities only but what about the running processes in my application i.e. read/write files or any non-idle process.
|
|
|
|
|
I want my application to trigger on external application start/close events but haven't been able to figure out how to do this.
For example. I would like my application to execute a certain task every time Internet Explorer is executed on the system.
I would greatly appreciate if someone had a solution to this!
Thanks!
// T
|
|
|
|
|
Well, one way you could do this (which isn't the best way I don't imagine, but I can't think of any other way at the moment) is to create a task watcher process that watches the task list and kicks off event "alerts" that you set when certain tasks are created/exited.
|
|
|
|
|
Yes, this is how I do it now..
I don't feel that this is the correct way of doing it though. I would imagine that you could hook on IE or trap a windows message to do this instead. I've tried searching for it on the net and haven't found anything
Hopesfully someone will have a solution
|
|
|
|
|
Problem!
I want to show some icons against menu items just like when we open Msword in its File menu there is different icon to the left most of each menu item . How to achieve this any help or idea.
Thanks In Advance
|
|
|
|
|
Visual Studio .NET 2005 (beta) provides MenuStrip control for this.
You need to handle the DrawItem event of the menu and set ownerdraw property to true (sorry I don't know the details. google for owner drawn menu with bitmap)
If you don't come up with the solution then google for VolveNet Menu Extender
|
|
|
|
|
Hello!
I am sorry if I am unable to state my problem clearly.
I am using an SQL Server 2000 database for my .NET Windows application(VB/C#).
My main MDI form has a large number of menus and options.
Do I use a table in the database for maintaining the users and their encrypted password and other details?
i.e User ID, Full Name, Password, Working Shift, Email Address etc.
OR
I must use SQL Server logins and roles?
If I use the first approach my triggers and stored procedures will not be able to utilize the User_Name() SQL Server function for logging the User transactions.
If I use the second approach, then, where do I store the detailed information about the user (i.e infomation about the user as in Windows Active Directory for a domain)
In most of the forms in my application each form is related to a single table of the database. And each of those forms performs Update, Insert, Delete operations on the table.
How do I enable/disable the Insert, Update, Delete buttons on my form accoring to the user permissions on that table?
Does SQL Server's Application Role have something to do with my problem?
And
How do I use the Application Role best.
I hope you understand my problem.
Anticipating a quick reply.
Thank you.
-- modified at 8:23 Thursday 13th October, 2005
|
|
|
|
|
You can do whatever suits your application best, but it's typical in large application settings with lots of users to have all access to the database take place through a small number (or one) login. Doing so has certain administrative benefits as well as performance benefits to the database server (wrt connection pooling, and cacheing commands).
If you're interested in doing declarative security, I would recommend checking out the IPrincipal interface and the classes that inherit from it. If you're writing a WinForms application, you may be able to take advantage of the WindowsPrincipal to leverage your AD security without making a lot of concessions. If that's not an option, you can make your own Principal, and roll your own authentication scheme as well. Either way, the Principal is a built-in authorization structure in .Net.
Best of luck.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hello,
How can I create a standalone .EXE file for my Windows Application, and the installation files for this application?
Thank you.
|
|
|
|
|
Not easily. The only langauge in vs.net that will produce native code directly is unmanaged(normal) c++. There are a few 3rd party tools that will compile the IL produced by the other .net langauges into an executable but they're all afaik expensive.
|
|
|
|
|
It is theoretically possible but what possible application would there be for doing such a thing? Not only would your application have to be "compiled" again but all subsequent assemblies have to be sucked in. You'd either end up with a very large executible or a complete duplication of the .Net Framework in a C runtime format.
You could ask the same thing about VB 6 to C and note no one does this. The possible advantages of changing runtime formats is way outweighed by the complexity of doing so.
|
|
|
|
|
can anyone tell about implementing mobile and intelligent agents in C#
|
|
|
|
|
Hi
I'm trying to work out how to nest datagrids. The parent child way that is supported by default is a little bit limited for my needs.
Here is an image of what i'm trying to do, I quickly photoshopped this together so theres no drill down buttons and lines showing the hierarchy.
Example
I also need to add things like combo boxes to certain columns (which I think I can do) I'm fairly new to windows forms, so I don't know by way around very well. I can find tons of stuff for ASP.NET but thats not helpful for my windows app. i'm trying to do this in C# using .NET 1.1
The data that goes into this datagrid comes from a join between two tables. Its a shame you can't write windows forms in HTML and CSS and it generates a windows interface from that
|
|
|
|
|
Hi Everyone,
Does anyone know if there exists Assemblies in .Net 1.1 with which I can do load balancing on a server app that accepts TCP connections?
Thanks and Cheers!
Phi?
|
|
|
|
|
As far as I know, load balancing is not done at the software application level. If NICs are load balanced they should automatically balance the traffice between the merged NICs. When you send traffic using .NET the load balancing should be auto handled.
|
|
|
|
|
Raheem is correct. Applications are not expected, nor recommended, to do their own load balancing. This is best left up to the server/network level. Your application must be written with load balancing in mind, though.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
When the treeView control's nodes are right-clicked,
the selectedNode of the treeView won't be changed unless
it is a left-click mouse event.
My problem is that I associated context menu to the tree
nodes, so user just right click the node to use the context
menu, however the selectedNode isn't the node that the context menu
is launched.
So how can I set the selectedNode to the node that is right-clicked ?
Thanks
|
|
|
|
|
Hi!
You could catch the MouseUp event and then use TreeView.GetNodeAt() to get the node the mouse is over currently.
Regards,
mav
|
|
|
|
|
Excel enables the creation of user-defined functions that can be used in Excel formulas. So I use these code to create a COM introp.
-------------------------------------------------
using System;
using System.Runtime.InteropServices;
using Microsoft.Win32;
namespace AutomationAddin {
[ClassInterface(ClassInterfaceType.AutoDual)]
public class MyFunctions {
public MyFunctions() {
}
public double MultiplyNTimes(double number1,
double number2, double timesToMultiply) {
double result = number1;
for (double i = 0; i < timesToMultiply; i++) {
result = result * number2;
}
return result;
}
[ComRegisterFunctionAttribute]
public static void RegisterFunction(Type type) {
Registry.ClassesRoot.CreateSubKey(
GetSubKeyName(type));
}
[ComUnregisterFunctionAttribute]
public static void UnregisterFunction(Type type) {
Registry.ClassesRoot.DeleteSubKey(
GetSubKeyName(type), false);
}
private static string GetSubKeyName(Type type) {
System.Text.StringBuilder s =
new System.Text.StringBuilder();
s.Append(@"CLSID\{");
s.Append(type.GUID.ToString().ToUpper());
s.Append(@"}\Programmable");
return s.ToString();
}
}
}
-----------------------------------------------------
And set project build property,checked output item,register COM interop.
Building the project,that's success.
Launch Excel and choose Add-Ins from the Tools menu to display the Add-Ins dialog. In the Add-Ins dialog, click the Automation button. But I can't find the class I created by looking for AutomationAddin.MyFunctions in the list of automation servers.
What's wrong? Please help me !Thanks,by the way,My development tool is VS2005 ,Office 2003 (sp2)simply chinese.
|
|
|
|
|
Hi guys,
I want to ask a question about diabling a control.
I have to select boxes, regions and areas. And a text box that represents a unique ID.
Now I only want the user to search either by location, or by unique ID. So if the user selects a region, all the areas for that regions are loaded in the area select control. Then, in the same process, it should make the textbox ReadOnly (so that no data can be entered), which works fine. But my problems comes is, if the user starts to type in a unique ID, then it should disable the 2 select boxes. If the textbox is cleared, then the 2 select boxes are enabled again.
I'm not sure if there is an event that checks for this? I think there is an event for the textbox something like text changed, but this doesn't work when I start typing in text, probably because it doesn't make a trip to the server. Is my only option for this via Javascript? Or can I do this on the server? I'm using C#.
Regards.
-- modified at 3:23 Thursday 13th October, 2005
|
|
|
|
|
Unfortunately for right now, if you're wanting to do real time text checks on the web page then some type of Client side script (such as Javascript) is your only option. The only way for the server to manage this is for the page to postback to the server every time the user presses a key in the textbox, which would keep them from typing more than say.. 3 words per minute.
|
|
|
|
|
ma se wrote: but this doesn't work when I start typing in text, probably because it doesn't make a trip to the server.
That's exactly why. ASP.NET is a server-side only technology designed to generate HTML for browsers. It's can't interact with the client in real-time.
ma se wrote: Is my only option for this via Javascript?
Yep. JavaScript is your only option if you want cross-browser compatibility.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
I have written a user control and on its Load and Resize event i have aligned an activex control as follows
AMC.Location=new System.Drawing.Point(this.Location.X,this.Location.Y+26);<br />
AMC.Size= new System.Drawing.Size(this.Size.Width,this.Size.Height-40);
The problem is with AMC.Lication
one problem is when i am using the user control,if its (AMCs) Location.X is set to Location.X of its parent (user control) + some value whjich doesnt make sence as i have set it to this.Location.X only
what more is bothering is
i am creating 3 instances of this user control in my form and by calling the statement
AMC.Location=new System.Drawing.Point(this.Location.X,this.Location.Y+26); it is setting Locatin of each of the AMC to the locatin if first instance, the prob. is not with ActiveX AMC because i have tried it with a Label as well an the probleaim is still the same
please help me
Regards,
Arus
-- modified at 1:56 Thursday 13th October, 2005
|
|
|
|