|
i have made one window application. i would like to make that window application a window service.so that it works same as window service we have in control pannel->administator tools->services . when ever i start the system my application starts immediately.
Amit Grover
CDAC R&D
|
|
|
|
|
Hi,
for this u need to create a windows service application
when u create a new project select the Language and the type of the
project as Windows service
This will create a windows service application which has the OnStart method
this method is called whenever the application is started
Hope u get it.
Thanks,
Pramod
|
|
|
|
|
i have made a window service.i found one link from codeproject that is http://www.codeproject.com/dotnet/simplewindowsservice.asp.i downloaded the demo project from the site.but when i run the .msi to install the window serverice it gives me error "cann't found the file "../Doservicesteup.vdproj". then i follow the same setup which has given in the site to make own window service same error has come.how would i solve this error.
i also didn't know where to put my code. actullay i made a small application in which i have one window form.i would like to open that window form when window start. for that what i did is i give the path of my application.exe in OnStart() method of window service. it gives me a error message when i restart the window, when login form opened. plz help me where could i put my application code in window service
Amit Grover
CDAC R&D
|
|
|
|
|
Hi every one,
Wish u a happy new year !!!!
I am trying to develop a windows application which will run on touch screen LCD monitor.
but the touch screen requires bigger option button,check boxes, tab pages, scroll bars etc. in such a way that the enduser select the controls using his finger.
How can i adapt the .net windows controls for the touch screen application (like changing size,graphics etc.,)?
or is there any special controls available for touch screen in .net?
or is there any tool available to convert the normal controls to touch screen controls??
Please help...
Thanks & Regards,
Srini
srini
|
|
|
|
|
|
hi
i have a program where I want to change the value of BrowsableAttributes.The
problem is like this:
I have a property called Simulation which can have values either On or Off.If it is On i want to show property called OnText along with other properties and hide OffText property and if is Off i want to hide OnText and show OffText along with the common properties.
For this i feel i have to change the value of BrowsableAttributes.but it doesn't allow me to do so as it is readonly.
Kindly suggest me a way to get around this problem.
thanks
Tulika Shrivastava
|
|
|
|
|
hi!
try to implement the ICustomTypeDescriptor interface on your control. then in the GetProperties overloaded methods, iterate all the properties then set the new attributes you want depending on your condition.
here's an example:
<code>
//custom method to prevent redundant statement
private PropertyDescriptorCollection x_HideShowProperties(PropertyDescriptorCollection baseProps)
{
PropertyDescriptor[] props = null;
for (int i = 0; i < baseProps.Count; i++)
{
if (/*condition here*/)
{
if (props == null)
{
props = new PropertyDescriptor[baseProps.Count];
baseProps.CopyTo(props, 0);
}
props[i] = TypeDescriptor.CreateProperty(
this.GetType(), baseProps[i], new BrowsableAttribute(false),
new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden));
}
}
if (props == null)
{
return baseProps;
}
else
{
return new PropertyDescriptorCollection(props);
}
}
PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties()
{
return x_HideShowProperties(TypeDescriptor.GetProperties(this, true));
}
public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
{
return x_HideShowProperties(TypeDescriptor.GetProperties(this, attributes, true));
}
</code>
then on your property(Simulation), add the attribute "RefreshProperties(RefreshProperties.All)".
this will refresh the propertygrid.
if your not yet familiar on this interface, just try to research it on the msdn or other .net help sites.
hope that helps.
microsoc
|
|
|
|
|
hi
thanx a lot
it solved my problem
|
|
|
|
|
nice to hear that!
happy coding!
|
|
|
|
|
is it possible to create a program which is able to ping an ip address?
|
|
|
|
|
Google[^] is your friend. There's LOTS of examples out there.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I rarely ever have problems like this. I've been developing a control which I've finally finished. I want to add this control to another Form in another Project. Both of these Projects reside in the same solution. However, the IDE has failed to provide a control Icon in the "My User Controls" Tab and instead I've had to reference the DLL and add the Items manually to my Toolbox.
Now for the kicker. When I drop my new Control onto the Form, it adds a reference to that Library, but no control displays nor does it throw an error, nor does the Form "look" Modified (Asterix next to the Form Title).
Does anyone know of anything I can do to get this working? This seems to be happing a lot more and I've been developing controls for the past 2 years!
|
|
|
|
|
Go in the code view and check whether the control is getting added on the form
Is the control visible after placing it on the form?
did u manually add the control in the toolbox?
Maybe u have forgot one of the above points
Thanks
Pramod
|
|
|
|
|
I finally got it to work. After manually adding the Control to the Toolbox, and dropping it on my Form, the Project created a reference to the DLL but it did not show on the Form nor did it create variables in the Form for the Control.
I think I eventually determined that there was an issue with the Resource file for the Control project so I fixed that and removed all references to the Control in the new Project. After dropping it on the Form this time, it worked.
|
|
|
|
|
Hi to all,
Does anyone here has sample codes to create Gantt Chart in windows forms? Im trying to make it myself but I just dont know how to start. Please share me ideas on which components to use or if you have ready components that i can possibly import, I'd really appreciate your help. I've been trying to find free source codes in the net but to no avail.
Thanks so much and more power.
Ted
|
|
|
|
|
Do you want to draw the chart, or also be able to edit it, and have it change it's values accordingly ?
Either way, I don't know of any controls, but drawing one shouldn't be that hard.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks so much for the speedy reply. As of this time, I wont venture yet into editing the chart but maybe later on. I just want to make a start, drawing it so to speak. Could you help me on this? I really really appreciate your time.
Thanks!
Ted
|
|
|
|
|
Actually, I reckon you just need to create one or two owner drawn cell types and use a datagrid ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Ted,
ComponentOne has a Chart component that will allow you to create Gantt charts, as well as many other types of charts. A trial download is available from http://www.componentone.com/Downloadcenter.aspx?PanelIndex=4[^], which includes a sample that shows how to create a Gantt chart in your program.
Suelinda W
Customer Engagement, ComponentOne LLC
Suelinda W
Customer Engagement, ComponentOne LLC
|
|
|
|
|
Hello,
I've been trying to convert a simple USB control program from VB to C#.net for a past few days and I'm making no headway. Can anyone help? The original program is at
http://www.devasys.com/release.htm
Its at the bottom of the page, along with a C++ example.
Much thanks.
Hovik
|
|
|
|
|
Which bit is causing you grief ? The easiest way out is to write a managed C++ wrapper around this C++ code and call that from C#.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm new to the entire "wrapper" concept. I'm currently experimenting by using the dllimport function in C#. Will a managed C++ wrapper be easier?
|
|
|
|
|
dllimport is pretty straightforward, but what I'm talking about is creating a managed C++ dll project, which exposes the functionality you want from the C++ source, and then using that dll in C#. I've done it a few times, it's pretty trivial.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I agree with this methodology. Exposing it as a 'native .NET' assembly is far better than managing and maintaining the exporting of methods from a Windows DLL in C++. Either way you will have to maintain an interface, why not just do it in one place.
Andrew Peters
|
|
|
|