|
This unfortunately won't work on startup.
|
|
|
|
|
Perhaps this will help you:
TopLevel = false;
|
|
|
|
|
|
My Windows Service installes great except I need to manually change the LogOn account to an Administrator to get it to cooperate with my Windows App.
Q. Anyone know how to programmatically install a Windows service with LogOn as Administrator?
Palestine
|
|
|
|
|
If you need to start a process with different credentials, and you know the credentials, you can use System.Diagnostics.ProcessStartInfo.UserName and System.Diagnostics.ProcessStartInfo.Password. You can start a process using the System.Diagnostics.Process class.
If you don't know the administrator credentials, you cannot run the process as administrator, as it would defeat the purpose of limited user accounts.
A better solution would be to discover why your service doesn't work as a limited user. Most apps can work under a limited user account...is there a valid reason it requires an administrator account to function properly?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Goof around music jam with my brothers (with video)
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
I am using a richtextbox and when ther user uploads content from the rich textbox onto my server, I want to save that html as a word file. Thus, I need to be able to take arbitrary html and write it into word.
I have all the assemblies installed, and know that i could go line by line through the html and write into word. However, I was wondering if there is a quicker, easier way to do so.
Palestine
|
|
|
|
|
|
I am using datagridview in .net 2.0
I have a datagridview which I initially do not allow the users to AddNew. However, the user can add a new record by pressing the button. This works fine. In the case the user would like to cancel their action, how do I remove the new record from the datagridview?
Palestine
|
|
|
|
|
TAREQ F ABUZUHRI wrote: how do I remove the new record from the datagridview?
datagridview.Rows.Remove(datagridview.Rows[index])
Regards.
_____________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
Does anyone know how to do a hover on a button that displays what the button does like the toolbar does with the text property.
|
|
|
|
|
|
Hook up the mouse hover event of the button and add a tool-tip.
Sample code:
hook up the event -
this.button1.MouseHover += new System.EventHandler(this.button1_MouseHover);
define the handler -
private void button1_MouseHover(object sender, System.EventArgs e)<br />
{<br />
ToolTip obTool = new ToolTip();<br />
obTool.SetToolTip( button1, "This would Cancel the form");<br />
}
|
|
|
|
|
You'd have to add a tooltip control and tie it to the button - you can set the text and all that on the tooltip control.
|
|
|
|
|
Thanks - the tooltip works great. Much appreciated.
|
|
|
|
|
TabControl tc = new TabControl();
tc.TabPages.Insert(0, new TabPage());
Console.WriteLine("1 == {0}", tc.TabPages.Count);
Console.ReadLine();
Output:
1 == 0
Does anybody know why TabPageCollection.Insert silently does nothing? Doing
tc.TabPages.Add(new TabPage());
works fine, so why won't Insert?
|
|
|
|
|
If I use reflector to decompile TabPageCollection, this is the definition of Insert:
void IList.Insert(int index, object value)<br />
{<br />
throw new NotSupportedException();<br />
}
Firstly it is hidden, so you cant have been using the exact code you posted, you must have been casting tc.TabPages to IList, second its unsupported.
---
How to get answers to your questions[^]
|
|
|
|
|
Thanks for the reply. Also thanks for the reference to Reflector. What a great program!
If I load the .NET Compact Framework, then disassembling the method returns
public void Insert(int index, TabPage tabPage)
{
}
which makes sense given the output I'm getting. (Interestingly, I don't get NotSupportedException when disassembling the regular .NET 2.0 framework - it makes a reference to this.owner.Insert, followed by some try{}catch{} stuff. Maybe something got changed when I tried installing Avalon/WF/.NET 3.0 beta)
So I guess my question now is this. Why is Visual Studio using the compact framework, and how can I change it?
|
|
|
|
|
I am using visual studio.net 2003 and my college work with 2005 one we are cooperated in one project so the project is usually switched between us and when he send me the project after update i want to open it ,of course u know the result
i wander if any one know a solution to open the 2005 project in 2003 environment without
1-open the class code and know the updates (because their are many windows apps)
2-change the version of us
Sorry for elongation but I bothered of this problem
haitham
|
|
|
|
|
|
For circumstances we should put our project on mobile computer (which has 2003 version) and we can’t upgrade it to 2005
this is the problem
Thanks for ur concern
haitham
|
|
|
|
|
I am currently working on a smartphone project that needs to
communicate with some COM component. Since the .NET compact framework
does not support the DCOM, I decided to create a web service to expose
the COM component's methods and events.
As the some of the COM methods return int** or byte** data back to the
caller, I manually changed the generated interop assembly ( from
IntPtr to IntPtr& for the out going parameter int*** or byte**) after
generating the intermedate language file using ildasm.exe and
regenerate the interop assembly using ilasm.exe utility in order to
get the arrays of bytes or integers for the web service methods.
Here is the problem I am facing:
The web service methods caller can only get the first elements back
from the COM component while windows caller can get all the data back.
I wonder if I need set some binding attribute to make it work for web service.
I would be very grateful if you could help me out.
Thank you.
Mike Zhang.
|
|
|
|
|
Hi All,
I would like to develop an application in c# using WebServices.
Main functionality of my application is as below.
1. Ability to retrieve services running on the remote System
2. Ability to retrieve processes running on the remote System
3. Ability to Retrieve logical Drive info ,Space avalable of remote System.
Can anybody help me about out what should be done regarding this.
Thanks in advance.
-- modified at 16:20 Tuesday 11th July, 2006
|
|
|
|
|
System.IO.Directory.GetLogicalDrives For logical drives
http://www.codeproject.com/csharp/service_controller.asp ofr list of services
http://www.codeproject.com/csharp/popupkiller.asp for running processes
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Ok i saw that ,
But I need to know about getting the Disk Space,services and process running in a remote system using web services in .Net and C#.
-- modified at 8:39 Wednesday 12th July, 2006
|
|
|
|
|
nt
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|