Login Register
Trump Declares Democrats Can Only Win Election With ‘Gestapo’ Tactics & Voter Fraud — Sunday Night Live --- --- Martial Law Alert: 42% of Americans Say Civil War Imminent, Alex Jones Warns The Threat Is Real — Must-Watch Sunday Live! --- --- Netanyahu Unveils Utopian Plan for ‘Gaza 2035’ --- --- Trump Compares Biden Admin to Nazis --- --- NY Schools to Hold Special Graduation for LGBTQ Students --- --- Father, Baby Pistol-Whipped During Armed Robbery In Berkeley, California --- --- Pro-Palestianian Protesters Backed by ‘Biden’s Biggest Donors,’ Politico Admits --- --- WATCH: High-Speed Smuggling Pursuit Ends in Horror Crash, Bailout in Texas --- --- Biden Campaign Says They Will SHORTEN His Speeches --- --- The Not-So-Great Game --- --- Watch: Alex Jones Interviews Megadeth’s Dave Mustaine --- --- U.S. Government Mandates Preferred Pronouns in All Workplaces --- --- France Sends Troops to Ukraine Frontlines --- --- Carmakers Sharing Location Data with US Government without Warrants --- --- New Pfizer RSV Vaccine Linked To Premature Births in Pregnant Women --- ---



[Reply]
Forum Index > AIM/ICQ Discussion
ThreadingSolution
Posted on: 02-26 4:09 pm
X3N0



https://www.mediafire.com/file/p9go790c4uz2ddn/b99formloop1.zip/file
[b]Nice So far[/b]
Runs the main event the form doesnt pop up lol but looks good.
may not be start up object.

Those who follow the river, can fall in.
Posted on: 02-27 12:05 am
X3N0

[code]
Private Sub bbw99cmsClient_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Entry01.Main()

For Each c As Windows.Forms.Control In Entry01.MAINTHREAD.MyControls
Me.Controls.Add(c)
Next

End Sub
Public Class Entry01

Private Shared MainRoutineDone As Boolean
Private Shared MainRoutine As EventHandler

Shared WaitOne


Public Shared Sub Main()
InitializeProcess()

If IsNothing(MAINTHREAD.waitThisMany) Then
WaitOne = False
MyOp.APP_STATE_IDLE = CInt(0)
MyOp.APP_STATE_IDLE = MyOp.APPSTATE + MyOp.APPSTATE
End If

Console.WriteLine("Running Event Main")
Try

WaitOne = CheckIdleSwitch(MyOp.APP_STATE_IDLE)




MainRoutine.Invoke(New Object, New EventArgs)

MainRoutineDone = CBool(1)
Catch ex As Exception
Console.WriteLine(ex.Message)
Finally
Try
If MainRoutineDone = CBool(1) Then
MainRoutineDone = False
End If
Catch ex As Exception
Console.WriteLine(ex.Message)


Finally
MainRoutineDone = CBool(0)
Console.WriteLine("Main Routine complete.")
End Try
End Try
Console.WriteLine("End Event Main")
If MainRoutineDone = CBool(0) Then
MainRoutine.Invoke(New Object, New EventArgs)
End If
If Entry01.WaitOne Then
MyOp.APP_STATE_IDLE = MyOp.APPSTATE + MyOp.APPSTATE
End If
End Sub

Private Shared Function CheckIdleSwitch(ByVal MyNum As Integer) As Boolean
Select Case MyNum
Case MyOp.APP_STATE_IDLE = MyOp.APPSTATE + MyOp.APPSTATE
Return True
Case Else
Debug.Print("Something else?...Not idleing.")
Call Entry01.Main()
End Select

Return CBool(0)
End Function


Private Shared Sub MainOne()
MAINTHREADREF1.Threading1.Start()
End Sub

Private Shared Sub InitializeProcess()
MakeLoopProcess()
MainRoutine = New EventHandler(AddressOf MainOne)


Console.Title = "bb99cmsClient"

End Sub

Private Shared MAINTHREADREF1 As New MAINTHREAD


Private Shared Sub MakeLoopProcess()

Dim RefMainMy() As Object = {New Object(1) {}, New Object(1) {}, New Object(6) {}}

RefMainMy(1) = Entry01.MAINTHREADREF1.Threading1
RefMainMy(2) = Entry01.MAINTHREADREF1.Threading2


End Sub
Public Class MAINTHREAD
Public Names() As String

Private t1, t2 As Threading.Thread

Property Threading1 As Threading.Thread
Property Threading2 As Threading.Thread


Sub New()
t1 = New Threading.Thread(AddressOf Thread1)
t2 = New Threading.Thread(AddressOf Thread2)

Threading1 = t1
Threading2 = t2

End Sub
Public Shared waitThisMany

Property ServerEcho As Components.ConnectShell
Property Time As Components.bbwTimer

Dim TimeEHandle

Private Sub MakeMain()
Dim bbwTime As New Components.bbwTimer()
Time = bbwTime


Dim ServerTalk As Components.ConnectShell = New Components.ConnectShell

ServerEcho = ServerTalk




TimeEHandle = New EventHandler(AddressOf bbwTime.TickTimes)


End Sub

Private Sub Thread1()

Dim f As New bbw99cmsClient

MakeMain()



f.Show()

While f.Created

ServerEcho.StartListenting()

TimeEHandle.Invoke()


Select Case MyOp.APPSTATE

Case 1
Windows.Forms.Application.DoEvents()
Case MyOp.APP_STATE_IDLE = MyOp.APPSTATE + MyOp.APPSTATE

Dim ImWaiting As Integer = Time.NumTicks

waitThisMany = ImWaiting

Do Until 0
Threading.Thread.Yield()


Threading.Thread.SpinWait(ImWaiting)

If ImWaiting >= 1 Then
MainRoutineDone = True
End If

Exit Do

Loop
Case Else

Dim OkClicked As Integer = CInt(Nothing)

OkClicked = MsgBox("APP STATE VIOLATION", MsgBoxStyle.Critical, "APPSTATE")


If (OkClicked) Then
Debug.Print("OK!")
Else
Debug.Print("Echo to bravo!")
End If


Throw New AccessViolationException("App altered.!")





End Select




End While




End Sub
Public Shared MyControls As List(Of Windows.Forms.Control)


Private Sub Thread2()
Dim textbox1 As New Windows.Forms.TextBox
textbox1.Multiline = True
textbox1.Location = New Drawing.Point(0, 640)
textbox1.ReadOnly = True
MyControls.Add(textbox1)

Dim MyMenu As New Windows.Forms.MenuStrip

MyMenu.Location = New Drawing.Point(0, 0)

MyMenu.Items.Add("&File")

MyControls.Add(MyMenu)

End Sub




End Class

End Class

[/code]

Those who follow the river, can fall in.
Posted on: 02-28 8:04 pm
X3N0

[bump]

Those who follow the river, can fall in.
< - 1 - >

[Reply]