|
Does anyone know where the positions of desktop shortuts are stored? Let's say I have a desktop shortcut and I move its icon to another position on the desktop. It's position is stored somewhere because the icon is obviously restored when you reboot. I tried searching the registry for a uniquely named shortcut I added but I can't find it listed. Perhaps they're stored in a file somewhere?
Right now, this isn't a coding question as such but it may become so if the positions are strored in some arcane place that might need some equally arcane assembly to be used to get them. I figure this kind of information might need a dll import to be added? If it's easy to find I should be ok reading what I need but if it's a tricky bitch to find then, of course, a heads-up will be appreciated.
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
|
|
|
|
|
In HKCU\Software\Microsoft\Windows\Shell\Bags\1\Desktop
The format is a little arcane.
|
|
|
|
|
The data is binary and stored in HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop. The position data is in the "ItemPos..." values. A binary stream is saved for each screen resolution and monitor seperately. The format of this data is not documented anywhere publicly.
The desktop icons positioning data in the running instance of Windows is managed by a ListView. No, don't even think of trying get the .NET ListView control to parse the data for you as it won't work.
The process of pulling this off is quite complicated and not well understood. You can read more about an unfinished attempt to do this here[^].
|
|
|
|
|
|
SledgeHammer01 wrote: It's not? I found it rather easily
It's been a long time since I last looked for that stuff. My definition of "documented" is a bit different than yours. I'm saying it's not "officially" documented by MS. What you linked to is a research project that attempts to reverse engineer the data.
|
|
|
|
|
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.
|
|
|
|
|