Free Games Forum
Free Games Games Forums Music Forums TV Forums

  Free Games Forum Home FORUM
HOME
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN
Rules & FAQ RULES / FAQ
REPORT SPAM

Free Games Forum: Game Technology: Visual Basic / VB:
VB tutorial

 

 


JaVa CoDe
Senior Member


Jan 24, 2005, 3:55 AM

Post #1 of 12 (2045 views)
Shortcut
VB tutorial Can't Post

Now here we go again this is code that can click at a spot on the resolution co-ordinates its short and easy

CODE
Private Sub ClickAt(ByVal X As Long, ByVal Y As Long)
SetCursorPos X, Y
Wait 10
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
Wait 10
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
End Sub



Examples:


ClickAt 600, 425

Now i Will show you how to make sure there at a certain resolution


CODE
Private Sub Form_Load()
Dim w As Long, h As Long
w = ScaleX(Screen.Width, vbTwips, vbPixels)
h = ScaleY(Screen.Height, vbTwips, vbPixels)
If w < 1024 Or h < 768 Then
MsgBox "You must be in 1024x768 mode to run this program!" & vbCrLf & _
"You're currently in " & w & "x" & h, vbCritical
Unload Me
End If
End Sub



plus heres how to tell where a co-ordinate is by puting your mouse somewhere



CODE
Private Sub tmrMouse_Timer()
Dim p As POINTAPI
GetCursorPos p
Text9.Text = p.X & "," & p.Y
End Sub




I hope this little tutorial helped you in any way



My train of thought has been delayed.



Jakestah
Veteran


Jan 24, 2005, 6:23 AM

Post #2 of 12 (2036 views)
Shortcut
Re: [Java Code] VB tutorial [In reply to] Can't Post

You tell them what form and stuff for newbies.


JaVa CoDe
Senior Member


Jan 25, 2005, 9:29 AM

Post #3 of 12 (2032 views)
Shortcut
Re: [Jakestah] VB tutorial [In reply to] Can't Post

Im gonna be making alot more becuase im going to be moderator of most of coding section.



My train of thought has been delayed.


terrankiller
Veteran


Jan 27, 2005, 2:10 AM

Post #4 of 12 (2022 views)
Shortcut
Re: [Java Code] VB tutorial [In reply to] Can't Post

I cant believe jammer made a vb forum. Thanks jammer.


JaVa CoDe
Senior Member


Jan 27, 2005, 2:40 PM

Post #5 of 12 (2021 views)
Shortcut
Re: [terrankiller] VB tutorial [In reply to] Can't Post

Ya I suggested the whole coding section.



My train of thought has been delayed.


nadkicker69
Veteran


Feb 15, 2005, 8:20 PM

Post #6 of 12 (1989 views)
Shortcut
Re: [Java Code] VB tutorial [In reply to] Can't Post

I'm in the process of trying to learn VB and Java and find these little tutorials and scraps of code rather helpful.

It's a good idea to have a coding forum =^_^=


=
I am the Jester. I make the unreal real.


JaVa CoDe
Senior Member


Feb 17, 2005, 7:04 AM

Post #7 of 12 (1982 views)
Shortcut
Re: [nadkicker69] VB tutorial [In reply to] Can't Post

Ya i know people on this forum need to get educated in this.



My train of thought has been delayed.


linkkid222
Senior Member

Aug 24, 2005, 11:00 AM

Post #8 of 12 (1465 views)
Shortcut
Re: [Java Code] VB tutorial [In reply to] Can't Post

Ya, the only thing ive made was an auto-talker.. but hey i did it perfectly first time i dont even know html.. lol im going to learn that and vb..


(18:5


keritio
Newbie


Nov 9, 2005, 12:23 AM

Post #9 of 12 (1235 views)
Shortcut
Re: [Java Code] VB tutorial [In reply to] Can't Post

He he thanks


waddyathink
Newbie


Nov 9, 2005, 5:49 AM

Post #10 of 12 (1232 views)
Shortcut
Re: [keritio] VB tutorial [In reply to] Can't Post

Thanks this is really good but is there anywhere that goes into it in more depth?


zach1188
Member

Nov 29, 2005, 3:05 PM

Post #11 of 12 (1143 views)
Shortcut
Re: [waddyathink] VB tutorial [In reply to] Can't Post

Im trying to learn vb, so I am going to try somthing:

If you want 1024x768 resolution you would put this:

Private Sub Form_Load()
Dim w As Long, h As Long
w = ScaleX(Screen.Width, vbTwips, vbPixels)
h = ScaleY(Screen.Height, vbTwips, vbPixels)
If w < 1024 Or h < 768 Then
MsgBox "You must be in 1024x768 mode to run this program!" & vbCrLf & _
"You're currently in " & w & "x" & h, vbCritical
Unload Me
End If
End Sub



Right? But if you wanted 800x600, would this work?:


Private Sub Form_Load()
Dim w As Long, h As Long
w = ScaleX(Screen.Width, vbTwips, vbPixels)
h = ScaleY(Screen.Height, vbTwips, vbPixels)
If w > 800 Or h > 600 Then
MsgBox "You must be in 800x600 mode to run this program!" & vbCrLf & _
"You're currently in " & w & "x" & h, vbCritical
Unload Me
End If
End Sub



darkdemon
Enthusiast


Apr 13, 2006, 9:30 AM

Post #12 of 12 (663 views)
Shortcut
Re: [JaVa CoDe] VB tutorial [In reply to] Can't Post

Java Code, you gotta make it easier for the noobs, put in pics and be more detalied.
They wouldn't know where to put in the code, and what to put in the form.


U r reading a signature.
Free game hacks!

 
 
 


Search for (options) Web Design by Web Ideas - Page loaded in: 0.16 s on (CGI/1.1)