Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Need some help in VB6

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
599033
Master Cheater
Reputation: 0

Joined: 07 Jun 2007
Posts: 303
Location: West Midlands, England

PostPosted: Tue May 27, 2008 4:58 pm    Post subject: Need some help in VB6 Reply with quote

Im using VB 6, and want to automatically refresh IE for every 5 seconds.

How would I do this?

I know a timer is needed though.

Could someone tell me how i would do this, And what the code is Smile

Also - Would it be possible to do this without it controling my mouse, I want the webpage actually in the .Exe, So i wouldnt have to open a Browser, the webpage would already in the file.

So i load the file up, the webpage is in there loading, I log into the website, and i click a button and it refreshes the webpage whilst i do somthing else on the computer.

I want

Thankyou.

Jack
Back to top
View user's profile Send private message AIM Address
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Tue May 27, 2008 10:29 pm    Post subject: Reply with quote

Use the web browser control and make your own little mini-web browser. You'd have full control over it and could do what ever you want with it then.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
sumnewdude
Expert Cheater
Reputation: 0

Joined: 23 May 2007
Posts: 181
Location: Where you least expect me.

PostPosted: Wed May 28, 2008 12:52 pm    Post subject: Reply with quote

Wiccaan wrote:
Use the web browser control and make your own little mini-web browser. You'd have full control over it and could do what ever you want with it then.

Or if you don't want to make your own you could use somthing like
Code:
SendKeys "{F5}"
in a timer. F5 refreshes IE.[/b]
_________________

.erutangis ruoy ni siht esu neht ,sdrawkcab siht daer ot hguone trams erew uoy fI
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Wed May 28, 2008 12:54 pm    Post subject: Reply with quote

SendKeys sends the key to the active window on the system, which in your case in a timer would be flawed if the user attempted to switch to a different window.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Typhoon808
Expert Cheater
Reputation: 0

Joined: 27 Mar 2008
Posts: 175
Location: Wales

PostPosted: Wed May 28, 2008 1:03 pm    Post subject: Reply with quote

Yeah, if you're going to use SendKeys, I would recommend using hotkeys to start and stop the timer so it doesn't interfere with other applications.
Back to top
View user's profile Send private message
Trow
Grandmaster Cheater
Reputation: 2

Joined: 17 Aug 2006
Posts: 957

PostPosted: Wed May 28, 2008 8:24 pm    Post subject: Reply with quote

If you're having your own IE control in your app, use
"WebBrowser1.refresh" in a timer

Otherwise you'll need to dig into EnumWindows or FindWindow/Ex APIs along with SendMessage/PostMessage/SendInput for your ways to send an F5 signal (and sorry, no code for you)

_________________
Get kidnapped often.
Back to top
View user's profile Send private message
minium haxor
Advanced Cheater
Reputation: 0

Joined: 03 Dec 2007
Posts: 82
Location: Faroe islands

PostPosted: Mon Jun 02, 2008 2:54 pm    Post subject: Reply with quote

1 command button
2 timers
code:


Private Sub Command1_Click()
Timer2.Enabled = True
End Sub

Private Sub Timer1_Timer()
SendKeys (vbKeyF5)
End Sub

Private Sub Timer2_Timer()
Timer1.Enabled = True
End Sub

_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Mon Jun 02, 2008 2:57 pm    Post subject: Reply with quote

minium haxor wrote:
1 command button
2 timers
code:


Private Sub Command1_Click()
Timer2.Enabled = True
End Sub

Private Sub Timer1_Timer()
SendKeys (vbKeyF5)
End Sub

Private Sub Timer2_Timer()
Timer1.Enabled = True
End Sub


Firstly, this will cause issues with other programs and force you to keep the browser window infront at all times. SendKeys will only send the given keystrokes to the currently active window.

Second, why on earth would you use a timer to make another active..?

Code:
Private Sub Command1_Click()
   Timer1.Enabled = True
End Sub

Private Sub Timer1_Timer()
   SendKeys "{F5}" ' // Not sure if thats the key, I dont use this function at all.
End Sub


That would be all you need. Let alone with that, I would suggest using hotkeys instead then so you can toggle it on and off. But, either way I suggest not using SendKeys at all. Use other API that can achieve the same result, such as 'SendInput', 'PostMessage', etc.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites