Jump to content

Erro a iniciar programa


david_carlos
 Share

Recommended Posts

Isso acontece porque está a ser lançada uma excepção no teu código.

Precisas de saber qual é essa excepção para a poderes corrigir.

Pesquisa sobre como apanhar unhandled exceptions em vb.net e windows forms.

Tens aqui um exemplo:

http://www.thescarms.com/dotnet/unhandled.aspx

Matraquilhos para Android.

Gratuito na Play Store.

https://play.google.com/store/apps/details?id=pt.bca.matraquilhos

Link to comment
Share on other sites

OLha o codigo que tou a usar é este, sera que me podes ajudar




Public Class Form1


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Winsock1.LocalPort = "7890"
        Winsock1.RemotePort = "7890"
        Winsock1.Listen()

    End Sub

    Private Sub Winsock1_CloseEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles Winsock1.CloseEvent
        Winsock1.Close()
        Winsock1.Listen()

    End Sub

    Private Sub Winsock1_ConnectionRequest(ByVal sender As Object, ByVal eventargs As AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent) Handles Winsock1.ConnectionRequest
        Winsock1.Close()
        Winsock1.Accept(eventargs.requestID)
    End Sub

    Private Sub Winsock1_DataArrival(ByVal sender As Object, ByVal e As AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles Winsock1.DataArrival
        Winsock1.GetData(Label1.Text)
        Select Case Label1.Text
            Case 1
                MsgBox("funciona xD", MsgBoxStyle.Critical, "xD")
        End Select
    End Sub
End Class
Link to comment
Share on other sites

Muito provavelmente não tens o MSWINSCK.OCX encostado à aplicação ou registado no sistema.

Exprimenta encostar o ficheiro ao executável e correr como administrador, ou usa o regsvr32 para registar o OCX.

Basta colocar em \Windows\System32\ e na linha de comandos escrever:

regsvr32 c:\windows\system32\mswinsck.ocx

Sérgio Ribeiro


"Great coders aren't born. They're compiled and released"
"Expert coders do not need a keyboard. They just throw magnets at the RAM chips"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.