473,612 Members | 2,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Doing The Impossible

Hello, I have been given a programming task that falls into the "impossible "
category with my current skill set. I am hoping somebody out there knows
how to do this and can save my b-t.

I work for a large University. I wrote a Windows-based database application
for my department that is used in purchasing. The University has just
released Web-base application that does the same thing using a sub set of
the data that my application uses. The people in my department hate it and
want to keep using my application, however, the University application MUST
BE USED to order. What my users have asked for is a way of doing a mass
copy and paste of the needed information from my Windows app to the Web app.
I have talked to the University's programmers and there is absolutely no
chance of them changing their application to facilitate this. It all has to
be done from the Windows app.

Obviously information could be cut and pasted a field at a time, but they
would like a massive copy and then go to the web form and paste, paste,
paste.

Is there a way to do this from the clip board? From a text file? Can I
assign a hot-key programmaticall y to paste things off the clipboard or text
file?

Any help is greatly appreciated.
Nov 16 '05 #1
27 1899
Hi Greg,

It's not entirely clear to me what you want. I did some experiments
sending information to another program (PuTTY) from my C# program using
the clipboard, and it worked fine. I put some text on the clipboard, sent
a WM_PASTE message to PuTTY and restored whatever information was on the
clipboard to begin with.

However, this does not answer your question about mass copy.

I believe it can be done, but I don't know in what way the information
needs to be retrieved and pasted.
Happy coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #2
Could you communicate with the web-based application using HTTP? ie request
the data-entry pages and then POST the values you want to store. Do this in
a bacth for each record.

Obviously that's a massive over-simplification but it might give you some
ideas.

Stu
"Greg Smith" <gj*@umn.edu> wrote in message
news:ex******** *****@tk2msftng p13.phx.gbl...
Hello, I have been given a programming task that falls into the "impossible " category with my current skill set. I am hoping somebody out there knows
how to do this and can save my b-t.

I work for a large University. I wrote a Windows-based database application for my department that is used in purchasing. The University has just
released Web-base application that does the same thing using a sub set of
the data that my application uses. The people in my department hate it and want to keep using my application, however, the University application MUST BE USED to order. What my users have asked for is a way of doing a mass
copy and paste of the needed information from my Windows app to the Web app. I have talked to the University's programmers and there is absolutely no
chance of them changing their application to facilitate this. It all has to be done from the Windows app.

Obviously information could be cut and pasted a field at a time, but they
would like a massive copy and then go to the web form and paste, paste,
paste.

Is there a way to do this from the clip board? From a text file? Can I
assign a hot-key programmaticall y to paste things off the clipboard or text file?

Any help is greatly appreciated.

Nov 16 '05 #3
hmmmm....

on the one hand i don't think the users should be allowed to dictate what
should be done

on the other, what they really want is shared data - not necessarily
copy/paste functionality

the solution is to look for another way to share the data between the 2
apps - definitely not the clipboard -at least not in my opinion

i would suggest looking at - .Net remoting - to have your desktop app grab
the data from the open Web form

- thats just a preliminary analysis with the little knowledge i have but you
for me, you cannot go with a copy/paste formula
thats a user perspective of how to fix what is primarily a software
engineering problem

you will probably have to develop a web service for this

key questions would be:

does the webApp use XML?
does it use .Net WebForms?
does it use ASP.Net?
how does it access and communicate with the data base?
how is the data stored in the browser? - HTML <Form> element? php, jsp etc?
....

as a worst case scenario where copy/paste is considered viable clipboard
sharing across domains is possible in .Net

hope this helps to at least give you a start
"Greg Smith" <gj*@umn.edu> wrote in message
news:ex******** *****@tk2msftng p13.phx.gbl...
Hello, I have been given a programming task that falls into the "impossible " category with my current skill set. I am hoping somebody out there knows
how to do this and can save my b-t.

I work for a large University. I wrote a Windows-based database application for my department that is used in purchasing. The University has just
released Web-base application that does the same thing using a sub set of
the data that my application uses. The people in my department hate it and want to keep using my application, however, the University application MUST BE USED to order. What my users have asked for is a way of doing a mass
copy and paste of the needed information from my Windows app to the Web app. I have talked to the University's programmers and there is absolutely no
chance of them changing their application to facilitate this. It all has to be done from the Windows app.

Obviously information could be cut and pasted a field at a time, but they
would like a massive copy and then go to the web form and paste, paste,
paste.

Is there a way to do this from the clip board? From a text file? Can I
assign a hot-key programmaticall y to paste things off the clipboard or text file?

Any help is greatly appreciated.

Nov 16 '05 #4
Hello Greg,

You could write a simple C# app hosting the IE Web Browser control (yes yes
it will be a simple specialized web browser). Your users would then open the
University's Web app in that browser, navigate to the page where data should
be pasted, and here comes the trick. Your existing app should be able to
copy all necessary data to the clipboard using some predetermined format
(say, CSV or even better - XML) - I hope this is not that hard to implement
.. The specialized browser, in turn, should be able to read the data from the
clipboard in that format and toss them to the Web page fields by using the
IE page object model.

Does this make sense?

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Greg Smith" <gj*@umn.edu> wrote in message
news:ex******** *****@tk2msftng p13.phx.gbl...
Hello, I have been given a programming task that falls into the "impossible " category with my current skill set. I am hoping somebody out there knows
how to do this and can save my b-t.

I work for a large University. I wrote a Windows-based database application for my department that is used in purchasing. The University has just
released Web-base application that does the same thing using a sub set of
the data that my application uses. The people in my department hate it and want to keep using my application, however, the University application MUST BE USED to order. What my users have asked for is a way of doing a mass
copy and paste of the needed information from my Windows app to the Web app. I have talked to the University's programmers and there is absolutely no
chance of them changing their application to facilitate this. It all has to be done from the Windows app.

Obviously information could be cut and pasted a field at a time, but they
would like a massive copy and then go to the web form and paste, paste,
paste.

Is there a way to do this from the clip board? From a text file? Can I
assign a hot-key programmaticall y to paste things off the clipboard or text file?

Any help is greatly appreciated.


Nov 16 '05 #5
Hi Greg,

What interface does the web application use? If you are lucky enough to have
a set of stored procs or web services that the web application uses then
maybe you could interface at a deeper level, and enable your users to do the
purchasing from the windows application.

A mass copy-paste scenario is a tricky and highly unreliable solution. Apart
from being incredibly difficult to implement, it doesn't solve the usability
problem of the web application. If you can interface at a deeper level then
you can still have your windows application feed data into the new web-based
system (but ofcourse you will skip the front-end altogether).

Tip: Check out the "'Auto-Complete" feature of the downloadable IE toolbar
offered by Google.

Good luck!
Luke Venediger
http://blogdotnet.blogspot.com
"Greg Smith" <gj*@umn.edu> wrote in message
news:ex******** *****@tk2msftng p13.phx.gbl...
Hello, I have been given a programming task that falls into the "impossible " category with my current skill set. I am hoping somebody out there knows
how to do this and can save my b-t.

I work for a large University. I wrote a Windows-based database application for my department that is used in purchasing. The University has just
released Web-base application that does the same thing using a sub set of
the data that my application uses. The people in my department hate it and want to keep using my application, however, the University application MUST BE USED to order. What my users have asked for is a way of doing a mass
copy and paste of the needed information from my Windows app to the Web app. I have talked to the University's programmers and there is absolutely no
chance of them changing their application to facilitate this. It all has to be done from the Windows app.

Obviously information could be cut and pasted a field at a time, but they
would like a massive copy and then go to the web form and paste, paste,
paste.

Is there a way to do this from the clip board? From a text file? Can I
assign a hot-key programmaticall y to paste things off the clipboard or text file?

Any help is greatly appreciated.

Nov 16 '05 #6
Come to think of it, since it's a web application you probably need to
send WM_PASTE to Internet Explorer, if that works.

Happy coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #7
"Greg Smith" <gj*@umn.edu> wrote in message
news:ex******** *****@tk2msftng p13.phx.gbl...
What my users have asked for is a way of doing a mass
copy and paste of the needed information from my Windows app to the Web app. I have talked to the University's programmers and there is absolutely no
chance of them changing their application to facilitate this.


Sounds rather like a data migration user requirement. How about discussing
the possibility of (you or the University's programmers) doing that?

Brad Williams
Nov 16 '05 #8
The way you describe the solution, I would look at it as doing the
impossible too, however, if you can convince the university programmers to
provide Web services on the server, you are back in business (tell them it
is cutting edge, that they will look important, etc, etc).

"Greg Smith" <gj*@umn.edu> wrote in message
news:ex******** *****@tk2msftng p13.phx.gbl...
Hello, I have been given a programming task that falls into the "impossible " category with my current skill set. I am hoping somebody out there knows
how to do this and can save my b-t.

I work for a large University. I wrote a Windows-based database application for my department that is used in purchasing. The University has just
released Web-base application that does the same thing using a sub set of
the data that my application uses. The people in my department hate it and want to keep using my application, however, the University application MUST BE USED to order. What my users have asked for is a way of doing a mass
copy and paste of the needed information from my Windows app to the Web app. I have talked to the University's programmers and there is absolutely no
chance of them changing their application to facilitate this. It all has to be done from the Windows app.

Obviously information could be cut and pasted a field at a time, but they
would like a massive copy and then go to the web form and paste, paste,
paste.

Is there a way to do this from the clip board? From a text file? Can I
assign a hot-key programmaticall y to paste things off the clipboard or text file?

Any help is greatly appreciated.

Nov 16 '05 #9
Greg Smith wrote:

Hello, I have been given a programming task that falls into the "impossible "
category with my current skill set. I am hoping somebody out there knows
how to do this and can save my b-t.

I work for a large University. I wrote a Windows-based database application
for my department that is used in purchasing. The University has just
released Web-base application that does the same thing using a sub set of
the data that my application uses. The people in my department hate it and
want to keep using my application, however, the University application MUST
BE USED to order. What my users have asked for is a way of doing a mass
copy and paste of the needed information from my Windows app to the Web app.
I have talked to the University's programmers and there is absolutely no
chance of them changing their application to facilitate this. It all has to
be done from the Windows app.

Obviously information could be cut and pasted a field at a time, but they
would like a massive copy and then go to the web form and paste, paste,
paste.

Is there a way to do this from the clip board? From a text file? Can I
assign a hot-key programmaticall y to paste things off the clipboard or text
file?

Any help is greatly appreciated.


Couple of ways to do this:

- In your application, use the .NET web controls to create a POST response
that mimics the web response. You wouldn't even require that IE was running,
it could all be done behind the scenes. Caveats: if the web page POST format
changes, you will need to update your app; this method could be complicated if
there are cookies, logins, or navigation that is required before the POST will
be accepted.

- Instead of considering this one big copy/paste operation, look at it as a
series of single copy/paste operations. You could enable your application to:
open an instance of IE and navigate to the entry screen (or have the user
manually do that); then, text-box by text-box, iterate over the controls in
your application, copy the text, and paste into the corresponding text-box of
the web app. You would need to create a mapping between your text-box
identifiers and the text-box identifiers used in the web page, I'd recommend
using an external configuration file that can be quickly and easily modified if
the web page layout changes.

I'd consider the first option as the best solution as it can do the entire
operation behind the scenes and your users don't have to mess w/ the web
version at all.
Nov 16 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1429
by: Piotre Ugrumov | last post by:
I have tried to modify my exercise about the simulation of the life in the savannah. Now I have only 2 errors but I don't comprehend how resolve these errors. If I try to call the method getX() and getY() of the class Animale from the class Leone, the compiler return to me the same errors. These are the errors: c:\Documents and Settings\Angelo\Documenti\Visual Studio Projects\Savana\Leone.cpp(36) : error C2248: "Animale::x": impossible to...
0
1044
by: Gianluca | last post by:
Is is true that it's impossible to write a C# wrapper for an IDispatch COM object that has more than one property with parameters? I tried everything I could think of and nothing works. You can only use the this indexer for one parametrized parameter. If this is true, anyone knows if this limitation has been lifted in 2.0? It also appears to be a bug in the proxy that marshals calls to the COM interface is unable to call...
33
1992
by: bonk | last post by:
I have an application that needs to perform some background work, i.e. Logging, wich must not block the main thread. How would I basically design such a scenario? It is obvious that I should do that on an extra thread but I think it is a bad idea to spawn a new thread everytime a log-message is written and let it die once the message was written. But how do I keep a thread alive and trigger the log-messages and pass the string to that...
2
1189
by: Cat | last post by:
I created a web site, and I thought I followed XHTML 1.1 rules. But when I validated the pages, I got some error messages. I found that those codes are automatically generated parts by ASP.NET. There is no attribute "name". <form name="form1" method="post" action="Default.aspx" id="form1"> And input is not allowed here Since ASP.NET buttons should be placed in server side forms, I don't know how to remove this error. So, what this...
3
1715
by: Prometheum | last post by:
Having read over some of the disscussions involving incrementing variable names in C++, I have the impression that it's impossible. Is that true? I have a very definite need for them in the following program, and an array won't work. I need to read over a file and store certain information in a struct (person dave; dave.money=200 etc.). However, to stay true to the spec I shouldn't assume that there will always be x many entries I need to store....
4
3680
by: John Harrison | last post by:
Jeroen recently asked a question where he was trying to put arbitary types onto a list and then do something useful with them afterwards. Not possible I said, in my usual tetchy manner. Noah Roberts then pointed me to the boost::any type. Makes no difference I said. Well having thought about it, I've changed my mind. The following code
9
2614
by: Gabriel | last post by:
Hello, I installed SQL server 2005 SP1 on a Windows XP SP2 From Visual Studio, I'm trygin to create a connection to a database, but I receive this error but I'm creating the connection (I don't receive the database list in the dropdown) "An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that
2
268
by: oddvark | last post by:
Hello, dispose() is a function of dragtool. In the code below, its called but without the (). if(parent->dragTool != null) { parent->dragTool.dispose; }
0
8173
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8617
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8568
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8254
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8422
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5537
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4111
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2555
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.