|
Guys, I appreciate the links and information. It all seems a lot of work for what I thought was a simple thing to achieve. It seems it's anything but!
I'll mull it over and see if the effort involved is proportionate to what I wanted to do.
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
|
|
|
|
|
|
WidmarkRob wrote: Can this random class work with an array of characters going 100% across the
console window
You're going to have to expound on that a bit to get any kind of a reasonable answer.
What do you mean by "an array of characters going 100% across the console window"??
|
|
|
|
|
let's start with trying to make a console window open in full screen.
I tried using the method SetWindowSize(100%);
I get a, Invalid Expression ')'
|
|
|
|
|
|
Cookie for the obvious one!
|
|
|
|
|
Of course you do, in c# 100% isn't valid. 100%3 returns 1 because % is the modulus operator and 100 MOD 3 = 1. The compiler is reading 100% "100 MOD", then it is missing the second operand, so it throws the invalid expression.
SetWindowSize takes two arguments anyway[^], the number of [character] columns and the number of [character] rows, so there is no way this line could work.
|
|
|
|
|
Nevermind, I did a little bit of looking around online… I guess, ever since XP… You can't create a fullscreen console window anymore without using Pinvoke…
That's a little too much trouble to go through, I'm a newbie/hobbyist C# programmer… I'll just use a Windows form for my project, thanks for the input…
|
|
|
|
|
If I was you,
I would build a solution and inside that solution I would place 3 projects.. maybe more.
1, DLL - where all your business logic lives.
2, Console Application
3, Windows Application.
Both Project 2 and 3 will ref the main dll, or main dlls for their logic so you can have all your
logic inside the dlls and then project 1 and 2 will just serve as the application interfaces.
Should solve the problem without adding to much extra complications..
Then your users will simple have two apps.. one windows mode, and one cmd line..
each app will run the same code pretty much.
You can go even further by inheriting the base dll, and then adding your own 2 or 3 spec code to them.
Good luck!
=)
|
|
|
|
|
I do this:
Console.SetWindowPosition ( 0 , 0 ) ;
int h = Console.LargestWindowHeight + HeightAdjustment ;
Console.WindowHeight = h ;
int w = Console.LargestWindowWidth + WidthAdjustment ;
Console.WindowWidth = Console.BufferWidth = w ;
I find that a HeightAdjustment of -4 and a WidthAdjustment of -1 work fairly well.
|
|
|
|
|
The one has nothing to do with the other. How are you intending to populate the characters?
|
|
|
|
|
Hi,
Is there a way for select multiple pdf area with mouse and get it's coordinates using c#?
Thank you in advance
|
|
|
|
|
You have all the mouse events available to you, you would need to have a way of defining the location and size of the PDF, then you do it with a couple of clicks, top/left and bottom/right. That would define the area withing the already defined document area.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi
Eventually, I did
I used Adobe PDF Reader object in the form itself (axAcroPDF).
I open the pdf file in this object.
and then I create the MouseUp, MouseDown and MouseDrag event.
It only can detects outer layer of the pdf object.
It could not detect the pdf inside..
That's why i want to get some advise,
is there any alternative.
Thanks
|
|
|
|
|
|
Hi many thanks for the recommendation.
any free SDK or API to use?
my main object is
I highlight the text in the pdf.
I hit a button, it captures the coordinate of it..
I could not find much information pertaining the axAcroPDF.
Thanks
modified 16-Aug-13 7:13am.
|
|
|
|
|
Hi,
I have an windows application. On button click, I call a service called ServiceA (ServiceA is in my local machine). From ServiceA's method, I hit database and retrieve some records. After retrieved, I call another WCF service called ServiceB (ServiceB is availabled in another machine within network). I have added ServiceB's proxy files in my ServiceA's project. endpoints and bindings are added in wwwroot\web.config. When I try to consume ServiceB's method, I am getting the following error.
Could not connect to http://tde017:8080/AdapterService/AdapterService.svc. TCP error code 10013: An attempt was made to access a socket in a way forbidden by its access permissions 17.21.11.17:8080
Previously, it throws with the port number 80. I configured the another port 8080. Now error is throwing with 8080.
But, If I consume the serviceB directly from my windows application, I am getting response. If I go through another service, I am getting error.
I tried many scenarios. But, still I could not get solution. Any one help me on this....
Thanks in advance.
Regards,
Bala
Balasubramanian K.
|
|
|
|
|
Please don't post the same question in multiple forums.
Use the best guess
|
|
|
|
|
Dear C# enthusiasts,
I am currently developing a C# application that controls some test equipment and performs functional tests on a product. This type of application is inherently sequential in nature so I have thus far avoided muddying the water with issues of multi-threading.
However, I am dissatisfied with my programs because the UI is not responsive while my functional test loop is running. At the moment the limit of my programming skill only allows for dirty calls to Application.DoEvents() in order to process data on my UI as the test is executing.
It seems, then, that whilst my program is inherently sequential I would benefit from having the UI and the test loop running concurrently. And now we arrive at the core of my question:
What multi-threading method is the path of least resistance for this kind of application given that I am not very experienced in C#?
So far I have read about the background worker and tasks. My understanding is that tasks are the way forwards for .net developers and that it's becoming very important to have a grasp of them. I read some articles about it here on Code Project but unfortunately I have found them difficult to follow. That is a reflection upon my level of competency, not the articles themselves.
I am willing to persevere with tasks to gain full understanding but only if that knowledge is likely to be of significant benefit to me in the future.
Advice and comments are welcome.
Thanks,
Brian.
Electronics Engineer, Computer Programmer and general GEEK.
|
|
|
|
|
|
Brian, see this[^] article. BackgroundWorker may be exactly what you need to quickly get your test harness app to be responsive.
/ravi
|
|
|
|
|
Thank you for the replies both. I take your points and I will be familiarising myself with the background worker over this coming weekend.
By the way, I have heard a few recommendations for Head First C# (the source of the linked article) and I think perhaps I should grab myself a copy.
Kind Regards,
Brian.
|
|
|
|
|
I haven't been impressed by the HeadFirst series. IMHO, they tend to oversimplify the material and add unnecessary fluff to the subject. I recommend Programming C#[^] (O'Reilly Press).
/ravi
|
|
|
|
|
Thank you for the book recommendation Ravi. I have just purchased Head First C# via Google Books and already I can see what you mean by "unnecessary fluff". It's probably a good book for someone who is not only new to C#, but new to programming completely. I'm not new to programming and I'm not completely new to C# either. I'm somewhere in between beginner and amateur as far as C# is concerned I think. Still, I don't mind having a beginner's book to hand because sometimes that's just what you need when you're trying to find out about some particular aspect of something.
I have had success with other books in the O'Reilly Press series. Namely Learning Perl, Intermediate Perl, and Mastering Regular Expressions.
I think I will give your book recommendation a whirl!
Thanks again,
Brian.
|
|
|
|
|
Background workers will solve this issue for you.
They are real easy to use.
You just have some limits on how you interact with them..
But, by default your UI will run in the same thread and it will freeze if you have some other code that fired off from the ui with no threading.. and that is the problem you a experiencing.
You can use a background worker and fire off the thread and the Dowork sub will then run in the background and will not freeze the ui. I would suggest you read up a little on background workers but they can help a ton with UI freezing issues.
=)
|
|
|
|