[VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication
Go Back  Xtreme Visual Basic Talk > > > [VB6] - catch 1 frame in 1 aplication


Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2011, 04:46 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default [VB6] - catch 1 frame in 1 aplication


is possivel catch frames in 1 aplication?
in games you do a loop, after 1 cycle, you have 1 frame. but is possivel see that in a aplications(using api functions)?
Reply With Quote
  #2  
Old 04-14-2011, 03:57 AM
Flyguy's Avatar
Flyguy[VB6] - catch 1 frame in 1 aplication Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,165
Default

Applications which are not games and which do not paint the complete screen themselves have no knowledge of a frame.

What is it that you want to achieve?
Reply With Quote
  #3  
Old 04-14-2011, 02:04 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by Flyguy View Post
Applications which are not games and which do not paint the complete screen themselves have no knowledge of a frame.

What is it that you want to achieve?
i don't know express well, but think in these way(for example):
-you have 5 controls in form;
-every controls and the forms have events and actions;
-how can i catch 1 cyle of that events and actions(in every controls)?
because after these, you have 1 frame in aplicaion.
Reply With Quote
  #4  
Old 04-14-2011, 03:03 PM
Flyguy's Avatar
Flyguy[VB6] - catch 1 frame in 1 aplication Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,165
Default

That's not how an event driven OS works.

What is the reason for doing this? Maybe there other solutions.
Reply With Quote
  #5  
Old 04-14-2011, 03:20 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by Flyguy View Post
That's not how an event driven OS works.

What is the reason for doing this? Maybe there other solutions.
my own games are build by controls(with images of course) and not with images and loops.
that's why i need it. for catch the frame.
Reply With Quote
  #6  
Old 04-14-2011, 03:26 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

what happens if i put 1 infinite loop(but leaving the others actions\events working normaly) counting "the frames"(the number)?
note: number=number+1.
i did:
Code:
private sub Restar()
     ..........................
     Do
        If Points = lngDiamonds Then Exit Do
        lngFrame = lngFrame + 1
        DoEvents
    Loop
end sub
now my player can moves, but the colision events don't works
and when i close the game, my vb6 gives me an error and i must close it

Last edited by Cambalinho_83; 04-14-2011 at 03:43 PM. Reason: for put 1 code
Reply With Quote
  #7  
Old 04-15-2011, 12:48 AM
Flyguy's Avatar
Flyguy[VB6] - catch 1 frame in 1 aplication Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,165
Default

I still don't understand why you need "to catch the frame"
Reply With Quote
  #8  
Old 04-15-2011, 06:47 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by Flyguy View Post
I still don't understand why you need "to catch the frame"
sorry... but think in these way: "why you need catch a frame in a game?"
is why i wanted catch it.
note: can you tell me why that loop can block some events?
Reply With Quote
  #9  
Old 04-15-2011, 07:03 AM
PlausiblyDamp's Avatar
PlausiblyDamp[VB6] - catch 1 frame in 1 aplication PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

A "frame" is nothing more than you changing the image that is being displayed for a given sprite in your game. If you are in control of when the images change / cycle then couldn't you just raise an event yourself?

It might help if you explained in a bit more detail what you have now, what you are trying to do and why you picked the current method...
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #10  
Old 04-15-2011, 07:08 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by PlausiblyDamp View Post
A "frame" is nothing more than you changing the image that is being displayed for a given sprite in your game. If you are in control of when the images change / cycle then couldn't you just raise an event yourself?

It might help if you explained in a bit more detail what you have now, what you are trying to do and why you picked the current method...
i'm trying expresse my self but isn't easy(i'm portuguese). i have 1 game, that i did, but i don't use a loop, it's a diferent way(i call it by controls). then i don't know how catch 1 frame. the form have 1 event that tell me when is refresh(or the control is moved or other visible action)?
Reply With Quote
  #11  
Old 04-15-2011, 07:14 AM
PlausiblyDamp's Avatar
PlausiblyDamp[VB6] - catch 1 frame in 1 aplication PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

If I understand correctly the controls are responsible for maintaining the image and updating it accordingly. If so could this control not simply raise an event when the image has been changed?
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #12  
Old 04-15-2011, 08:00 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by PlausiblyDamp View Post
If I understand correctly the controls are responsible for maintaining the image and updating it accordingly. If so could this control not simply raise an event when the image has been changed?
yes... i created the control that shows the image. and i have that event. but how can i catch that event and the controls movement in same time?
Reply With Quote
  #13  
Old 04-15-2011, 08:40 AM
PlausiblyDamp's Avatar
PlausiblyDamp[VB6] - catch 1 frame in 1 aplication PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

You would catch your custom event the same way you catch any other event, via an event handler.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #14  
Old 04-15-2011, 08:46 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by PlausiblyDamp View Post
You would catch your custom event the same way you catch any other event, via an event handler.
i see. i know catch the move and changeimage events(in these case, they have these name). but i don't undestand how can i combine both
i'm thinking, but stills confuse.. .sorry about that.
i think that the best way was the loop, but by some reason, the others events can be blocked(aren't activated).....
Reply With Quote
  #15  
Old 04-15-2011, 09:26 AM
PlausiblyDamp's Avatar
PlausiblyDamp[VB6] - catch 1 frame in 1 aplication PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Could you post the bit of code where you catch / raise these events?
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #16  
Old 04-15-2011, 10:31 AM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by PlausiblyDamp View Post
Could you post the bit of code where you catch / raise these events?
they are inside of my control, i use a timer for compare the positions. by doing these i catch the movement and, of course, the colision event.
(if you want, i can give you my game... then you see the 2D Sprite control with very nice events)
Reply With Quote
  #17  
Old 04-15-2011, 01:39 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default

Quote:
Originally Posted by Cambalinho_83 View Post
they are inside of my control, i use a timer for compare the positions. by doing these i catch the movement and, of course, the colision event.
(if you want, i can give you my game... then you see the 2D Sprite control with very nice events)
in diferent way, but i resolve it. i have 1 api timer, that i edit(from internet) and i put 1 millisecond in timer and works. i see that the frame number depends on cpu. but i know that the pc have an excelent cpu or memory, the frame number will be always the same. but it's good
i need ask anotherthing that isn't about frames, but cycles: how can i activate 1 loop, in design mode, without affect the code window?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
[VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication [VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication
 
[VB6] - catch 1 frame in 1 aplication
[VB6] - catch 1 frame in 1 aplication
 
-->