Jump to content
Bekijk in de app

Een betere weg om onze GTA community te volgen. Leer meer.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

Een volledig scherm app op het beginscherm inclusief notificaties, badges en meer.

Om deze app op je iPhone en iPad te installeren
  1. Druk op het icoon in Safari
  2. Scroll in het menu en druk op Zet op beginscherm.
  3. Druk op Voeg toe rechts bovenaan.
Om deze app op je Android toe te voegen
  1. Druk op het 3-punten menu (⋮) rechts bovenaan in de browser.
  2. Druk op Toevoegen aan beginscherm of Installeer app.
  3. Druk op Toevoegen om te bevestigen.
Geplaatst:

Ik heb een probleem, als ik mijn programma opstart krijg ik heel even een CMD schermpje en dan sluit het weer, verder start mijn programma niet.

Ik denk dat het komt door de aero glass effect die ik over het hele form wil.

Dit is nu mijn code:

Imports System.Net
Imports System.Runtime.InteropServices

Public Class Form1
   Dim NewPoint As New System.Drawing.Point()
   Dim X, Y As Integer
   Private WithEvents httpclient As WebClient
   <Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> Public Structure MARGINS
       Public LeftWidth As Integer
       Public RightWidth As Integer
       Public TopHeight As Integer
       Public Buttomheight As Integer
   End Structure

   <Runtime.InteropServices.DllImport("dwmapi.dll")> Public Shared Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As MARGINS) As Integer
   End Function

   Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

       Try
           Me.BackColor = Color.Black
           Dim margins As MARGINS = New MARGINS
           margins.LeftWidth = -1
           margins.RightWidth = -1
           margins.TopHeight = -1
           margins.Buttomheight = -1
           Dim result As Integer = DwmExtendFrameIntoClientArea(Me.Handle, margins)
       Catch ex As Exception
           MsgBox("Uw besturingsysteem bevat niet de benodigde dll bestanden om het uitvoeren van deze applicatie te kunnen vooltooien.", vbCritical, "Fatale Fout")
           Application.Exit()
       End Try




   End Sub

   Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
       Do Until Me.Height > 137
           Me.Height = Me.Height + 1
       Loop
       Button2.Enabled = False
       TextBox1.ReadOnly = True
       TextBox2.ReadOnly = True
       httpclient = New WebClient
       Dim sourceURL = TextBox1.Text
       Dim filedir = TextBox2.Text
       ProgressBar1.Value = 0
       ProgressBar1.Maximum = 100
       Try
           httpclient.DownloadFileAsync(New Uri(sourceURL), (filedir))
           ListBox1.Items.Add("Download succesvol, downloadurl was: " & TextBox1.Text)


       Catch ex As Exception
           ListBox1.Items.Add("Download mislukt, error: " + ErrorToString())

       End Try
       Button2.Enabled = True
       TextBox1.ReadOnly = False
       TextBox2.ReadOnly = False

   End Sub

   Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
       End
   End Sub

   Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
       Me.WindowState = FormWindowState.Minimized
   End Sub

   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       Dim save As New SaveFileDialog
       save.Title = "Opslaan in..."
       save.ShowDialog()
       TextBox2.Text = save.FileName
       save.Filter = "Alle bestanden *.*|*.*"
   End Sub
   Private Sub httpclient_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles httpclient.DownloadProgressChanged
       ProgressBar1.Value = e.ProgressPercentage
       If ProgressBar1.Value = 100 Then
           Do Until Me.Height < 97
               Me.Height = Me.Height - 1
           Loop
       End If
   End Sub

   Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
       X = Control.MousePosition.X - Me.Location.X
       Y = Control.MousePosition.Y - Me.Location.Y
   End Sub

   Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
       If e.Button = MouseButtons.Left Then
           NewPoint = Control.MousePosition
           NewPoint.X -= (X)
           NewPoint.Y -= (Y)
           Me.Location = NewPoint
       End If
   End Sub

   Private Sub ProgressBar1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgressBar1.Click

   End Sub
End Class

Kunnen jullie me helpen?

Alvast bedankt,

Gta-kneuske

Bewerkt: door Thundercover
Code-tags toegevoegd. ~~ Thundercover

Featured Replies

Geplaatst:

Je kan als het cmd schermpje opent heel snel printscreen doen, en plakken in paint. Zo kun je lezen wat er in het cmd schermpje staat, mocht het schermpje lang genoeg open gaan. Probeer dit eens een paar keer, wellicht lukt het!

Geplaatst:
  • Auteur

@ Ophion: Dat zal moeilijk gaan :S, ik had die laptop namelijk geleend om het te testen. Zelf heb ik Windows XP

Geplaatst:

ikzelf heb de code even voor je getest en er is niks mis mee. het werkt gewoon.

Ik denk dat het dan aan die laptop lag ;) .

Geplaatst:
  • Auteur

Oke. Dankjewel.

Toch gek want die laptop met Win 7 Proffessinal had aero glass enz. gewoon aanstaan

Een reactie plaatsen

Je kan nu een reactie plaatsen en pas achteraf registreren. Als je al lid bent, log eerst in om met je eigen account een reactie te plaatsen.

Gast
Op dit onderwerp reageren...

Recent actief 0

  • Er zijn hier geen geregistreerde gebruikers aanwezig.

Configureer push berichten

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.