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 


Making the window stay in top and some more
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
raushan2007
Expert Cheater
Reputation: 0

Joined: 06 Nov 2007
Posts: 130

PostPosted: Sun Dec 16, 2007 6:29 am    Post subject: Making the window stay in top and some more Reply with quote

Ok i have 2 questions:

1) Can anyone give me the code to make my program stay at the top?
and what is the code to not make it stay on top?
2) How can i add like a form which checks the program i made each and every time he uses it and tells him if he is using the correct version?
3) Ok now if i click a button it will copey the file from the folder and paste it to another!


Thnx and i am using vb6 for all


Last edited by raushan2007 on Sun Dec 16, 2007 6:56 am; edited 2 times in total
Back to top
View user's profile Send private message
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Sun Dec 16, 2007 6:32 am    Post subject: Reply with quote

About 2: You need a server to check the highest version.
Back to top
View user's profile Send private message
raushan2007
Expert Cheater
Reputation: 0

Joined: 06 Nov 2007
Posts: 130

PostPosted: Sun Dec 16, 2007 6:32 am    Post subject: Reply with quote

HolyBlah wrote:
About 2: You need a server to check the highest version.


How can i do that?


Thnx
Back to top
View user's profile Send private message
Aikos
Cheater
Reputation: 0

Joined: 26 Nov 2007
Posts: 47

PostPosted: Sun Dec 16, 2007 6:37 am    Post subject: Reply with quote

@Q1: What's your programming language?
Back to top
View user's profile Send private message
raushan2007
Expert Cheater
Reputation: 0

Joined: 06 Nov 2007
Posts: 130

PostPosted: Sun Dec 16, 2007 6:38 am    Post subject: Reply with quote

Aikos wrote:
@Q1: What's your programming language?


Vb6
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Sun Dec 16, 2007 6:41 am    Post subject: Reply with quote

1. I have a way to do it in VB6

Firstly add this to your form
Code:
Private Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal _
    hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, _
    ByVal y As Long, ByVal cx As Long, ByVal cy As Long, _
    ByVal wFlags As Long) As Long

Sub SetTopmostWindow(ByVal hWnd As Long, Optional topmost As Boolean = True)
    Const HWND_NOTOPMOST = -2
    Const HWND_TOPMOST = -1
    Const SWP_NOMOVE = &H2
    Const SWP_NOSIZE = &H1
    SetWindowPos hWnd, IIf(topmost, HWND_TOPMOST, HWND_NOTOPMOST), 0, 0, 0, 0, _
        SWP_NOMOVE + SWP_NOSIZE
End Sub


Now in your form loading event, add this:
Code:
SetTopmostWindow Me.hWnd

_________________
Back to top
View user's profile Send private message
raushan2007
Expert Cheater
Reputation: 0

Joined: 06 Nov 2007
Posts: 130

PostPosted: Sun Dec 16, 2007 6:46 am    Post subject: Reply with quote

Blader wrote:
1. I have a way to do it in VB6

Firstly add this to your form
Code:
Private Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal _
    hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, _
    ByVal y As Long, ByVal cx As Long, ByVal cy As Long, _
    ByVal wFlags As Long) As Long

Sub SetTopmostWindow(ByVal hWnd As Long, Optional topmost As Boolean = True)
    Const HWND_NOTOPMOST = -2
    Const HWND_TOPMOST = -1
    Const SWP_NOMOVE = &H2
    Const SWP_NOSIZE = &H1
    SetWindowPos hWnd, IIf(topmost, HWND_TOPMOST, HWND_NOTOPMOST), 0, 0, 0, 0, _
        SWP_NOMOVE + SWP_NOSIZE
End Sub


Now in your form loading event, add this:
Code:
SetTopmostWindow Me.hWnd

Thnx and what is the code to not make it stay on top?
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Sun Dec 16, 2007 6:53 am    Post subject: Reply with quote

Code:
SetTopmostWindow Me.hWnd, False


Try that

_________________
Back to top
View user's profile Send private message
raushan2007
Expert Cheater
Reputation: 0

Joined: 06 Nov 2007
Posts: 130

PostPosted: Sun Dec 16, 2007 6:54 am    Post subject: Reply with quote

Blader wrote:
Code:
SetTopmostWindow Me.hWnd, False


Try that


Thnx and a new question for u blader.
Read question number3 pls
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Sun Dec 16, 2007 7:03 am    Post subject: Reply with quote

For question 3, do you mean copy a file from folder1 to folder2 in the .exe path?
_________________
Back to top
View user's profile Send private message
raushan2007
Expert Cheater
Reputation: 0

Joined: 06 Nov 2007
Posts: 130

PostPosted: Sun Dec 16, 2007 7:04 am    Post subject: Reply with quote

Blader wrote:
For question 3, do you mean copy a file from folder1 to folder2 in the .exe path?

yes
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Sun Dec 16, 2007 7:09 am    Post subject: Reply with quote

Try this:
Code:
Dim fso As New FileSystemObject
fso.CopyFile "C:\Files\file.txt", "C:\Files\file_copy.txt"


And go to project > references
Scroll down to microsoft scripting runtime and add that

You can also use this:
Code:
Dim fso As New FileSystemObject
fso.CopyFile App.Path & "\something.txt", App.Path & "\copy\"

_________________


Last edited by Blader on Sun Dec 16, 2007 7:14 am; edited 1 time in total
Back to top
View user's profile Send private message
raushan2007
Expert Cheater
Reputation: 0

Joined: 06 Nov 2007
Posts: 130

PostPosted: Sun Dec 16, 2007 7:14 am    Post subject: Reply with quote

Blader wrote:
Try this:
Code:
Dim fso As New FileSystemObject
fso.CopyFile "C:\Files\file.txt", "C:\Files\file_copy.txt"


And go to project > references
Scroll down to microsoft scripting runtime and add that


It tells me Script not found! and i am trying to copy an exe file


Last edited by raushan2007 on Sun Dec 16, 2007 7:15 am; edited 1 time in total
Back to top
View user's profile Send private message
Blader
I post too much
Reputation: 2

Joined: 19 Jan 2007
Posts: 2049

PostPosted: Sun Dec 16, 2007 7:15 am    Post subject: Reply with quote

Did you add microsoft scripting runtime?
Wait, are you using vb6 full version?

_________________
Back to top
View user's profile Send private message
raushan2007
Expert Cheater
Reputation: 0

Joined: 06 Nov 2007
Posts: 130

PostPosted: Sun Dec 16, 2007 7:17 am    Post subject: Reply with quote

Blader wrote:
Did you add microsoft scripting runtime?
Wait, are you using vb6 full version?

Yes i am using full version and i did add the microsoft thing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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