|
You can't change the values of a Point: they are read only.
Create a new point instead:
private void Form2_keydown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Up)
{
You.Location = new Point(You.Location.X + 1, You.Location.Y);
}
}
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
The online help for the Location property describes the behaviour and how to resolve your problem.
Control.Location Property "Because the Point class is a value type (Structure in Visual Basic, struct in Visual C#), it is returned by value, meaning accessing the property returns a copy of the upper-left point of the control. So, adjusting the X or Y properties of the Point returned from this property will not affect the Left, Right, Top, or Bottom property values of the control. To adjust these properties set each property value individually, or set the Location property with a new Point."
You.Location.X = new Point(You.Location.X +1, You.Location.Y);
Architecture is extensible, code is minimal.
|
|
|
|
|
Assuming You is a Control:
You.Left++;
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
Hello Everybody,
I have a plan to develop an application for URL Monitoring.
I want to monitor All Browsers (IE,Mozila,Google Croma,etc..). and All Pages (Home page + Internal Page Also (if Visit))
It is same like as proxy server for local machine. But i have not exect idea to develop this type of application.
So please help and Suggestion are welcome here.
Thanks
If you can think then I Can.
|
|
|
|
|
One way to do this would be to have your user(s) install a BHO[^].
/ravi
|
|
|
|
|
That doesn't work with all browsers. His only option is using a proxy server, or writing one himself.
|
|
|
|
|
if you want to monitor all network traffic you could write a windows service that either hooks into a system component like winsock.dll, or see if there's something that can monitor network interfaces => would save you having to write an application for every browser you want to monitor I suppose.
|
|
|
|
|
Dear Sir,
Thanks for reply.
I am trying to add Winsock Dll with Application. But it is not adding.
So please explain me how to use it.
Thanks
If you can think then I Can.
|
|
|
|
|
Using a generic definition of "monitoring", any off-the-shelf proxy server will do this already. No code required...
|
|
|
|
|
Dear Sir,
I want to add it with my code so i think code is required.
Can u please describe something regarding Port Monitoring. and Is it fixed IE or Mozila or opera alwase access 8081 port.
If you can think then I Can.
|
|
|
|
|
OK, then you're going ot have to write a proxy server that the browsers will have to use to get to outside web sites. I hope you're up on your TCP/IP programming skills.
eg_Anubhava wrote: Is it fixed IE or Mozila or opera alwase access 8081 port.
I have no idea what you're trying to say here. Port 80 is the normal HTTP port a browser makes requests on (non-secured). 8081 is not assigned to anything.
|
|
|
|
|
Hello everybody,
wininet.dll Provides api(FindFirstUrlCacheGroup etc..) for getting information.But it is only working with Internet explorer. Now Same as I want the information for Mozialla ,Opera, Google Croma.
Help required.
Thanks
If you can think then I Can.
|
|
|
|
|
Yeah. I already told you what your only option is if you want to support all browsers. You must write a proxy server, or get one off-the-shelf that does what you want.
|
|
|
|
|
|
A good while back I started a program to read csv files, classify the lines to separate the chaff from the wheat, then convert the text fields to proper types and save the records to a remote SQL Server database. As usual, I did it half in the bag, late at night after very long days at work, that being the only time I have available. I had to drop it for a couple of months, but I'm now back into it and trying to figure out what I was doing. Predictably, it's a mess - spaghetti code, for lack of a better term. It works, that part that I managed to finish back then, but the major hurdle lies ahead and I'm refactoring the monster before I begin again. But I digress...
I had no trouble using the StreamReader to read the data, and at your collective suggestion, implemented ugly, nasty little Regexes to classify the text lines into keepers and crap. I asked about creating a new database on the remote SQL Server instance, and after being told that it can't be done, did it anyway. All that works great, jumbled mishmash though it is. What's stumping me is this:
On first run, I want to create the database and save all the neccesary connection information in the AppConfig file so I won't have to enter it manually. I can't figure out how to do that, despite searching MSDN for articles on the subject. I believe that there exists a whole class devoted to manipulating the AppConfig file, but I'm stumped and have little time available to search through all the irrelevant links MSDN returns. Can someone give me a quick clue? I know this is trivial stuff, as every program that accesses a database uses it, but I'm not having much luck with it for some reason.
Thanks a bunch in advance. If I didn't have this crowd to assist with the sticky bits, I'd probably quit programming at all, even as a hobby - it so easily becomes incredibly frustrating. I'm unspeakably grateful...
Will Rogers never met me.
|
|
|
|
|
Is the ConnectionStringSettings class[^] what you are looking for?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
Excellent! Thanks a bunch!
Will Rogers never met me.
|
|
|
|
|
|
Thanks!
The previous answer adressed the specific problem, and yours the more general one. I appreciate it!
Will Rogers never met me.
|
|
|
|
|
Roger Wright wrote: as every program that accesses a database uses it
Mine don't.
Roger Wright wrote: the sticky bits
Most developers here don't have to worry about those; just we in the desert.
|
|
|
|
|
PIEBALDconsult wrote: we in the desert.
It wouldn't be such a problem if they'd let us wear our birthday suits at work. A little breeze goes a long way.
OT - Are you getting the frigid winds there, too? Brrrrr....
Will Rogers never met me.
|
|
|
|
|
Roger Wright wrote: wear our birthday suits at work
Way, way, way, TMI...
Now I have to get that image out of my mind. Naked developers.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
Fear not - I'm not a developer. Imagine, instead, naked engineers!
Will Rogers never met me.
|
|
|
|
|
Sounds like a Dilbert episode...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|