473,322 Members | 1,241 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Mr. Wagner ?

aam
how can i set up vb.net to interact with a game i'm playing online ? the game
is a java applet. i'm trying to write a program using a winform to assist me
with this game.i tried using sendkeys but wouldn't work.i need to have the
program automatically click a button for me in the game every few seconds or
so.how would i do this ? api call or method from class library ?what class
would handle the mouse? thanks for any help with this.

Nov 21 '05 #1
36 1522
Maybe a win32 mouse hook may help you.

Or you may devise a device controlled by the serial or paralell port
(preferably the first, because you can program it with .NET) to knock the
key or button.

With the mouse hooks you may modify and mouse events and (i think) simulate
mouse click events. But I dont know if the mouse hooks work if that game is
using DirectX.

:-)
Alejandro Lapeyre
"aam" <aa*@discussions.microsoft.com> escribió en el mensaje
news:6F**********************************@microsof t.com...
how can i set up vb.net to interact with a game i'm playing online ? the
game
is a java applet. i'm trying to write a program using a winform to assist
me
with this game.i tried using sendkeys but wouldn't work.i need to have the
program automatically click a button for me in the game every few seconds
or
so.how would i do this ? api call or method from class library ?what class
would handle the mouse? thanks for any help with this.

Nov 21 '05 #2
Nak
Herfried not answering his fan mail??

Boooo hissss......

;-)

Nick.
Nov 21 '05 #3
"Nak" <a@a.com> schrieb:
Herfried not answering his fan mail??


Herfried got a new computer today :-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #4
"alejandro lapeyre" <al**************@jotmail.com> schrieb:
With the mouse hooks you may modify and mouse events and (i think)
simulate mouse click events. But I dont know if the mouse hooks work if
that game is using DirectX.


I doubt that a Java applet will use DirectX. P/invoke on 'SendInput'
('keybd_event', 'mouse_event') could be used to "interact" with the applet
programmatically, but I doubt that this would lead to a stable solution.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5
aam
say that i keep the mouse cursor over the button that i want to have
clicked.is there a way to program the mouse to perform a click at the
coordinates where the cursor is resting after a few seconds or so and be able
to do this over and over again? i would put start and stop buttons on my
winform to handle this.thanks.

"Herfried K. Wagner [MVP]" wrote:
"alejandro lapeyre" <al**************@jotmail.com> schrieb:
With the mouse hooks you may modify and mouse events and (i think)
simulate mouse click events. But I dont know if the mouse hooks work if
that game is using DirectX.


I doubt that a Java applet will use DirectX. P/invoke on 'SendInput'
('keybd_event', 'mouse_event') could be used to "interact" with the applet
programmatically, but I doubt that this would lead to a stable solution.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6
Nak
Hi Herfried,
Herfried got a new computer today :-).


Woo, so your gonna post even more help then? faster than ever huh?

Nick.
Nov 21 '05 #7
Nak
Hi aam,
say that i keep the mouse cursor over the button that i want to have
clicked.is there a way to program the mouse to perform a click at the
coordinates where the cursor is resting after a few seconds or so and be
able
to do this over and over again? i would put start and stop buttons on my
winform to handle this.thanks.


There is almost always a way to do something. Maybe you might need to
look for or create a C DLL that is capable of performing mouse actions, as
technically the directX games still use windows. Maybe there is one already
available? And shouldn't it work via sending windows messages??

Nick.
Nov 21 '05 #8
aam
i don't believe the game uses directX. also, what is a "C" dll ? i'm not too
familiar with Windows API, could you recommend a good book on the subject ?
thanks.

"Nak" wrote:
Hi aam,
say that i keep the mouse cursor over the button that i want to have
clicked.is there a way to program the mouse to perform a click at the
coordinates where the cursor is resting after a few seconds or so and be
able
to do this over and over again? i would put start and stop buttons on my
winform to handle this.thanks.


There is almost always a way to do something. Maybe you might need to
look for or create a C DLL that is capable of performing mouse actions, as
technically the directX games still use windows. Maybe there is one already
available? And shouldn't it work via sending windows messages??

Nick.

Nov 21 '05 #9
"Nak" <a@a.com> schrieb:
Herfried got a new computer today :-).


Woo, so your gonna post even more help then? faster than ever huh?


My old computer had 350 MHz, my new computer has 3.0 GHz. So, I hope I'll
have much more freetime in future (and I won't spend this additional time on
writing newsgroup posts!).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #10
"aam" <aa*@discussions.microsoft.com> schrieb:
say that i keep the mouse cursor over the button that i want to have
clicked.is there a way to program the mouse to perform a click at the
coordinates where the cursor is resting after a few seconds or so and be
able
to do this over and over again?


Yes, using 'mouse_event'. As I already said:

| P/invoke on 'SendInput' ('keybd_event', 'mouse_event')
| could be used to "interact" with the applet programmatically

Perform a Google Search on these functions and take a look at their
documentation :-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #11
Nak
Hi Herfried,
My old computer had 350 MHz, my new computer has 3.0 GHz. So, I hope I'll
have much more freetime in future (and I won't spend this additional time
on writing newsgroup posts!).


Cool, it must seem like a completely different world!

So your gonna spend your extra time downloading "poontang"? ;-) j/k

Nice spec PC BTW, I bet that hard drives fast!

Nick.
Nov 21 '05 #12
Nick,

Now he can maybe type in that big file that he would do in past, can your
rember it you.

http://groups-beta.google.com/group/...9437d801346d02

Cor
Nov 21 '05 #13
Nak
Hi there,
i don't believe the game uses directX. also, what is a "C" dll ?
A "C" Dll would be a DLL written in the C language. As C is much lower
level than .NET you can do lots more things, but it does require allot more
effort. I was thinking that maybe there was a DLL knocking around somehwere
that enables control over the mouse, and as it is something that should have
been around for quite a long time I would have presumed "C" to be the
language of choice.

But as Herfried said you can actually do this using "mouse_event" API.

http://www.mentalis.org/apilist/mouse_event.shtml

The declare on this page would have to be modified to work in VB.NET so
maybe look up "mouse_event VB.NET" on Google, your sure to find something.
could you recommend a good book on the subject ?


A good book on C? I would recommend just looking on the net for basic
"Hello world" tutorials first. I'm not sure if your aware of this but C is
one of the most common languages, programs are written for many systems
using the language.

http://www.cs.cf.ac.uk/Dave/C/node4....00000000000000

It's a good language to learn and a valuable skill to have. You're not
going to be able to use VB.NET to write low level code and never will, as
that's what .NET is all about. But then again you might never have the need
to anyway!

http://www.autohotkey.com/

^ You might want to check that out, I found it after doing a quick
search on Google.

Nick.
Nov 21 '05 #14
Nak
> http://groups-beta.google.com/group/...9437d801346d02

ROFL! What ever happened to Fergus?

Nick.
Nov 21 '05 #15
aam
thanks nick for your help. is that c++ or c sharp ?i thought that with vb.net
win api calls were no longer necessary because of the better functionality
of the .net class libraries ?also, i have a program similar to the one that
you referenced that i downloaded a long time ago. i'm basically trying to
figure out how it works so i can write my own. thanks again.

"Nak" wrote:
Hi there,
i don't believe the game uses directX. also, what is a "C" dll ?


A "C" Dll would be a DLL written in the C language. As C is much lower
level than .NET you can do lots more things, but it does require allot more
effort. I was thinking that maybe there was a DLL knocking around somehwere
that enables control over the mouse, and as it is something that should have
been around for quite a long time I would have presumed "C" to be the
language of choice.

But as Herfried said you can actually do this using "mouse_event" API.

http://www.mentalis.org/apilist/mouse_event.shtml

The declare on this page would have to be modified to work in VB.NET so
maybe look up "mouse_event VB.NET" on Google, your sure to find something.
could you recommend a good book on the subject ?


A good book on C? I would recommend just looking on the net for basic
"Hello world" tutorials first. I'm not sure if your aware of this but C is
one of the most common languages, programs are written for many systems
using the language.

http://www.cs.cf.ac.uk/Dave/C/node4....00000000000000

It's a good language to learn and a valuable skill to have. You're not
going to be able to use VB.NET to write low level code and never will, as
that's what .NET is all about. But then again you might never have the need
to anyway!

http://www.autohotkey.com/

^ You might want to check that out, I found it after doing a quick
search on Google.

Nick.

Nov 21 '05 #16
aam
thanks herfried for your help. i will read up on this.i never imagined a
simple program like this would be so hard to figure out how to write !!

"Herfried K. Wagner [MVP]" wrote:
"aam" <aa*@discussions.microsoft.com> schrieb:
say that i keep the mouse cursor over the button that i want to have
clicked.is there a way to program the mouse to perform a click at the
coordinates where the cursor is resting after a few seconds or so and be
able
to do this over and over again?


Yes, using 'mouse_event'. As I already said:

| P/invoke on 'SendInput' ('keybd_event', 'mouse_event')
| could be used to "interact" with the applet programmatically

Perform a Google Search on these functions and take a look at their
documentation :-).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #17
Nak
Hi amm,
thanks nick for your help. is that c++ or c sharp ?
Nerither, "C", "C++" is the successor to C. The following URL will tell
you a little about the history of "C++"

http://www.hitmill.com/programming/cpp/cppHistory.asp

C# on the other hand requires the .NET Framework and as such will only
run on the system it is designed for. Although several companies are making
cross platform versions of the .NET Framework, such as the Mono project.
i thought that with vb.net
win api calls were no longer necessary because of the better
functionality
of the .net class libraries ?also, i have a program similar to the one
that
you referenced that i downloaded a long time ago. i'm basically trying to
figure out how it works so i can write my own. thanks again.


.NET is probably the highest level platform you will find, it's designed
to provide a common interace for all languages that utilise the framework.
There are *lots* of things you cannot do with a .NET application and there
are allot of downsides to using .NET in the first place, such as

* Framework deployment (Huge and confusing)
* Framework detection
* Extremely unsecure code unless using an obfuscator (which costs
money)
* Restrictive development suites (At the moment there aren't many
available and those that are at a production level are relatively expensive,
SharpDevelop is the only free IDE available and still has a way to go yet)

I knew a programmer once that stated that he could use any programming
language there is because he could develop in assembler, which is about as
low-level as it gets. Saying this it meant that he had an *extremely* good
understanding of the way the computer hardware worked, a level of
understanding that you would just not get from learning solely high level
languages.

The lower level you go the less the program has the be transformed in
order for the processor to actually be able to understand it, therefor low
level code is also extremely fast, but has so disadvantages, such as
security and safety, hardware can actually be *damaged* if you don't know
what your doing.

I think if you are learning how to program you should start with "C",
then go to "C++", then go to VB.NET or C# (C# would be the logical choice
but I prefer VB.NET ;-) ). You don't have to have a huge understanding of
these languages but it does help you to understand what is actually
happening with your code, being able to make software is all very well but
being able to explain what is actually happening is another.

Anyway, it's just my opinion on programming, and you never know when you
will need the extra knowledge. Ultimately I think the best way to learn is
by example, download examples, rip them apart and make your own versions (as
you said you are doing at the moment). But good luck in whatever you choose
to do! :-)

Nick.
Nov 21 '05 #18
Nick,
The lower level you go the less the program has the be transformed in
order for the processor to actually be able to understand it, therefor low
level code is also extremely fast,


This is in my opinion a mythe and low level programming is not difficult
however time consuming.

To give you an example, and than I hope that you see what I mean why it is a
mythe

In past there where computers which had an accumulator of 8 bits (there
where much larger as well, however this one is good for the sample).

What had to be done
Add decimal 3 did mean that you first had to translate it to the bit value
11. When you had done that, you could add 11 to the accumulator let us think
that this was already holding 01111111. That would give an overflow that you
had to catch and to add to the next accumulator.

You see a lot of work, and therefore there where made procedures. And more
procedures. They became in hardware and in software. The software ones are
in my opinion nothing more than a low level Intermidiate Code.

The only point with Net is that by instance the API has now an extra level
above it what is the Net Intermidiate.

However it does not mean that that is slower. It is fast enough, to say as
an famous English car builder tells about the horsepower of his engines.

I hope this gives some ideas, when you knew this already, than forget it.

Cor


Nov 21 '05 #19
Nak
Hi aam,

The following is an example of a "C" program that will move the cursor
around and then click the start button. It's hard coded to a screensize of
1280 x 1024 so you might need to adjust it. I wont post the binary in here
to prevent being moaned at...

--------------

#include <Windows.h>
#include <Winuser.h>

int main()
{
int cbuttons;
int dwExtraInfo;

printf("Moving to top left...\n");
SetCursorPos(0, 0);

sleep(2000);

printf("Moving to top right...\n");
SetCursorPos(1280, 0);

sleep(2000);

printf("Moving to bottom right...\n");
SetCursorPos(1280, 1024);

sleep(2000);

printf("Moving to start button...\n");
SetCursorPos(10, 1014);

sleep(2000);

printf("Clicking start button...\n");
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, cbuttons, dwExtraInfo);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, cbuttons, dwExtraInfo);

printf("Press any key to exit.\n");
getch();

return(0);
}

--------------

Nick.

"aam" <aa*@discussions.microsoft.com> wrote in message
news:AB**********************************@microsof t.com...
thanks nick for your help. is that c++ or c sharp ?i thought that with
vb.net
win api calls were no longer necessary because of the better
functionality
of the .net class libraries ?also, i have a program similar to the one
that
you referenced that i downloaded a long time ago. i'm basically trying to
figure out how it works so i can write my own. thanks again.

"Nak" wrote:
Hi there,
>i don't believe the game uses directX. also, what is a "C" dll ?


A "C" Dll would be a DLL written in the C language. As C is much
lower
level than .NET you can do lots more things, but it does require allot
more
effort. I was thinking that maybe there was a DLL knocking around
somehwere
that enables control over the mouse, and as it is something that should
have
been around for quite a long time I would have presumed "C" to be the
language of choice.

But as Herfried said you can actually do this using "mouse_event"
API.

http://www.mentalis.org/apilist/mouse_event.shtml

The declare on this page would have to be modified to work in VB.NET
so
maybe look up "mouse_event VB.NET" on Google, your sure to find
something.
>could you recommend a good book on the subject ?


A good book on C? I would recommend just looking on the net for
basic
"Hello world" tutorials first. I'm not sure if your aware of this but C
is
one of the most common languages, programs are written for many systems
using the language.

http://www.cs.cf.ac.uk/Dave/C/node4....00000000000000

It's a good language to learn and a valuable skill to have. You're
not
going to be able to use VB.NET to write low level code and never will, as
that's what .NET is all about. But then again you might never have the
need
to anyway!

http://www.autohotkey.com/

^ You might want to check that out, I found it after doing a quick
search on Google.

Nick.

Nov 21 '05 #20
Nak
Hi Cor,
What had to be done
Add decimal 3 did mean that you first had to translate it to the bit value
11. When you had done that, you could add 11 to the accumulator let us
think that this was already holding 01111111. That would give an overflow
that you had to catch and to add to the next accumulator.
Personally I have never gone *that* low level, I have tried a little
assembly at one time and understand how it works but I had no idea that was
how you done that. Seems like a bodge really doesn't it? (Though I'm sure
it was standard procedure)
The only point with Net is that by instance the API has now an extra level
above it what is the Net Intermidiate.
Definite ACK.
However it does not mean that that is slower. It is fast enough, to say as
an famous English car builder tells about the horsepower of his engines.
It all depends on what you are trying to achieve, I regularly download
the demos from the demo scene and am amazed by the speed that people can
achieve using their own assembly routines, even on a cruddy old laptop you
get some amazing results. But then again, as you said, there is allot more
work involved.
I hope this gives some ideas, when you knew this already, than forget it.


LOL, no way do I know more about progamming that yourself Cor, I'm only
22 and have allot more to learn!!

Nick.
Nov 21 '05 #21
"Nak" <a@a.com> schrieb:
int cbuttons;
int dwExtraInfo;

printf("Moving to top left...\n");
SetCursorPos(0, 0);

sleep(2000);

printf("Moving to top right...\n");
SetCursorPos(1280, 0);

sleep(2000);

printf("Moving to bottom right...\n");
SetCursorPos(1280, 1024);

sleep(2000);

printf("Moving to start button...\n");
SetCursorPos(10, 1014);

sleep(2000);

printf("Clicking start button...\n");
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, cbuttons, dwExtraInfo);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, cbuttons, dwExtraInfo);


Well, that could be done in VB.NET too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #22
Nak
Hi Herfried,
Well, that could be done in VB.NET too.


Yes, of course it can. I was simply giving an example of it being done
in C, if you read my post you would see that I was referring to more
advanced things being impossible to achieve with a high level language like
VB.

I believe he may be new to programming so I was suggesting starting with
another language, just my personal view on the subject.

Nick.
Nov 21 '05 #23
aam
nick, thanks again for all your time and help with this.it is greatly
appreciated.you are correct in that i am new to programming.i used to use
Qbasic long time ago but haven't done anything since.i'm trying to teach
myself vb.net.i have several books and code samples i've downloaded.i spend
quite a bit of time reading in the forums to learn as much as i can.which
would be the best language, in your opinion,to learn if you were mainly
interested in winforms and winapps ? thanks again for the help.

"Nak" wrote:
Hi Herfried,
Well, that could be done in VB.NET too.


Yes, of course it can. I was simply giving an example of it being done
in C, if you read my post you would see that I was referring to more
advanced things being impossible to achieve with a high level language like
VB.

I believe he may be new to programming so I was suggesting starting with
another language, just my personal view on the subject.

Nick.

Nov 21 '05 #24
aam
herfried, that is what i'm having trouble with.i am new to programming and
have searched all over for code examples for the program i'm working on but
amazingly can't find any.i've been to numerous forums and have posted to many
with no replies.not sure how to translate "c" to vb.net .it's hard to try
and write the code for my program with no previous examples in vb.net to go
by because this seems like it's more of an advanced subject.alot harder than
i thought it would be.thanks for all your time and help with this herfried.

"Herfried K. Wagner [MVP]" wrote:
"Nak" <a@a.com> schrieb:
int cbuttons;
int dwExtraInfo;

printf("Moving to top left...\n");
SetCursorPos(0, 0);

sleep(2000);

printf("Moving to top right...\n");
SetCursorPos(1280, 0);

sleep(2000);

printf("Moving to bottom right...\n");
SetCursorPos(1280, 1024);

sleep(2000);

printf("Moving to start button...\n");
SetCursorPos(10, 1014);

sleep(2000);

printf("Clicking start button...\n");
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, cbuttons, dwExtraInfo);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, cbuttons, dwExtraInfo);


Well, that could be done in VB.NET too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #25
Nak
Hi aam,
nick, thanks again for all your time and help with this.it is greatly
appreciated.you are correct in that i am new to programming.i used to use
Qbasic long time ago but haven't done anything since.i'm trying to teach
myself vb.net.i have several books and code samples i've downloaded.i
spend
quite a bit of time reading in the forums to learn as much as i can.which
would be the best language, in your opinion,to learn if you were mainly
interested in winforms and winapps ? thanks again for the help.


VB.NET, I love it, it's allot easier to use that C# and less
frustrating, mainly due to the fact that C# is case sensitive, which I
personally believe to be absurd, but never mind.

You might like taking a look at PSC

http://www.planet-source-code.com/

That's where I started to learn VB 6, it's quite nice getting feedback
on your applications and soon enough you will out grow it and not want to
share your code on there anymore as some people can be a little rude with
their comments. But it's a good place to start!

Good luck.

Nick.
http://www.npsoftware.co.uk
Nov 21 '05 #26
aam
thanks again nick for the help. also, where is the vb.net version of the code
you posted ? if i'm mainly interested in creating win apps, wouldn't "C" or
"C++" be a better choice for me ? i'm not really too interested in database
or internet programming yet.

"Nak" wrote:
Hi aam,

Attached is a VB.NET version of the "C" code I posted.

Nick.

"aam" <aa*@discussions.microsoft.com> wrote in message
news:61**********************************@microsof t.com...
herfried, that is what i'm having trouble with.i am new to programming and
have searched all over for code examples for the program i'm working on
but
amazingly can't find any.i've been to numerous forums and have posted to
many
with no replies.not sure how to translate "c" to vb.net .it's hard to try
and write the code for my program with no previous examples in vb.net to
go
by because this seems like it's more of an advanced subject.alot harder
than
i thought it would be.thanks for all your time and help with this
herfried.

"Herfried K. Wagner [MVP]" wrote:
"Nak" <a@a.com> schrieb:
> int cbuttons;
> int dwExtraInfo;
>
> printf("Moving to top left...\n");
> SetCursorPos(0, 0);
>
> sleep(2000);
>
> printf("Moving to top right...\n");
> SetCursorPos(1280, 0);
>
> sleep(2000);
>
> printf("Moving to bottom right...\n");
> SetCursorPos(1280, 1024);
>
> sleep(2000);
>
> printf("Moving to start button...\n");
> SetCursorPos(10, 1014);
>
> sleep(2000);
>
> printf("Clicking start button...\n");
> mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, cbuttons, dwExtraInfo);
> mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, cbuttons, dwExtraInfo);

Well, that could be done in VB.NET too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Nov 21 '05 #27
"aam" <aa*@discussions.microsoft.com> schrieb:
thanks again nick for the help. also, where is the vb.net version of the
code
you posted ?
Nick attached it to his post, but the web interface doesn't display
attachments (for some good reasons!). What you can do is setting up a real
newsreader like Outlook Express, add an account for the "news.microsoft.com"
server and subscribe to this group (microsoft.public.dotnet.languages.vb).
Then you can search for the message and download the attachment.
if i'm mainly interested in creating win apps, wouldn't "C" or
"C++" be a better choice for me ?


No.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #28
aam
thanks, i will look into that because i would like to look at the code he
posted. also, wouldn't Control.InvokeOnClick Method work for what i'm trying
to do ?

"Herfried K. Wagner [MVP]" wrote:
"aam" <aa*@discussions.microsoft.com> schrieb:
thanks again nick for the help. also, where is the vb.net version of the
code
you posted ?


Nick attached it to his post, but the web interface doesn't display
attachments (for some good reasons!). What you can do is setting up a real
newsreader like Outlook Express, add an account for the "news.microsoft.com"
server and subscribe to this group (microsoft.public.dotnet.languages.vb).
Then you can search for the message and download the attachment.
if i'm mainly interested in creating win apps, wouldn't "C" or
"C++" be a better choice for me ?


No.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #29
"aam" <aa*@discussions.microsoft.com> schrieb:
also, wouldn't Control.InvokeOnClick Method work for what i'm trying
to do ?


'Control.InvokeOnClick' is not suitable for your requirements.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #30
aam
thanks. could you post the link because i'm having trouble trying to find out
how to subscribe to this forum ?

"Herfried K. Wagner [MVP]" wrote:
"aam" <aa*@discussions.microsoft.com> schrieb:
thanks again nick for the help. also, where is the vb.net version of the
code
you posted ?


Nick attached it to his post, but the web interface doesn't display
attachments (for some good reasons!). What you can do is setting up a real
newsreader like Outlook Express, add an account for the "news.microsoft.com"
server and subscribe to this group (microsoft.public.dotnet.languages.vb).
Then you can search for the message and download the attachment.
if i'm mainly interested in creating win apps, wouldn't "C" or
"C++" be a better choice for me ?


No.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #31
"aam" <aa*@discussions.microsoft.com> schrieb:
could you post the link because i'm having trouble trying to find out
how to subscribe to this forum ?


Here's the code Nick posted:

\\\
Public Module main

Private Const MOUSEEVENTF_LEFTDOWN As Int32 = &H2
Private Const MOUSEEVENTF_LEFTUP As Int32 = &H4

Private Declare Function SetCursorPos Lib "user32.dll" (ByVal x As
Int32, ByVal y As Int32) As Int32
Private Declare Sub mouse_event Lib "user32.dll" (ByVal dwFlags As
Int32, ByVal dx As Int32, ByVal dy As Int32, ByVal cButtons As Int32, ByVal
dwExtraInfo As Int32)

Public Sub main()
Call Console.WriteLine("Moving to top left...")
Call SetCursorPos(0, 0)

Call Threading.Thread.Sleep(2000)

Call Console.WriteLine("Moving to top right...")
Call SetCursorPos(1280, 0)

Call Threading.Thread.Sleep(2000)

Call Console.WriteLine("Moving to bottom right...")
Call SetCursorPos(1280, 1024)

Call Threading.Thread.Sleep(2000)

Call Console.WriteLine("Moving to start button...")
Call SetCursorPos(10, 1014)

Call Threading.Thread.Sleep(2000)

Call Console.WriteLine("Clicking start button...")
Call mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
Call mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)

Call Console.WriteLine("Press any key to exit.")
Call Console.Read()
End Sub

End Module
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #32
Nak
Hi there,
One thing that's not been discussed here is that LOW LEVEL was different
on every CPU/Hardware type. I use to write code for the 1802, Z80, 8085,
8088, 68000, 68010, 6502, 8086, 80286, and then stopped when it got to
the 386 stage. I was in heaven when Assemblers came out so that you
didn't have to code in Hex and remember that a jump was X-1 on some
CPU's it was X, and that BSL,BSR sometimes didn't move anything in to
the carry/overflow positions....


Absolutely, I'm certainly not going to argue with that as I don't have a
clue! but if you jump up a level to "C" you have the most portable language
available, and your still lower than VB.NET. I just believe with learning
things from the ground up, the history of programming and how the languages
have evolved, if you build a strong foundation for your knowledge it's going
to fair better (like the sound of your knowledge).

Hopefully sometime I'll get a chance to look at programming in assembly as I
would love the extra knowledge, I just have to find the project that needs
it I suppose :-)

Nick.
Nov 21 '05 #33
Hi Nick,

Are you trying to brake your own record with Fergus about the longest thread
in this newsgroup, however now together with Herfried?

:-)))

Cor
Nov 21 '05 #34
Nak
> Are you trying to brake your own record with Fergus about the longest
thread in this newsgroup, however now together with Herfried?


Certainly not!
Nov 21 '05 #35
Nak
> Are you trying to brake your own record with Fergus about the longest
thread in this newsgroup, however now together with Herfried?


I promise!!! ;-)

Nick.
Nov 21 '05 #36
Nak
> Are you trying to brake your own record with Fergus about the longest
thread in this newsgroup, however now together with Herfried?


No way!
Nov 21 '05 #37

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

Similar topics

23
by: Alberto | last post by:
An OUTSTANDING example of a rebuttal. Worth a glance. Rather long, OBVIOUSLY feel fee to dismiss it entirely if not interested. But this habit of the rebuttals must go to a stop (forgive odd...
8
by: Dinesh Jain | last post by:
Dinesh Jain <dinesh121@hotmail.com> scripsit: > I encountered a serious , unkonwn error reported. > The error message was - "Cannot find a matching quote > character for the character" > The...
4
by: Jhonatas M. Rodríguez | last post by:
Hello Everybody how are you everybody ?... i have a problem with picture box, i want copy a image from the clipboard, and me can to copy a image if the image is a bitmap(extension bmp), but if...
7
by: Marc Fauser | last post by:
How can I find the textbox (handle?) e.g. from http://www.microsoft.com/ on the right top corner from my program? And how can I identify the textbox again, if a new browser window is opened with...
6
by: spamfurnace | last post by:
Howdy, im sure the man himself can answer this..... or his sidekick Cor. What is an MVP and who put him in charge of this newsgroup? I dont ask that in a grumpy or derogative way, Ive never met...
4
by: ..::M:O:R:B:I:L:L:O::.. | last post by:
hi to all ... i need to execute a string script in my vb.net project, Is there a way to do it ? the Ms Script Control is a com abject.. is there one for dot net? thanks Reguards
7
by: raulavi | last post by:
on a msg on 2/20/05 8:16 am pst you state (talking about arguments) >>Depending on the application, certain parameter values need to be put between double quotes, for example, file names containing...
8
by: jer | last post by:
I've noticed you've helped a lot of people that were trying to do sound recording through VB.net. I'm searched all over the internet, and I'm still having problems write sound to a wav file. My...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.