deery5000's Profile User Rating: -----

Reputation: 79 Whiz
Group:
Active Members
Active Posts:
1,014 (0.49 per day)
Joined:
09-May 09
Profile Views:
10,336
Last Active:
User is offline Jan 23 2015 09:17 AM
Currently:
Offline

Previous Fields

Country:
IE
OS Preference:
Windows
Favorite Browser:
Internet Explorer
Favorite Processor:
Intel
Favorite Gaming Platform:
Playstation
Your Car:
LandRover
Dream Kudos:
0

Latest Visitors

Icon   deery5000 Hobbyist Coder :)

Posts I've Made

  1. In Topic: Develop a cross-platform software using Vb.Net?

    Posted 22 Jan 2015

    There is 2 approaches to this

    1. Develop using a browser based application when can render on multiple devices (vb.net , c#) PhoneGap will give you the ability to use the mobile device hardware ie camera
    2. Use xamarin to build in c# and the code it converted for you to multiple platforms

    or if you want to do this individually

    Android - Java
    IOS - Objective C
    Windows - xmal
  2. In Topic: Add controls to panel dynamically using thread

    Posted 22 Jan 2015

    cool, didn't know this

    Thanks
  3. In Topic: Add controls to panel dynamically using thread

    Posted 21 Jan 2015

    Im fimular with background workers :)/>/> thanks guys

    I have found the issue, I have some test code below

    So the code below resides on the forms class, this code executes and the control is displayed
      Public Sub showposters()
    
            Dim myPicturebox As New PictureBox
            With myPicturebox
                myPicturebox.Size = New Size(176, 245)
                .Name = "test"
                .SizeMode = PictureBoxSizeMode.StretchImage
                .Location = New System.Drawing.Point(5, 5)
                .BorderStyle = BorderStyle.FixedSingle
            End With
    
            Threading.ThreadPool.QueueUserWorkItem(New System.Threading.WaitCallback _
                                                   (Sub() downloadAndDisplayPoster(myPicturebox)))
        End Sub
    
    
        Private Delegate Sub displayPoster(ByVal pictureControl As PictureBox)
        Private Sub downloadAndDisplayPoster(ByVal pictureControl As PictureBox)
    
            If Me.InvokeRequired = True Then
                Dim delegate1 As New displayPoster(AddressOf downloadAndDisplayPoster)
                Me.Invoke(delegate1, pictureControl)
            Else
                Me.Controls.Add(pictureControl)
            End If
    
        End Sub
    
    


    However if I move the above code to its own class and reference the form, the control is not added.

    I have tried adding a reference to the form and explicitly typing the form name when attempting to invoke. The code itself executes with no errors however there is no control.

    Thanks for your help guys

    If anyone was a wee test, heres the full code
    Imports System.IO
    
    
    
    Public Class poster
    
        Public Sub showposters()
    
            Dim myPicturebox As New PictureBox
            With myPicturebox
                myPicturebox.Size = New Size(176, 245)
                .Name = "test"
                '.Width = 176
                '.Height = 245
                .SizeMode = PictureBoxSizeMode.StretchImage
                .Location = New System.Drawing.Point(5, 5)
                .BorderStyle = BorderStyle.FixedSingle
            End With
    
            Threading.ThreadPool.QueueUserWorkItem(New System.Threading.WaitCallback _
                                                   (Sub() downloadAndDisplayPoster(myPicturebox)))
        End Sub
    
        Private Delegate Sub displayPoster(ByVal pictureControl As PictureBox)
        Private Sub downloadAndDisplayPoster(ByVal pictureControl As PictureBox)
    
            If Form1.InvokeRequired = True Then
                Dim delegate1 As New displayPoster(AddressOf downloadAndDisplayPoster)
                Form1.Invoke(delegate1, pictureControl)
            Else
                Form1.Controls.Add(pictureControl)
            End If
    
        End Sub
    
    
    End Class
    
    Public Class Form1
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    
            Dim p As New poster
            p.showposters()
    
            ' showposters()
    
        End Sub
    
        
        Public Sub showposters()
    
            Dim myPicturebox As New PictureBox
            With myPicturebox
                myPicturebox.Size = New Size(176, 245)
                .Name = "test"
                '.Width = 176
                '.Height = 245
                .SizeMode = PictureBoxSizeMode.StretchImage
                .Location = New System.Drawing.Point(5, 5)
                .BorderStyle = BorderStyle.FixedSingle
            End With
    
            Threading.ThreadPool.QueueUserWorkItem(New System.Threading.WaitCallback _
                                                   (Sub() downloadAndDisplayPoster(myPicturebox)))
        End Sub
    
    
        Private Delegate Sub displayPoster(ByVal pictureControl As PictureBox)
        Private Sub downloadAndDisplayPoster(ByVal pictureControl As PictureBox)
    
            If Me.InvokeRequired = True Then
                Dim delegate1 As New displayPoster(AddressOf downloadAndDisplayPoster)
                Me.Invoke(delegate1, pictureControl)
            Else
                Me.Controls.Add(pictureControl)
            End If
    
        End Sub
    
    End Class
    
    
    
  4. In Topic: Access denied to path c

    Posted 16 Jan 2015

    I had this issue before, it didn't occur in debug mode.

    You can force "admin permissions" on start of your application, the user is prompted (like vista)

    To do this you need to open the application.manifest
    in Visual Studio open project properties => application => View windows settings

    Find this line
    <requestedExecutionLevel level="asInvoker" uiAccess="false" />

    Update asInvoker to one of the following

    level="asInvoker" (normal account - default)

    level="requireAdministrator (require administrator - What you need... but could be next one)

    level="highestAvailable" (if anything is higher then administrator, require that)
  5. In Topic: where should I have started?

    Posted 15 Jan 2015

    There are a lot of tutorials sites out there and plenty of books to help you and us of course :) (I started here)

    The real issue you have is that everything will seem so alien. I always think of the Matrix movie when Neo looks and the screen and the guy says Blonde , Brunette, I don't see the code anymore. Its kind like that when you gain some experience :)

    Start with a tutorial site, most likely you will be bored but the idea of these sites I not to make you a developer but to familiarise you with some basic syntax and to make you feel more confident when working in the IDE. Starting out is frustrating however issues you had before will not occur as often, you can only learn by making many mistakes so don't lose heart!

    Once you have done the tutorials I suggest you think of a project that would benefit yourself, usually this will be something u have an interest in. Don't think you need to come up with a new great idea that will make the new Facebook. Love Movies, Music, sports etc them make something

    When starting you own project post here with your idea and ask for guidance in layout , databases etc. We will point you in the right direction and even give you some sample code to get started

    We look forward to hearing from you

    Goodluck!

My Information

Member Title:
D.I.C Lover
Age:
30 years old
Birthday:
December 28, 1984
Gender:
Location:
Derry / Londonderry
Interests:
Play in the North West Snooker league each year
Programme everyday for fun
PC Repair
Full Name:
Kevin Deery
Years Programming:
6
Programming Languages:
C++, Java, C#, Vb.Net , SQL,

Contact Information

E-mail:
Click here to e-mail me
MSN:
MSN  deery_5000@hotmail.co.uk
Website URL:
Website URL  http://
LinkedIn:
http://www.linkedin.com/profile/view?id=222123994&trk=nav_responsive_tab_profile
Facebook:
https://www.facebook.com/kevin.deery.9

Friends

Comments

deery5000 has no profile comments yet. Why not say hello?