473,804 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

baffling C# question

I have posted this before, but no one responds, so here
it goes again. I think my question is intimidating people
and I have no idea why?!? This is not a new concept. You
can do this with other programming languages, so why is
C# so different? Again, here is my baffling C# question.

I have C# code that opens an application, but right after
it opens I am confronted by prompts for information
(i.e. "Please enter your id"). I would like to handle
these prompts programmaticall y with C#. Is there some C#
code that passes a value to a prompt and then forces
the "ok" button?
Nov 15 '05
12 1518

"Mike" <mi**@nospamher e.net> wrote in message
news:00******** *************** *****@phx.gbl.. .
Excellent question. I'm building a solution to a years-
old company procedure, which is "set-in-stone" (for lack
of better terminology). This procedure is so ingrained,
and the Access application is so widely distributed, that
to change any part of the Access portion of it is a big
no-no. I agree, changing the Access Report would be a
simple solution. But since that is not an option, I have
to use C#...which is really not so bad, because I am
learning by leaps and bounds about C# and what it is
capable of.


Sorry for continuing to pursue this thread, even though the decision itself
may not be within your control, however I can't help but question the
fundamental choice to dismiss the most obvious solution for some half baked
approach.

While learning C# may benefit you, it doesn't directly benefit the users at
all.

Why is distributing a new version of the report is more difficult to
distribute than your C# solution? The new report need not replace the
current one, so I don't see how having an additional report listed will
cause any problems whatsoever. The entire process of adding the report to
their existing Access application can be completely automated with a
installation tool. You don't need to redistribute the entire Access
database and all that it contains: no tables, forms, or other structures
besides the report itself need to be sent or modified. The end result will
be just one more Access report listed with a name of your choosing that can
reflect why and how it exists. I can't see how that will be much of a
problem..

If the process is so ingrained, you're still modifying it one way or
another, regardless of the programming tool used or how it's distributed.
Somehow they're going to need to run your C# app, and I'll bet it will be
more difficult to learn and use than choosing a different report in Access.

If you've read this far into my reply, I'll make it worth your while to bear
with me on this point.

The direct solution to your problem is to not rely on Sendkeys or the focus
state of that window. The only reliable means is to get the windows handle
(hWnd) of that window and the controls used so that you can send windows
messages to them directly using the Win32 API. There are tools to inspect
the window properties of applications at runtime, and these tools use
published APIs to track down any window created using the standard API.
Therefore, this technique is complex, but well-known and understood by those
of us who know the Win32 API. To learn how to use this approach is a rather
advanced for a novice, because there's no shortcuts to learning the Win32
API. There are tools that can help such as Spy++ and pview (VS6), but you
still need to understand what's going on at the API level to make much use
of them.

Daniel Appleman's Spyworks is great product that has rolled up many of these
APIs into components. While this product was originally designed for VB
programmers, it has been updated for dotnet.

His site and his books contain some of the best available info for Windows
programming on the net.

http://www.desaware.com
Nov 15 '05 #11
Hey, I only said that because I've seen you cross post this alot and
never answer any questions back at you, that's all.

"Mike" <mi**@nospamher e.net> wrote in message news:<01******* *************** ******@phx.gbl> ...
Convince you? I think not. I have a legitimate
programming question regarding Access reports which I
have already explained in detail through multiple posts.
If you want to live in fear of my "oh-so-scary" Access
application, then that's your choice.

Nov 15 '05 #12
Mike still hasn't solved this yet??

I really think you are barking up the wrong tree.. Access (even with new
fancy bells/whistles) - is a nasty, nasty legacy app.. you are better of
using legacy tools.. or migrating off Access.. To try to mix the two will
probably end up being a mess. Whip up a VB6 app with DAO and that should get
you fixed up..

"Chris Hornberger" <ch***@chornbe. com> wrote in message
news:53******** *************** **@posting.goog le.com...
Hey, I only said that because I've seen you cross post this alot and
never answer any questions back at you, that's all.

"Mike" <mi**@nospamher e.net> wrote in message

news:<01******* *************** ******@phx.gbl> ...
Convince you? I think not. I have a legitimate
programming question regarding Access reports which I
have already explained in detail through multiple posts.
If you want to live in fear of my "oh-so-scary" Access
application, then that's your choice.

Nov 15 '05 #13

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

Similar topics

1
1956
by: Ben Floyd | last post by:
It goes like this: Im converting a perl script that executes a command on each result of a directory listing. In perl, all is well. In Python, using approximately the same logic creates a seemingly random problem I can't pin down. I hesitated to ask this question since it's so Slackware Linux-centric, and im new to Python. It's hard to ask in a generic way, but im out of options...
5
4596
by: TimS | last post by:
I am getting a baffling File not found error (0x800A0035). I am writing asp on a windows 2000 server. I build a path and filename from several fields in a jet database using SQL commands, like this: Sql = "SELECT dirs.rootname,dirs.dirname FROM dirs" RS.open Sql RS.movefirst do while not RS.EOF temp1=trim(RS("rootname"))
8
1980
by: Michelle | last post by:
I have tried every variation of the "onchange" statement below without any actual reloading of the page: The FireFox javaScript Console reports the following message: Error: missing : in conditional expression Source Code: location.href=themes.php?scheme=(form.color_schemes.options.value) My Code for the dropdown box is: <form name='color_schemes' method='post' action='themes.php' >
2
1819
by: bfrasca | last post by:
I have a well-formed XML file that I am trying to load into a dataset using the ReadXML method. It keeps telling me that "there are multiple root elements". I can view the data using XML Designer in Visual Studio 2003 without any problems and the schema and file have been validated using several different tools. I even successfully generated a typed dataset with Visual Studio 2003 by importing the XML into my project. I'm baffled, does...
3
3096
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table before rowID answID qryrow questionID datafield 1591 12 06e 06e 06e question 1593 12 06f 06f 06f question 1594 12 answer to the question 06f
2
1368
by: Double Echo | last post by:
Hi, Forgive me if I ask a dumb question, I'm new to classes and object programming with PHP, and cannot figure out what the problem is with this class. Maybe I have overlooked something but just can't see it. The error message usually means a typo or something that I missed. I get this error: Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in crypt_class.php on line 6
4
1066
by: CharlesA | last post by:
I'm using .net framework 1.1 C# and ASP.net with IE 6.0.2800 I'm using the very traditional idea of having a logo at the top left of the page which when clicked takes you to the home page This is the markup: <a id="logo" href="Entry.aspx"><img src="../images/logo.gif"></a> the trouble is, when I click it, it gets an unsightly purple border around the image which indicates that the image has been visited.
9
1278
by: djconner | last post by:
I'm a total neophyte in Javascript, trying to hack something together fast, and run into something that I can't understand at all. Two loops appear in sequence. The idea is that arrQuestions consists of the answers to each of 6 questions. Each is answered by a number, 0-5, and each number can only be used once. So arrNumbers tracks whether a particular number was used as an answer. arrNumbers would be set to 'Used' if the user...
1
1293
by: Tim Redfern | last post by:
Hi I'm having an issue that is probably obvious to somebody here but its baffling me.. I'm using python (2.5.1) on an embedded linux sytem system (kernel 2.6.19 I think) with only 32MB memory (for an art project). My python code runs nicely when launched manually from a login shell, ps shows its using 11MB or so of memory. However, when I try to launch the same code from a startup script, it
0
9594
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
10350
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
10351
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
6866
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
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4311
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
2
3834
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.