|
Yes:
private delegate void displayCallback();
private void display()
{
if (InvokeRequired)
{
BeginInvoke(new displayCallback(display));
return;
}
....
}
|
|
|
|
|
ATCsharp wrote: I have many user controls on a single form that each present different data. This is a small utility that displays the status of different applications and systems. Each user control, as of now, has two threads. 1 thread will update the data source and the other thread will update the user interface.
What causes an update? You have a data source that's being updated as well as a user interface, so where does the update come from?
If the updates take awhile, can you represent the progress of the update to the user (probably using a progress bar) so that the app doesn't appear stuck?
More info is needed.
|
|
|
|
|
Hi all,
i am writing an application to communicate between local and remote machine using STAF tool.
I can have a one way communcation but i want to have a both way communication. Like local machine abc.exe runs def.exe over remote machine and then remote machine goes back to local machine to ask what task to perform and then local exe says calc.exe to run and remote machine performs that.
So below is the psueudo code to achieve this but could any one help me out in converting this to C#.NET. i tried this out but i am getting exception at the moment. So here is the psuedo code
abc.exe (started by machineA)
-- STAFHandle::create("ABCApp", handle);
-- handle->submit("machineB", "PROCESS", "START COMMAND def.exe");
-- handle->submit("local", "QUEUE", "GET WAIT");
---- when the "ReadyForInput" message is received from DEFApp,
----- handle->submit("machineB", "QUEUE", "QUEUE NAME DEFApp MESSAGE Start:Calc");
---- when the "Finished" message is received from DEFApp, continue to next executable to run and queue another message to DEFApp, etc...
def.exe (started, by abc.exe, on machineB)
-- STAFHandle::create("DEFApp", handle);
-- handle->submit("machineA", "QUEUE", "QUEUE NAME ABCApp MESSAGE ReadyForInput");
-- handle->submit("lcoal", "QUEUE", "GET WAIT");
--- when the "Start" message is received from ABCApp, parse the program to run (Calc)
---- handle->submit("local", "PROCESS", "START COMMAND Calc.exe");
---- when Calc.exe completes,
----- handle->submit("machineA", "QUEUE", "QUEUE NAME ABCApp MESSAGE Finished:Calc");
//submit function is already created with parameters which submits the command to local or remote machine.
Thanks a lot.
SS
-- modified at 8:05 Monday 16th April, 2007
|
|
|
|
|
Software_Specialist wrote: i tried this out but i am getting exception at the moment.
Show us the code you got so far and tell us what exception you're getting.
It's quite hopeless to wait for someone turning your pseudo-code into running C# code. This is a forum for helping others with their problems and not doing their whole work.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
ok this is what i did,
ABC.EXE LOCAL MACHINE
here local machine is machine A and remote machine is machine B
static void main()
{
STAFHandle handle = new STAFHandle("MyProgram");
handle.submit("machine B", "process", "start command C:\\def.exe");
handle.submit("<machine a="">", "QUEUE", "GET WAIT");
handle.submit("machine B", "QUEUE", "Queue NAME YourProgram MESSAGE Start:calc");
}
DEF.EXE REMOTE MACHINE
here local machine is machine A and remote machine is B
static void main()
{
STAFHandle handle = new STAFHandle("YourProgram");
handle.submit("<machine a="">", "QUEUE", "QUEUE NAME MyProg MESSAGE ReadyForInput");
handle.submit("<machine b="">", "QUEUE", "GET WAIT");
handle.submit("machine B", "PROCESS", "START COMMAND Calc.exe");
handle.submit("machineA", "QUEUE", "QUEUE NAME MyProgram MESSAGE Finished:Calc");
}
so when i step over abc.exe, the moment it execute
handle.submit("machine B", "process", "start command C:\\def.exe");
i get error over remote system that def.exe has encountered a problem and needs to be closed.
SO any idea how to solve this and process, queue are services already defined in STAF
Thanks
|
|
|
|
|
Better to try convertors available free to download, But doest guarantees the bug free code.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Not a good idea as its only a small piece of psuedo code. And i guess to convert you need a running applciation.
Anyway Thanks
SS
|
|
|
|
|
Hi,
I would like to write a .Net Assembly that should run as a scheduled
task in windows. I dont need any user interface. What kind of project I need to create in Visual Studio for this solution? Please help and also any samples would be helpful too.
Thanks in adv.
|
|
|
|
|
You probably want to create a window service. A windows service will run even when no one is logged into the computer, which is often desired when you have scheduled tasks. You do have to run the installutil to install a .net windows service, so that can be a little complicated. You also need a login and password for the service to run as.
I wrote an article that has a windows service in the sample code.
http://www.codeproject.com/dotnet/OpenFiles.asp[^]
It isn't a scheduler windows service it just checks things on a timer, still it can give you an idea what what a windows service looks like.
Usually you need to add a timer control to the windows service to get a scheduler to work anyway. If you know what time you want the schedule task to run you se the timers elapse time to be the correct amount of milli seconds before the event should run. Then the timers elapsed method will fire. Once that method is over at the end you should re-set the elapsetime to the proper amount of time before it should run again.
Well, I hope that helps.
Ben
|
|
|
|
|
hello folks
i'm trying to create a class diagram,in VS 2005 but the option to add Class Diagram from Add New Item is missing. how can i add a class diagram template into my project??
reply soon
awaiting all replies
Sair
|
|
|
|
|
hello saira, well according to me the class diagram about which u r asking is not added by going to Add item.
But Try this one hope this helps you.
Right click to ur project name in solution explorer and than there comes an option "View Clss Diagram" clik it, u will get what u r looking for.
reply
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
thanks fo the reply sulabh, but i don't get that option either.
Any other suggestion???
can i include this option from some hidden source maybe??
|
|
|
|
|
Hi saira, first off all tell me what application u r using in vs2005.
Actually i m working over same platform in windows application.
reply
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
i'm working in C# on a window based application.
|
|
|
|
|
y afrom that only i found the solution for you. Again right click over ur project name in solutionexplorer and u can see last 9Th option "View class digram"
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
there is still no option for Viewing anything when i right click on the project name in the solutions explorer.
Thanks for ur time though
Regards
Saira
|
|
|
|
|
The main requirement to view the class diagram is that the project should be once compiled.
Also for ur refrence i m sending u a link go thru it.
http://www.codeproject.com/useritems/Class_Diagram_in_VSNET.asp
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Do you know how to use Interfaces which are predefined in c#.
Actually i have a problem in using the interface called"
Microsoft.Office.Interop.Word.TableOfContents
Can u know how to do same.?
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
It's not good to hijack another user's question. Please don't.
Also, you've got a thread going about this below. Use that thread.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Which edition of Visual Studio .NET 2005 are you using? The Class Diagram doesn't exist in the Express Edition. It's only available in the Standard, Professional, and Team System Editions.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hello Dere,
I m Facing a problem in making automatic indexing to my word document generated through c# code.
What i know abt this is, their is an interface name TableOfContents thrpough which we can add Table of content and using its Mark entry method we can solve the problem.
But real this is that i can able to use this interface,
Can anyone plz help me in this.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Please find solution on google.Do not put any problem or error on any forum.
|
|
|
|
|
The Word.Document class has an Indexes collection associated with it. You just need to add your interface there.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
well thanks for ur kind reply, but again there a question of how to use this Indexes interface in our c# code.
I m trying it from last 5 hrs but able to crack the same.
Can u plz help me in getting the code.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
hi
how to add a bitmap in the sourcegrid control?
HOW to insert bitmap in the sourcegrid control?
Thanks,
Rock
|
|
|
|