|
gantww wrote: How would you guys recommend implementing this from a windows service? Is there an easy way to do it?
There is a chapter on Remoting in Professional C# that will provide that exact solution for you.
led mike
|
|
|
|
|
Is that the yellow APress book? If so, I think I may be in luck, as my boss ordered it earlier this week.
|
|
|
|
|
|
Hi guys,
How can i make a bouncing ball program in C#. Lets say, upon a button clicked a ball is droped at the center of a 500 by 500 panel, once the ball/object knows that it has hit to the bottom how can I make the ball/object to move on till it hit to one of the four sided edge and keep going on.
Thanks
|
|
|
|
|
OK, your ball has to move, right ? So you store two variables in your program, they are how far your ball moves in the x and y directions. Then, you set a timer, every time it fires, you move and redraw your ball. When you move it, you check if you're hitting an edge. If you are, then you change the variables, so it bounces back, and changes direction in an appropriate way.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, I have the following code
myClass[] items = getItems();<br />
Type ty = typeof(myClass[]);<br />
<br />
IDataObject dobj = Clipboard.GetDataObject();<br />
dobj.SetData(ty, items);<br />
bool checkClipboard = dobj.GetDataPresent(ty);
Why does it return false if "items" is not null?
anybody with this problem before?
Thanks
|
|
|
|
|
Can someone help to design a cattle pen counting system to monitor the number of cows kept in a pen, (maximum 115). Pen has 2 gates (Exit & Entry). Consider the following processes:
Entry Gate
Exit Gate
Head Count
Need to Fill
Empty Pen
The system must be able to manage about 10 pens with data on each cow including: pen number, breed, weight, colour and gender.
|
|
|
|
|
Homework question? How do you think you should go about this? Make an attept, then come to us to help solve specific problems. You won't learn anything if we do your homework.
|
|
|
|
|
Perhaps he is in a business school and the asssignment is to manage developers working for him.
only two letters away from being an asset
|
|
|
|
|
Doesn't say much for the business school.
|
|
|
|
|
Colin Angus Mackay wrote: Doesn't say much for the business school.
|
|
|
|
|
PHBs don't just come out of nowhere.
--
CleaKO The sad part about this instance is that none of the users ever said anything [about the problem].
Pete O`Hanlon Doesn't that just tell you everything you need to know about users?
|
|
|
|
|
dan neely wrote: PHBs don't just come out of nowhere.
Correct, they fall out of trees when the monkeys take a dump.
led mike
|
|
|
|
|
It's easy - count the legs and divide by 4 (assuming that you aren't dealing with some strange mutant forms of cows with more than 4 legs that is). You'll have to validate with your business users that the cows aren't mutated in any way.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: It's easy - count the legs and divide by 4 (assuming that you aren't dealing with some strange mutant forms of cows with more than 4 legs that is). You'll have to validate with your business users that the cows aren't mutated in any way.
_____________________________________________________________________
Our developers never release
code. Rather, it tends to escape, pillaging the countryside all around.
The Enlightenment Project (paraphrased comment)
Visit Me at GISDevCafe
|
|
|
|
|
I have heard of reading scanned documents and convering to a digital file. But if I want to retrieve some characters from a jpeg or any digital image taken from a digital camera, how can I use C#?
I am actually from industrial engineering branch and want to read some characters from the picture of PCB board that are manufactured so that the components like resistors, capacitors can be detected.
Thx
Purnanand Samant
|
|
|
|
|
OCR is a big task. No-one is going to tell you a way to do it in a post on a forum. You should buy a book if you intend to write your own OCR. If I were you, I'd search for a toolkit to do it, I think Atalasoft have one.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am trying to develop unit tests for the presentation layer of the Model View Presenter. My problem is that I cannot instantiate an instance of my view from the presenter without going through the my .ascx.cs file.
IView view = null; // TODO: Initialize to an appropriate value
How do I initialize this to an appropriate value when I actually get all my values from session info which I cannot access from the presentation layer.
Can someone help point me in the right direction. I have found numerous examples using mocks, but nothing for the unit testing suite included with the IDE.
|
|
|
|
|
You really need to use mocks for this. There are several good mock objects that you should look at, but you really do need to mock the view up.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
After several hours of trying to find a solution yesterday that's about the only option I could find. Unfortunately I've never used mocks before. I guess this will, with the permission of the project lead who thinks I should hardcode everything I need to test, provide me with the opportunity to learn.
Thanks for the advice.
|
|
|
|
|
Hi all,
I'm trying to create a BHO that onDocumentComplete from dweb2 captures the HTML. Currently it works unless I have a DHTML/AJAX page, where it captures the code too soon.
Has anyone any ideas how to capture it when the page is fully loaded (datasource's and all)
Thanks,
|
|
|
|
|
|
Thanks Douglas,
I think the problem is that when your working with an ajax page- the top level gives readystate complete that all frames are fully downloaded - but when your working with an AJAX page the scripts are still running and running off to get their data.
It's not looking likely that there's a simple way to detect when the page is completely loaded =(.
Thanks,
|
|
|
|
|
I've been trying to tackle this all morning.
I have figured out how to export data from C# to an Excel sheet by opening one specific excel file that I have already created. I want multiple applications to write to the SAME excel file. So the first application would open and start editing the excel file. When the second application starts running, I don't want to open Another READ-ONLY version of the excel file. Instead, I want to simply have the second application edit the same file. Is this possible?
I'm pretty sure I'm just having a syntax issue.
Thank you
|
|
|
|
|
shamidi wrote: I want to simply have the second application edit the same file. Is this possible?
Nope. Excel sheets can only have one writer at any one time. Any attempt by other Excel instances to open the sheet will result in a ReadOnly warning.
A better way to do this would be to use an actual database engine, like Access or SQL Server or MySQL.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|