Re: Help with SendKeys
- From: not.this@xxxxxxxxxxxxxxx (beginner)
- Date: 20 Nov 2007 14:53:56 +0200
In article <67b9276e-b036-4bfe-9f66-2a038d90342a@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Mike Williams <gagamomo@xxxxxxxxxxx> wrote:
On 20 Nov, 06:13, not.t...@xxxxxxxxxxxxxxx (beginner) wrote:
I intend to recognise the presence of Vista by
seeing the presence of C:\WINDOWS\vistawuredir.cab
or C:\Applications\oem\Vista_Manual_EN.pdf
Why C:\?
This does not work either, for whatever reason. I will look for some
other files which give away that the operating system is Vista or XP.
and then giving a different sequence to SendKeys.
Does that make sense?
No. What would make sense to me would be to do the job without getting
MS Paint involved at all, perhaps using the code at the link we have
already posted for you. If MS Paint exposed some reliable and
documented functions then it would be fine to use them in your app,
but it does not do so and the method you are using of "hitting keys"
in your code in the hopes that those specific keystrokes suit whatever
version of Paint happens to be installed does not make sense at all to
me.
You have a point.
In fact, if you want 4 bit (16 colour) bmp files then it would make
sense to save them in that format initially, rather than creating them
as 24 bit full colour bitmaps and then converting them.
That will be too messy to do from VB. I am storing plots of various
kinds as pictures.
Such a task
would of course require fairly heavy use of the various Windows API
functions, which you have said you don't really want to use, but you
will be helped greatly in that task if you study the code at the links
we have already posted.
If it is too advanced, I won't understand it and won't learn much
anyway. I have to learn to crawl before I learn to run.
By the way, what is it you are doing that requires only a 4 bit (16
colour) bitmap? Can you explain exactly what these images are, and
what their purpose is? The reason I ask is that it is likely that
something other than a bmp format might better suit your needs.
These are typically plots of a few variables - say temperatures at a
few locations, flow rates, concentrations as functions of other
variables like time. I would like the few curves in different colours
but the actual colours don't matter, so I use QBColor(k), k = 1 to 12.
BMP is never really the best format for this kind of pictures, but
when code was written in VB 3, the only way to store pictures by
SavePicture was to put them in bmp's.
Mike
.
- Follow-Ups:
- Re: Help with SendKeys
- From: Mike Williams
- Re: Help with SendKeys
- References:
- Running a program from Visual Basic
- From: beginner
- Re: Help with SendKeys
- From: Mike Williams
- Re: Help with SendKeys
- From: beginner
- Re: Help with SendKeys
- From: Mike Williams
- Running a program from Visual Basic
- Prev by Date: Files that can distinguish between XP and Vista
- Next by Date: Re: Looping through a dynamic two dimensional array
- Previous by thread: Re: Help with SendKeys
- Next by thread: Re: Help with SendKeys
- Index(es):
Relevant Pages
|