|
It's not as easy as you think. Are you going to take into account resiliency (so that if the computer goes down either gracefully or not, when it comes back up the timer accounts for lost time)? What about security (what account does the service NEED to run under, i.e. what are the minimum privileges required)?
Again, this is a simple solution if you write it using native C++. The steps I outlined are only necessary if you want to do this in native code. If you're doing this as part of a managed application, you could write the implementation in native code and then P/Invoke a simple function exported from your native DLL from your managed application:
sched.dll (native)
ScheduleTask(TaskStruct task);
app.exe (managed)
P/Invoke ScheduleTask;
Declare TaskStruct;
If you are going to handle resiliency and security yourself (which the Task Scheduler already does), then you should look at the Timer classes in the .NET Framework I mentioned in my previous post. You can find these in your .NET Framework SDK that VS.NET installs by default (just click the Help menu, select Index, then type "Timer class". These are also available online at the following URLs:
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
How to Create a Flolder on a server where my database reside?
Which types of rights i required for creating folder?
Perrak shah
|
|
|
|
|
This is an open-ended question. You do not specify how you have access to the server (UNC, HTTP, FTP, etc.) or if you even have security rights to create folders. If this was on a network share, you'd simply use Directory.CreateDirectory("\\server\share\new directory") . If you don't have the necessary access rights, an UnauthorizedAccessException will be thrown. Over HTTP, FTP, etc., protocols, the method is different for each one.
Please be specific in your requests.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
You'll either need an application or service on the server that will listen for client requests and create folders on the demand of a client, or you'll to have a network share onto the server and create a folder from the client on the network share.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Horrific Minnesota Radio
Judah Himango
|
|
|
|
|
hej,
i'm looking for a solution to control multiplie user controls by clicking on on an item in the navbar, located at the left side
of the screen.
I can handle the NavBar, that's fine. Writing a Click Event for
each item in the NavBar seems to be the most convinient solution to
call a user control and display it alongside the navbar.
The problem: So far i simply dragged all my user controls on the form
and worked with the "visible" proprety
private void navItemAdresses_LinkClicked(object sender, MyNavbar.NavBarLinkEventArgs e)
{
usercontrol.Visible = true;
usercontrol1.Visible = false;
....
}
That's a really s... solution. Can anyone suggest me a better one?
|
|
|
|
|
If they are the same size ,why don't you put them in the same location ,and only calling this.control1.BringToFront();
that would help also you can start with your default control as you may want display it in the first.
|
|
|
|
|
That would be a solution. But i rather like to write some code that
"closes" or makes all previous selected user controls invisible.
I'm not too lazy to programm it, but actually i'm a little stuck.
A good idea is missing
|
|
|
|
|
Is there any Tool Bar control which is by default quite similar to Standard I.E explorer tool bar,which contains back forward stop refresh buttons etc.Creating such tool bar on our own will take time,so is there any available tool bar control like this.
|
|
|
|
|
No. You can have a prebuilt toolbar that supplies the buttons, but there's no way it can know what your using those buttons for and supply the code for them. You'll still have to write code behind the button click events so they'll actually do something.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is it possible to stop people from being able to decompile a C# program or to 'rip' the code out of a compiled application?
Thanks.
Stephen
|
|
|
|
|
there are many obfuscation programs are available in market which you can use to secure your source code.
a good defination of obfuscator from google : )
"Obfuscator is a program that garbles a source either by encryption or by substitution of codes. This means that the source to be compiled is hard to understand and hard to debug. But during runtime it is decrypted as pure source."
|
|
|
|
|
You can make it harder by using an obfuscator. An obfuscator takes the IL and mangles it so that it is tough for decompilers to figure out the original source, while still maintaining the original logic of the program.
All said and done, with enough time and resources, a motivated person can still decompile your code.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I managed to retrieve LOCAL user & groups and list them in a listbox. Now I need to find out which localusers are "memberof" a local group. With Active Directory (using LDAP) it works, but it won't work with localuser/groups.
The last I tried:
DirectoryEntry group = new DirectoryEntry("WinNT://127.0.0.1/Administrators", "", "", AuthenticationTypes.None);<br />
<br />
foreach(object dn in group.Properties["member"] )<br />
{<br />
Console.WriteLine(dn);<br />
}
Who knows what I'm doing wrong ? Or does somebody knows the right we to handle this?
Thanks
|
|
|
|
|
Jeah, I did it (stolen from a example from codeproject.com) :
StringCollection userGps = new StringCollection();<br />
DirectoryEntry obDirEnt = new DirectoryEntry("WinNT://" + "127.0.0.1" + "/" + "Eric");<br />
object obGps = obDirEnt.Invoke("Groups");<br />
if (null != obGps)<br />
{<br />
foreach (object obGp in (IEnumerable)obGps)<br />
{<br />
DirectoryEntry obGpEnt = new DirectoryEntry(obGp);<br />
userGps.Add(obGpEnt.Name);<br />
}<br />
}
Now I only ask, why does is take so long to 'invoke' ? Is there anyway to make this go faster ?
|
|
|
|
|
Hello
i have some problem in double clik event of datagrid. i am using dragdrop functionality in datagrid to another control when i active this function then double clikc event not fire what can i do for this functionality please help me...
Priyank Gupta
|
|
|
|
|
joy_priyank wrote:
i am using dragdrop functionality in datagrid to another control when i active this function then double clikc event not fire
What do you mean by "when I activate this function, then doubleclick event not fire"? Are you trying to doubleclick on something WHILE your doing a Drag & Drop operation?
We need a better explanation of what your trying to do.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
"when I activate this function, then doubleclick event not fire" Yes you are right and i explain you in details
in my main window i am using two contol, one is datagrid and second is MSFlexGrid. i want to drag drop functionality from datagrid to MSFlexGrid when i select any item from datagrid and drag from datagrid to MSFelxGrid then another window open. now i am using for draging this functionalty with dradrop event of datagrid. Now i am also useing double click event of datagrid but when i write some code in double click event of datagrid then it will not fire
this is my main problem i can also explain you by code if you not understand tell me
thanks for reply
|
|
|
|
|
Is the .NET Framework SDK Version 1.1 (for C#) available for download from Microsoft site, free for download?
Can I use it to make and market commercial applications, without restrictions? Moreover, can I develop full-fledged applications using it (of course the visual IDE will not be availabe if i understand correctly)?
I am forced to ask this question here because this SDK download is about 103 MB and the Microsoft site does not mention about the license conditions before the download is completed.
Thanks in advance.
|
|
|
|
|
Yes, you can develop and market applications written on the "free" version of the .NET Framework. Those are the exact same compilers used by the Visual Stduio IDE. The compilers are part of the Framework, not the IDE. There are no licensing restrictions.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I have a problem deserializing xml into objects.
my class structure:
orderHeader
order
orderDetail
orderHeader has an arraylist of [order]
order has an arraylist of [orderDetail]
orderHeader and the arraylist of [order] is filled, but the arraylist of [orderDetail] remains empty.
this is the code i use to deserialize:
<br />
Dim serializer As New XmlSerializer(GetType(orderHeader))<br />
Dim fs As New FileStream("c:\schipUbnOrder.xml", FileMode.Open)<br />
Dim myOrderHeader As orderHeader<br />
myOrderHeader = CType(serializer.Deserialize(fs), orderHeader)<br />
What am i doing wrong ?
Thanks already
John
|
|
|
|
|
|
Hi,
Thanks for the reply, but i already found the problem:
the [orderDetail] arraylist in the [order] class was not initiated in the default constructor. Therefore he generates a nullReference...
It does know the type of the arraylist thanks to this code:
[XmlArray("orderLines")]
[XmlArrayItem("orderLine",typeof(orderDetail))]
public ArrayList orderDetail
{
get {return mOrderDetails;}
}
regards
John
|
|
|
|
|
hi,
I suppose that I have created a Method called "abc(int a,int b)" Method in C# Application.
Now I want to use same abc Method in a different Application in different Computer.All the computers are in the Network..
can any one tell me how to do that?
thanks in advance..
|
|
|
|
|
Hi,
You can use .Net remoting for this purpose. The following link contain necessary information on .Net remoting.
http://www.developer.com/net/cplus/article.php/1479761
Thanks and Regards
Kodandapani.
|
|
|
|
|
yes ..it is helpfull thanks...
|
|
|
|