|
You need to use p/invoke to call GetWindowText on that text box via it's handle.
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 have read that GetWindowText will not work if I am reading any control outside of the application that is outside of the calling application.
|
|
|
|
|
True! You can also send the WM_GETTEXT message to the window handle without running into that restriction.
But, of course, it gets worse! There nothing that say that the target edit box has to respond to either request! You could go through all this junk and find out that the edit box doesn't care about that message and won't respond to it.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I have a database application that uses a DataGridView to display all records and textboxes, comboboxes, checkboxes, etc., to display each individual record. The user edits the individual record controls to update (or add) records. The comboboxes text field is bound to the appropriate data item in the datatable. Unfortunately, though I can select a new item from the combobox, that item does not get updated to the datasource when I save any updates. The textboxes and such do get updated. Can anyone explain to me why this is the case? Thanks.
|
|
|
|
|
Hello! Sorry for my million annoying questions, but i have another one.
So:
I have i RichTextBox, and i click in the center of some word.
How can i get a full word ?
(is there some methods, or i have to move left and right to spaces?)
Thanks!
One nation - underground
|
|
|
|
|
With the System.Windows.Forms.RichTextBox, yes, you have to do your own code to figure out the word given a location.
If you use the Windows Presentation Foundation (WPF) RichTextBox, there's some built-in things to help you get the run/word/paragraph at a particular point, IIRC.
|
|
|
|
|
Hi guys, I am not sure why everyone is moving on C# besides it microsoft technlogy, provide drag and drop functionality and easy to do programming and coloured syntax. If C++ is powerfull why there wasn't any work get done on it. Infact Windows is also written in C/C++. How come there wasn't any VS2005 kind of editor for C/C++ programmers that could have the "." style object lists . Wouldn't it better if we could have more developement in C++ Apis,syntaxs, memory managements, plug and play controls and component based control progrmaming so we can get more control over what we want to achieve rather than calling C/C++ API functions in C# programming.
Thanks
|
|
|
|
|
netJP12L wrote: How come there wasn't any VS2005 kind of editor for C/C++ programmers that could have the "." style object lists .
VS2005 does C++, and does it pretty well.
C# is easier to use, and easier to write most types of Windows apps. I write some pretty complex and non standard code in C#, it works just fine. If Microsoft were to go under, C# is subject to an external standard, but, either way, I'd lose my platform as well. I know C++, I have been a C++ MVP, as it happens ( I am now a C# MVP, should change my sig ). But, C# is a better tool for a lot of jobs, in my experience. Why would a client pay me double to have the same functionality, have it take twice as long, so they can say it's written in C++ ?
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 agree with Christian and his points. I still feel that I should point out though, that there are very specific cases when C/C++ is a better choice. A case that comes to mind is when outright speed is essential, an example would be a driver. However, C# allows much more rapid user interface development with a lot less coding.
Phil
|
|
|
|
|
I agree, there are times when you need C++. Writing the .NET framework is an obvious example :P
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 )
|
|
|
|
|
Thanks for your response, I do agree what you said but why microsoft or some other regulatory body didn't take the initiative to redesign the C/C++ codeing style and made it what C# offers to programmers rather than coming up with a new language. I mean, lets say in the future someone else come up with new easy language syntax and bit something different everyone gonna be moving towards that then. Why don't we focus entire on Parent language rather than producing child languages.
|
|
|
|
|
There are too many problems with that approach. If you think of this from a business perspective, a business makes more money by selling separate compilers than by selling upgrades that are not necessarily backwards compatible. Then there is the problem of forcing companies to re-write software so that the latest compiler will work with it. Customers don't like to change something that is working just because someone has a better idea or wants to implement things in a different way. There are many more technical problems, that are not business related that have to be overcome. Another perspective is from the customer point of view. As a customer, do you really want to keep re-writing working software for the latest version of the compiler? That is very costly.
If you want an example of this, just look at the year 2000 issue with time and how many banks were worried that their 30 year old COBOL code would break.
Phil
|
|
|
|
|
Hi All,
I have created web service using C#, VS2005. I can browse the web service and check whether the web methods are working fine or not (on my develoment server); so far so good.
I want to deploy this web service on other host, so I created web setup project from VS2005 and created installables. I ran these installables on other host and they got added too (I checked it through IIS manager).
Now when I browse the web service I get the following error message.
"The page cannot be found.
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. "
Could someone let me know what exactly am I missing here.
I am new to both C# and web services, so any kind of help would be much appreciated.
Thanks in advance,
JD.
PS: I have posted the same question in .Net section too as its regarding a Web Service.
|
|
|
|
|
dancelicious wrote: I want to deploy this web service on other host, so I created web setup project from VS2005 and created installables. I ran these installables on other host and they got added too (I checked it through IIS manager).
Why are you intalling the webservice on the other system. Try and set it up manually.
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
I am totally new to web services, so I have no idea how to set it up manually.
In fact even the idea of making an installable was from MSDN.
Could you please tell me how to do it.
Sorry for the dumb question
Thanks,
JD.
|
|
|
|
|
Okay. I think I got how to add it manually.
This is what i did.
On the deployment host, I copied my web service code in a local folder. The through IIS manager I created a virtual directory pointing to this folder.
But again the same problem, I am NOT able to browse it and see the web methods.
Thanks in advance,
JD.
|
|
|
|
|
You might want to turn directory browsing on in the properties of your web service in the IIS manager. You also need to call the asmx file. So through a browser you need to do
www.yourwebservice.com\webservice.asmx where you need your url and the webservice.asmx file name needs to be what ever you set it up to be. If you have not set up the web service in the iis manager and given it the correct host header and made sure your DNS server know where to serve it, those are all potential issues too.
Hope that helps.
Ben
|
|
|
|
|
I already did whatever you suggested.
Like, turn the directory browsing on, called asmx, tried browsing the asmx file through IIS, tried on IE giving the address as http://localhost/tempSvc/tempSvc.asmx; nothing works.
What am I missing here?
- JD.
|
|
|
|
|
It must be on your local box if you are calling localhost. Are you sure the app pool is running along with the web service in the IIS manager? Usually if you get a page not available error it is because of that.
Ben
|
|
|
|
|
Basically I copied the files over to my deployment host and then I am try to check if its running from the host itself; that's why "localhost".
Yes, the app pool is running too and it has corresponding entry for my service too.
But still no luck
Thanks,
JD.
|
|
|
|
|
Sometimes when you use vs to deploy web services it will put them under the default web site. Is there a chance that happened. If that is the case then the url you use would be slightly different.
First you should be able to go into the IIS manager find the webservice.asmx right click on it and browse. If that works then you just need to figure out the correct url. If it is on your local maching you can alway add a web reference to a test project. Adding a web reference it will always show you the web services on your box. You should just be able to click on it and then you can see what the url was set to.
Hope that helps.
Ben
|
|
|
|
|
Hi All,
Thanks for your valuable inputs.
I got the problem.
Under IIS, under Web Service Extensions, ASP.Net was prohibited, after making it "allowed" things started work.
Thanks to all of you again.
JD.
|
|
|
|
|
Hi!
Have you checked that .NET is installed on the other machine?
Just a thought...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Yep, its installed.
Thanks,
JD.
|
|
|
|
|
I have a treeView ... and I want to select a node from code. I did that...but the treeview is expanded.If the treeview is not expanded...and I select from code a node....how can I cake to expand the treeview... and see the node what I selected
|
|
|
|