Click here to Skip to main content
15,443,430 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Get Process Percentage Pin
EngrImad19-Jun-22 0:22
MemberEngrImad19-Jun-22 0:22 
GeneralRe: Get Process Percentage Pin
Dave Kreskowiak19-Jun-22 8:00
mveDave Kreskowiak19-Jun-22 8:00 
GeneralRe: Get Process Percentage Pin
EngrImad19-Jun-22 3:57
MemberEngrImad19-Jun-22 3:57 
AnswerRe: Get Process Percentage Pin
Richard Deeming19-Jun-22 21:41
mveRichard Deeming19-Jun-22 21:41 
AnswerRe: Get Process Percentage Pin
David Mujica22-Jun-22 3:42
MemberDavid Mujica22-Jun-22 3:42 
QuestionStrange behavior readline Pin
JR21214-Jun-22 1:05
MemberJR21214-Jun-22 1:05 
AnswerRe: Strange behavior readline Pin
Richard MacCutchan14-Jun-22 5:16
mveRichard MacCutchan14-Jun-22 5:16 
GeneralRe: Strange behavior readline Pin
JR21216-Jun-22 2:16
MemberJR21216-Jun-22 2:16 
The whole code where start is the real game
<TargetFramework>net6.0</TargetFramework>
Sub ClearKBBuffer()
    While Console.KeyAvailable
        Console.ReadKey(True)
    End While
End Sub
Sub Main()
    Dim k As ConsoleKey
    Console.TreatControlCAsInput = True
    Randomize()
    Do
        Console.CursorVisible = False
        Dim nLijnen = Start()
        ClearKBBuffer
        Console.CursorVisible = True
        Dim hs As HighScores = HighScores.Load()
        Console.BackgroundColor = ConsoleColor.Red
        Console.ForegroundColor = ConsoleColor.Black
        Dim NewPLace As Integer = -1
        For i As Integer = 0 To 9
            If nLijnen > hs.Scores(i).Lines And NewPLace < 0 Then
                NewPLace = i
            End If
            Console.SetCursorPosition(10, 10 + i)
            Console.Write(hs.Scores(i).Name.PadRight(30) & hs.Scores(i).Lines.ToString.PadLeft(10) & "   " & hs.Scores(i).PlayDate.ToString("dd/MM/yyyy HH:mm:ss"))
        Next
        Console.Beep()
        If NewPLace >= 0 Then
            Dim NewHS As New Score
            With NewHS
                .Lines = nLijnen
                .PlayDate = Now
                Console.SetCursorPosition(10, 21)
                Console.Write("New highscore. " & nLijnen & " Your name please? ")
                .Name = Console.ReadLine
                .Name = .Name.Trim
                If .Name = "" Then .Name = "[No Name]"
            End With
            For i = 8 To NewPLace Step -1
                hs.Scores(i + 1) = hs.Scores(i)
            Next
            hs.Scores(NewPLace) = NewHS
            hs.Save()
        End If
        Console.SetCursorPosition(0, Console.WindowHeight - 2)
        Console.WriteLine("New game? (Y/N) ")
        Do
            k = Console.ReadKey.Key
        Loop While k <> ConsoleKey.Y And k <> ConsoleKey.N
    Loop While k = ConsoleKey.Y
End Sub

AnswerRe: Strange behavior readline Pin
Alan N14-Jun-22 5:30
MemberAlan N14-Jun-22 5:30 
GeneralRe: Strange behavior readline Pin
JR21216-Jun-22 2:13
MemberJR21216-Jun-22 2:13 
QuestionDatabase relating entity having various data members Pin
lazy_dude12-Jun-22 20:17
Memberlazy_dude12-Jun-22 20:17 
AnswerRe: Database relating entity having various data members Pin
Richard Deeming12-Jun-22 21:26
mveRichard Deeming12-Jun-22 21:26 
GeneralRe: Database relating entity having various data members Pin
lazy_dude12-Jun-22 23:03
Memberlazy_dude12-Jun-22 23:03 
QuestionDataGridView Multi Layer Header Pin
EngrImad11-Jun-22 3:33
MemberEngrImad11-Jun-22 3:33 
SuggestionRe: DataGridView Multi Layer Header Pin
Richard MacCutchan11-Jun-22 4:16
mveRichard MacCutchan11-Jun-22 4:16 
GeneralRe: DataGridView Multi Layer Header Pin
EngrImad11-Jun-22 7:58
MemberEngrImad11-Jun-22 7:58 
GeneralRe: DataGridView Multi Layer Header Pin
Richard MacCutchan11-Jun-22 8:49
mveRichard MacCutchan11-Jun-22 8:49 
GeneralRe: DataGridView Multi Layer Header Pin
EngrImad18-Jun-22 8:31
MemberEngrImad18-Jun-22 8:31 
Questionhelp edit config file Pin
Benjamindh8-Jun-22 11:14
MemberBenjamindh8-Jun-22 11:14 
AnswerRe: help edit config file Pin
Dave Kreskowiak8-Jun-22 14:55
mveDave Kreskowiak8-Jun-22 14:55 
QuestionPooling data from database into Listview with timer Pin
SHAHROL AZMI BIN AMZAT25-May-22 22:53
MemberSHAHROL AZMI BIN AMZAT25-May-22 22:53 
AnswerRe: Pooling data from database into Listview with timer Pin
Dave Kreskowiak26-May-22 5:34
mveDave Kreskowiak26-May-22 5:34 
GeneralRe: Pooling data from database into Listview with timer Pin
SHAHROL AZMI BIN AMZAT26-May-22 14:25
MemberSHAHROL AZMI BIN AMZAT26-May-22 14:25 
GeneralRe: Pooling data from database into Listview with timer Pin
Dave Kreskowiak27-May-22 5:37
mveDave Kreskowiak27-May-22 5:37 
GeneralRe: Pooling data from database into Listview with timer Pin
SHAHROL AZMI BIN AMZAT29-May-22 15:53
MemberSHAHROL AZMI BIN AMZAT29-May-22 15:53 

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.