Click here to Skip to main content
15,900,511 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: plz brack my licence Pin
Bert Mitton18-Aug-11 15:37
professionalBert Mitton18-Aug-11 15:37 
AnswerRe: plz brack my licence Pin
Dave Kreskowiak19-Aug-11 1:59
mveDave Kreskowiak19-Aug-11 1:59 
QuestionDSN over LAN using MS ACCESS and VB 6.0 Pin
Eyo118-Aug-11 2:16
Eyo118-Aug-11 2:16 
AnswerRe: DSN over LAN using MS ACCESS and VB 6.0 Pin
Dave Kreskowiak18-Aug-11 3:12
mveDave Kreskowiak18-Aug-11 3:12 
QuestionHow to scroll without a scrollbar or make scrollbar invisible Pin
TOM JOHN LITTLE17-Aug-11 22:44
TOM JOHN LITTLE17-Aug-11 22:44 
AnswerRe: How to scroll without a scrollbar or make scrollbar invisible Pin
Dave Kreskowiak18-Aug-11 1:41
mveDave Kreskowiak18-Aug-11 1:41 
GeneralRe: How to scroll without a scrollbar or make scrollbar invisible Pin
Bert Mitton18-Aug-11 3:21
professionalBert Mitton18-Aug-11 3:21 
Question2D Map Editor in VB 2010 Pin
TOM JOHN LITTLE17-Aug-11 13:56
TOM JOHN LITTLE17-Aug-11 13:56 
Hello!
I am trying to make a 2D map editor for my game.
My map is based on a grid 48x48 pixels and 3000 cells(1 cell=48x48pixels).
To do my editor I created a PictureBox array on a scrollable form.

Here is my code for the array :
VB
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Me.AutoScroll = True
    Dim rows, columns As Integer
    rows = 0
    columns = 0
    For i As Integer = 0 To 3000
        Dim my_picture As New PictureBox
        my_picture.Parent = Me
        my_picture.Size = New Size(48, 48)
        my_picture.Top = CType((rows) * 49, Integer)
        my_picture.Left = CType((columns) * 49, Integer)

        my_picture.Image = My.Resources.board
        my_picture.Visible = True
        'AddHandler my_picture.Click, AddressOf my_picture_Click
        columns = columns + 1
        If columns = 60 Then
            rows = rows + 1
            columns = 0
        End If

    Next

End Sub


Each of my image have 5 events :
Mouse Click
Mouse Enter
Mouse Leave
Mouse Move
Mouse Hover

Everything is working fine but to load the form for the first time takes about 30 seconds on a I7 PC with 8 GB DDR3 working on Win7x64 bits.

Can you tell me what to do to take less time to load all 3000 cells ?!

Thank You !
AnswerRe: 2D Map Editor in VB 2010 Pin
Luc Pattyn17-Aug-11 14:18
sitebuilderLuc Pattyn17-Aug-11 14:18 
GeneralRe: 2D Map Editor in VB 2010 Pin
TOM JOHN LITTLE17-Aug-11 14:42
TOM JOHN LITTLE17-Aug-11 14:42 
AnswerRe: 2D Map Editor in VB 2010 Pin
Luc Pattyn17-Aug-11 15:09
sitebuilderLuc Pattyn17-Aug-11 15:09 
QuestionWindows service Error Pin
oakleaf17-Aug-11 10:27
oakleaf17-Aug-11 10:27 
AnswerRe: Windows service Error Pin
Dave Kreskowiak17-Aug-11 14:33
mveDave Kreskowiak17-Aug-11 14:33 
GeneralRe: Windows service Error Pin
oakleaf18-Aug-11 4:24
oakleaf18-Aug-11 4:24 
Question[System.Reflection.Assembly Instance].GetTypes ReflectionTypeLoadError Pin
Orphius17-Aug-11 6:13
Orphius17-Aug-11 6:13 
QuestionXMLBulkCopy Error in VBScript Pin
priyaahh16-Aug-11 21:24
priyaahh16-Aug-11 21:24 
AnswerRe: XMLBulkCopy Error in VBScript Pin
Simon_Whale17-Aug-11 1:17
Simon_Whale17-Aug-11 1:17 
Questiongive me a suggestion Pin
satc16-Aug-11 6:56
satc16-Aug-11 6:56 
AnswerRe: give me a suggestion Pin
Dave Kreskowiak16-Aug-11 11:11
mveDave Kreskowiak16-Aug-11 11:11 
GeneralRe: give me a suggestion Pin
satc16-Aug-11 13:22
satc16-Aug-11 13:22 
GeneralRe: give me a suggestion Pin
Dave Kreskowiak16-Aug-11 17:59
mveDave Kreskowiak16-Aug-11 17:59 
GeneralRe: give me a suggestion Pin
satc19-Aug-11 7:39
satc19-Aug-11 7:39 
GeneralRe: give me a suggestion Pin
Dave Kreskowiak19-Aug-11 11:59
mveDave Kreskowiak19-Aug-11 11:59 
AnswerRe: give me a suggestion Pin
Simon_Whale16-Aug-11 12:33
Simon_Whale16-Aug-11 12:33 
AnswerRe: give me a suggestion Pin
Bert Mitton18-Aug-11 3:30
professionalBert Mitton18-Aug-11 3:30 

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.