|
|
I used the following code to change the indexes.
TreeNode Node0 = treeView2.Nodes[i - 1];
TreeNode Node1 = treeView2.Nodes[i];
foreach (TreeNode node in treeView1.Nodes[0].Nodes)
{
if (Node1.Text == node.Text)
{
m = node.Index;
}
if (Node0.Text == node.Text)
{
n = node.Index;
}
}
if (m < n)
{
tempNode = Node1;
Node1 = Node0;
Node0 = tempNode;
}
|
|
|
|
|
Are you using Remove and Insert to move the node?
(I've never tried it, but suppose it should work.)
|
|
|
|
|
no, please look at the code which I posted now.
|
|
|
|
|
what property in setup will help me to make the windows service run automatically after installing
thanks in advance
arun
|
|
|
|
|
|
Google that "c# windows service installer start after install" it's in the TOP 10 results
I won’t not use no double negatives.
|
|
|
|
|
yeah i got it thank you
is there any way to make the service interact with desktop while starting itself
i mean while creating setup
thanks in advance....
arun
|
|
|
|
|
Hello friends,
Can u help me to delay the second instance of application.??
I want my application must be multi instance appliation but if double clicking immediatly second instance should start after some specified delay!!
Thanks in advance
|
|
|
|
|
Just search for code to do a single instance app, and instead of closing the second instance, have it wait a while before starting. The only hard part then is working out how long ago the last instance was run so you know if yuo need to wait.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Presumably when a new instance starts, rather than creating a lock, it creates a lock with a timer that auto frees itself after X seconds.
The second instance would wait till the first instance unlocks, and so on.
|
|
|
|
|
hmmm... not quite sure what you mean. But maybe the first thing your app does is to check if another instance is running (maybe with a loop through processes or something), if it finds an instacne, then insert a delay before moving on
Have i misunderstood your requirements?
EDIT: I didnt think of the checking how long first app been running as suggested in previous post. Why do you need the delay for anyway? just out of interest
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
what abt
Thread.sleep();
vikas da
|
|
|
|
|
I wrote a web service and when I ran it on the clent I get the following error. Does anyone have any idea what this could mean? This is the Stack Trace
System.InvalidOperationException was unhandled
Message="There was an error generating the XML document."
Source="System.Xml"
StackTrace:
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Serialize(SoapClientMessage message)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at TestClient.WS.Service1.ExecuteOrder(User u, Order o) in C:\prog\finalProject\BookStore\WSClient\WindowsApplication1\Web References\WS\Reference.cs:line 143
at TestClient.BillingShipping.button1_Click(Object sender, EventArgs e) in C:\prog\finalProject\BookStore\WSClient\WindowsApplication1\BillingShipping2.cs:line 147
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at TestClient.bookList2.CreateOrder_Click(Object sender, EventArgs e) in C:\prog\finalProject\BookStore\WSClient\WindowsApplication1\bookList2.cs:line 80
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at TestClient.Program.Main() in C:\prog\finalProject\BookStore\WSClient\WindowsApplication1\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
|
|
|
|
|
Hi,
webservices are base on SOAP. This protocol uses XML to exchange data. The message is saying that during the serialization of request/response the corresponding XML could not be created. Maybe you should post the client call and the corresponding service method? One of your objects you are passing could be the cause.
Regards
Sebastian
|
|
|
|
|
I want program in c#
NumTrans
There is an integer K. You are allowed to add to K any of its divisors not equal to 1
and K. The same operation can be applied to the resulting number and so on. Notice that
starting from the number 4, we can reach any composite number by applying several such
operations. For example, the number 24 can be reached starting from 4 using 5
operations: 4->6->8->12->18->24
You will solve a more general problem. Given integers N and M, return the minimal
number of the described operations necessary to transform N into M. Return -1 if M can't
be obtained from N.
Definition
Method signature: int GetLeastCount (int N, int M)
Constraints
- N will be between 4 and 100000, inclusive.
- M will be between N and 100000, inclusive.
Examples
1) 4
576
Returns: 14
The shortest order of operations is:
4->6->8->12->18->27->36->54->81->108->162->243->324->432->576
2) 8748
83462
Returns: 10
The shortest order of operations is:
8748->13122->19683->26244->39366->59049->78732->83106->83448->83460->83462
3) 4
99991
Returns: -1
The number 99991 can't be obtained because it’s prime!
|
|
|
|
|
I want one too
My requirements:-
Predict the winning lottery numbers.
Please help me, i need this urgently, please post the source, my time is ulmost up, give now, need by 12pm... etc
P.S. it it national WTF day today?
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
You are going to fail your course. consider what this means for your future as a computer programmer.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
you never now, maybe he is the teacher. He didnt put a specific question so maybe that post was an assignment brief he wanted proof reading.
Christian Graus wrote: You are going to fail your course. consider what this means for your future as a computer programmer.
I completely agree, it seems many people attemp programming as a route for a better life, or better job prospects. Personally i choose the route through sheer enjoyment of the subject, thats why you wil never see my posting for others to do my work.
Solving the problems is half the fun - if not 3/4... or 4/5...
for(int i = 5; i > 0; i++)
thisPost.Write(" or " + i + "/" + (i+1) + "...");
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
|
You are having too much fun.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
If I weren't, I wouldn't be doing it.
|
|
|
|
|
srinivasvaluri wrote: The shortest order of operations is:
4->6->8->12->...
That is not correct. There is not a single solution with that length. You could just as well use the solution that starts 4->6->9->12...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
srinivasvaluri wrote: I want program in c#
Yes, you will want that program, pretty urgentzly, coded by yourself, before the project submission time is up.
|
|
|
|
|
how to extract text from image spam...
|
|
|
|