Click here to Skip to main content
15,896,269 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: open file directory [modified] Pin
Alan N18-Mar-09 9:27
Alan N18-Mar-09 9:27 
GeneralRe: open file directory Pin
captainmogo19-Mar-09 3:28
captainmogo19-Mar-09 3:28 
Questioncalling a menu form from another menu Pin
Member 462416918-Mar-09 7:04
Member 462416918-Mar-09 7:04 
AnswerRe: calling a menu form from another menu Pin
iamalik18-Mar-09 7:38
professionaliamalik18-Mar-09 7:38 
GeneralRe: calling a menu form from another menu Pin
0x3c018-Mar-09 8:21
0x3c018-Mar-09 8:21 
Questionhow to improve my 2D collision detection system? [modified] Pin
O.G.I.18-Mar-09 4:08
O.G.I.18-Mar-09 4:08 
AnswerRe: how to improve my 2D collision detection system? Pin
Dave Kreskowiak18-Mar-09 6:04
mveDave Kreskowiak18-Mar-09 6:04 
GeneralRe: how to improve my 2D collision detection system? Pin
O.G.I.18-Mar-09 9:18
O.G.I.18-Mar-09 9:18 
Thank you for the advices, the moving objects I use are actually windows forms, and I'm not comparing all those 81000000 elements with each other - the logic is different but very long to explain in the forum. Now I've just turned off the collision detect system and for my big surprisse I've noticed that nothing is changed - again If I put more than 100 objects(windows forms) to move arund my desktop - the performance is the same as if the collision detect statements are turned on. I suspect that using windows forms as units in the playground field is a bad idea, I think that windows ust can't redraw smoothly the new positions of that much forms. You can try this by yourself to see I move 100 System.Windows.Forms.Form objects around my desktop using the following code:

Public Class frmMain
Private Sub frmMain_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Select Case e.KeyCode
Case Keys.W
For Each frmHero As System.Windows.Forms.Form In Me.OwnedForms
frmHero.Left += 5
frmHero.Top += 5
Next
Case Keys.C
Dim frmHer As New System.Windows.Forms.Form
frmHer.Show(Me)
frmHer.FormBorderStyle = Windows.Forms.FormBorderStyle.None
frmHer.BackColor = Color.Red
frmHer.Size = New Size(5, 5)
Me.Focus()
Me.Text = Me.OwnedForms.Count
End Select
End Sub

If you try this code on any machine You'll see that you can move smoothly about 100 objects(windows forms) or little more depending on the PC. Is it possible that the bad performance of my collision detect system is hidden somewhere in this characteristic of Windows OS(I use windows Vista Ultimate SP1 and Windows XP professional SP2)? I thought to try C++ with DirectX, but I still don't have money to buy these products. I heard that DirectX is optimized for game programming.
GeneralRe: how to improve my 2D collision detection system? Pin
Dave Kreskowiak18-Mar-09 10:26
mveDave Kreskowiak18-Mar-09 10:26 
AnswerRe: how to improve my 2D collision detection system? Pin
riced18-Mar-09 7:32
riced18-Mar-09 7:32 
AnswerRe: how to improve my 2D collision detection system? Pin
Luc Pattyn18-Mar-09 8:39
sitebuilderLuc Pattyn18-Mar-09 8:39 
QuestionIs there a way to bypass the form_load event of vb.net windows application? Pin
rains197918-Mar-09 1:42
rains197918-Mar-09 1:42 
AnswerRe: Is there a way to bypass the form_load event of vb.net windows application? Pin
Eddy Vluggen18-Mar-09 1:58
professionalEddy Vluggen18-Mar-09 1:58 
GeneralRe: Is there a way to bypass the form_load event of vb.net windows application? Pin
rains197918-Mar-09 2:49
rains197918-Mar-09 2:49 
GeneralRe: Is there a way to bypass the form_load event of vb.net windows application? Pin
Eddy Vluggen18-Mar-09 2:57
professionalEddy Vluggen18-Mar-09 2:57 
GeneralRe: Is there a way to bypass the form_load event of vb.net windows application? Pin
rains197918-Mar-09 3:08
rains197918-Mar-09 3:08 
GeneralRe: Is there a way to bypass the form_load event of vb.net windows application? Pin
Eddy Vluggen18-Mar-09 3:19
professionalEddy Vluggen18-Mar-09 3:19 
AnswerRe: Is there a way to bypass the form_load event of vb.net windows application? Pin
Alan N18-Mar-09 4:52
Alan N18-Mar-09 4:52 
AnswerRe: Is there a way to bypass the form_load event of vb.net windows application? Pin
Dave Kreskowiak18-Mar-09 5:52
mveDave Kreskowiak18-Mar-09 5:52 
GeneralRe: Is there a way to bypass the form_load event of vb.net windows application? Pin
rains197918-Mar-09 23:42
rains197918-Mar-09 23:42 
GeneralRe: Is there a way to bypass the form_load event of vb.net windows application? Pin
Dave Kreskowiak19-Mar-09 2:15
mveDave Kreskowiak19-Mar-09 2:15 
Questioncombine and run two projects with diffrent menus forms Pin
Member 462416918-Mar-09 0:22
Member 462416918-Mar-09 0:22 
AnswerRe: combine and run two projects with diffrent menus forms Pin
Christian Graus18-Mar-09 0:25
protectorChristian Graus18-Mar-09 0:25 
GeneralRe: combine and run two projects with diffrent menus forms Pin
Member 462416918-Mar-09 1:05
Member 462416918-Mar-09 1:05 
QuestionCalling a function in VB.Net through Visual Basic 5 Pin
rains197917-Mar-09 23:38
rains197917-Mar-09 23:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.