|
My goal is to be able to read the install dir. path from within the app at run time. So, having the Setup program write the path to the registry would be a perfectly acceptable way to accomplish this goal, only problem is I can't figure out how to do this.
|
|
|
|
|
i mean if you explain what have you to do, you may avoid to get the user setup path.
Anyway after the install you can run automatically a little .exe without form installed together your main app, that create a registry key
|
|
|
|
|
Yes, but how do I get the path to put it into the registry key?
|
|
|
|
|
What is the best way to update a database like Access, use oleDBcomand with parameters or use DataSet?
|
|
|
|
|
The dataset uses a command object to update the database in the end anyway, so you can skip the middle man and do the work yourself. Use a dataset if you find it more convenient.
---
b { font-weight: normal; }
|
|
|
|
|
but what is the faster way? if i use no dataset way i've to connect everytime at the database so it spend time.
Using dataset at the end, when i close the program i've to update the database anyway so i connect just one time to it, but i've to write SQL insert, update, delete comand as in no DataSet way.
So what is the better or faster way?
|
|
|
|
|
Neither. You'll be doing the exact same thing either way. THe only difference will be when you do it. You'll be using your own SQL statements and updating records, one at a time, based on the changes your holding in your data model. Using a DataSet object is no different. Same SQL statements, just a different object holding your data.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If you delay the updates until you close the program, you will be relying on the program never to crash. If the program for some reason fails to store the data, you might be losing hours of work.
Also, any changes you do won't be visible in the database. That means that you only use the database for storing data, you can't really use it.
---
b { font-weight: normal; }
|
|
|
|
|
I have a list of buttons in the panel( one below the other. Just like a dropdowm menu). It is invisible by default. I have a button on the form. When I click the button on the form, I show the panel just below the button. Now when I click anywhere on the form other than the panel and buttons inside the panel, the panel should become invisible.
Any ideas on how to achive this would be very much appreciated.
Thanks,
VPMahank.
|
|
|
|
|
Just set the Visibility property to false in te Click evnet of a form...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Yes, I totally understand. But if there are a bunch of controls in the form, lets say there are a few labels on the form, the visibility property of the panel has to be set on click event of each label. I cannot just handle it in the Click event of the form. I need to have a generic way of doing this.
Thanks,
VPMahank
|
|
|
|
|
I have an NT Service written in c# (.net framwork 2.0). When it hits a certain error condition, I want it to be to cause itself to stop. How can I do this?
|
|
|
|
|
I am developing a windows application and we want a floating toolbar. Does anyone know whether VS.net support floating toolbar in C#?
Thanks
|
|
|
|
|
no, you have to create another form then handle windows message to kill or set focus to the main and tool in the same time
|
|
|
|
|
Take a look here[^].
This docking framework is able to create floating tool bars.
Regards,
mav
|
|
|
|
|
Thanks a lot. It looks very useful, I will try it.
|
|
|
|
|
In global.asax I have:
<br />
protected void Application_AuthenticateRequest(Object sender, EventArgs e)<br />
{<br />
HttpApplication app = (HttpApplication) sender;<br />
<br />
if(app.Request.IsAuthenticated)<br />
{<br />
CustomPrincipal ppal = new CustomPrincipal( Context.User.Identity.Name.ToString(), ((CustomIdentity)Context.User.Identity).ProjectID );<br />
<br />
Context.User = ppal;<br />
}<br />
}<br />
But when I attempt to go to a page it throws a "Specified cast is not valid" on this line: CustomPrincipal ppal = new CustomPrincipal( Context.User.Identity.Name.ToString(), ((CustomIdentity)Context.User.Identity).ProjectID );
CustomIdentity is an IIdentity with some extra stuff in it.
What I am trying to do is have one web site that is a work flow managment program, but will encompas several projects. So on the login page you put in a username and password then select a project from a drop down list and it authenticates the user based on whether they have a role in this project (junction table). The project id needs to be readily available on a per user basis as every stored procedure has project id as a parameter so that only data relevent to the given project is displayed.
Is there a better way to handle this situation or a way to make Project id available from context as well as be nessesary to make a Principal or Identity object.
-- modified at 16:54 Tuesday 17th January, 2006
|
|
|
|
|
Is the object that Identity refers to really a CustomIdentity object? You can't cast an object to something that it isn't.
---
b { font-weight: normal; }
|
|
|
|
|
It should be as I can cast Context.User.Identity to CustomIdentity everywhere else in the program, but for some reason it isn't in global.asax... Regardless I managed to get it to work by using the Context.Cache.
|
|
|
|
|
Hi!
Is it possible to change the computer name and the workgroup using C#? I'm trying to put together a program that:
1. Creates three user accounts
2. Changes the name of the computer
3. Changes the name of the workgroup
So far I've been able to create the user accounts. Can someone help me with the last two?
Thanks in advance!
Matthew
|
|
|
|
|
|
When using this I find that any sub-properties, with the type string, don't refresh the parent after tabbing off the change. When a sub-property is an Enum or type like Font the parent gets refreshed. How or Can I get the parent to refresh from the change in a sub-property that is a string?
-- modified at 16:38 Tuesday 17th January, 2006
|
|
|
|
|
i need to secure an application using any hardware ID
thanx
Martyr
|
|
|
|
|
Hope this helps.
<br />
using System.Management;<br />
...<br />
ManagementObject disk = new ManagementObject("Win32_LogicalDisk.DeviceID='C:'");<br />
string volumeNumber= disk.Properties["VolumeSerialNumber"].Value.ToString();<br />
Cheers,
Simon
> blog:: brokenkeyboards
> my opinion of VS05 :: here
> CV :: PDF
> skype me! :: SimonMStewart
|
|
|
|
|
Even the volume serial number can be copied.
Try any app like Ghost and you can create an identical machine using the same VSN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|