Click here to Skip to main content
15,902,189 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Two simple questions I think Pin
Smithers-Jones19-Mar-08 9:17
Smithers-Jones19-Mar-08 9:17 
GeneralRe: Two simple questions I think Pin
cstrader23219-Mar-08 9:51
cstrader23219-Mar-08 9:51 
QuestionI hate reportviewer......isn't there something better!?!? Pin
Tom Wright19-Mar-08 8:45
Tom Wright19-Mar-08 8:45 
AnswerRe: I hate reportviewer......isn't there something better!?!? Pin
Dave Kreskowiak19-Mar-08 10:34
mveDave Kreskowiak19-Mar-08 10:34 
GeneralRe: I hate reportviewer......isn't there something better!?!? Pin
Tom Wright20-Mar-08 4:54
Tom Wright20-Mar-08 4:54 
GeneralRe: I hate reportviewer......isn't there something better!?!? Pin
Dave Kreskowiak20-Mar-08 4:59
mveDave Kreskowiak20-Mar-08 4:59 
AnswerRe: I hate reportviewer......isn't there something better!?!? Pin
darkelv22-Mar-08 18:38
darkelv22-Mar-08 18:38 
QuestionObject synchronization method was called from an unsynchronized block of code. Pin
RJGCarey19-Mar-08 8:07
RJGCarey19-Mar-08 8:07 
The following code throws the error above.

Module Base
Public sub Clock
Do
If needsNewChart = True
Draw = New clsDraw("clock", i_id, True)
thdWorkerSub = New Thread(AddressOf Draw.DoIt)
thdWorkerSub.Name = "Draw"
thdWorkerSub.Start()
thdWorkerSub.Join()
Draw = Nothing
End If
Thread.Sleep(100)
Loop
End Sub
End Module
Public Class clsDraw
Public Sub DoIt
'491 lines of code that creates a new bitMap(theBmp) and draws a stock market "tick chart".
'There are two uses of Monitor.Enter > Monitor.Exit on other objects without difficulties in this code.
Try
lockedGraphics = Monitor.TryEnter(theFrm.bmpTicks, 50)
If lockedGraphics = True Then
theFrm.bmpTicks = theBmp
End If
If lockedGraphics = True Then
Monitor.Exit(theFrm.bmpTicks)
End If
Thread.Sleep(10)
theFrm.pbTicks.Invalidate()
Catch ex As Exception
Ers.Show(c_id & "theTks.Draw.DoIt-setdown2", ex)
End Try
End Sub
End Class

Monitor.Exit(theFrm.bmpTicks) throws the error.
When you step through the code in the debugger, the lock is acquired and the bitmap is copied.
I use Monitor to synchronize my threads in many programs that work together to track the stock market.
I have not encountered this error before.
Why is it occuring?
Thanks.
RCarey

RCarey

GeneralRe: Object synchronization method was called from an unsynchronized block of code. Pin
RJGCarey19-Mar-08 9:01
RJGCarey19-Mar-08 9:01 
GeneralUsing "wdPropertyTimeLastSaved" fon Userforms for Word. Pin
Harold_Wishes19-Mar-08 7:07
Harold_Wishes19-Mar-08 7:07 
GeneralGet Hard disc Serial number Pin
Rupesh Kumar Swami19-Mar-08 6:31
Rupesh Kumar Swami19-Mar-08 6:31 
AnswerRe: Get Hard disc Serial number Pin
Rajesh Anuhya19-Mar-08 19:13
professionalRajesh Anuhya19-Mar-08 19:13 
GeneralRe: Get Hard disc Serial number Pin
Rupesh Kumar Swami20-Mar-08 3:42
Rupesh Kumar Swami20-Mar-08 3:42 
Questionselect statement that will retrieve all entries that have a certian letter combination in it? Pin
Mr Oizo19-Mar-08 4:40
Mr Oizo19-Mar-08 4:40 
AnswerRe: select statement that will retrieve all entries that have a certian letter combination in it? Pin
Dave Kreskowiak19-Mar-08 5:51
mveDave Kreskowiak19-Mar-08 5:51 
GeneralRe: select statement that will retrieve all entries that have a certian letter combination in it? Pin
Mr Oizo19-Mar-08 20:59
Mr Oizo19-Mar-08 20:59 
GeneralUnsigned Integers and Marshal.ReadInt32() Pin
VFaul19-Mar-08 4:16
VFaul19-Mar-08 4:16 
GeneralRe: Unsigned Integers and Marshal.ReadInt32() Pin
Dave Kreskowiak19-Mar-08 4:39
mveDave Kreskowiak19-Mar-08 4:39 
GeneralRe: Unsigned Integers and Marshal.ReadInt32() Pin
VFaul19-Mar-08 7:25
VFaul19-Mar-08 7:25 
GeneralRe: Unsigned Integers and Marshal.ReadInt32() Pin
Dave Kreskowiak19-Mar-08 8:15
mveDave Kreskowiak19-Mar-08 8:15 
GeneralChanging VB Project Properties Pin
Jeeva Mary Varghese19-Mar-08 1:06
Jeeva Mary Varghese19-Mar-08 1:06 
QuestionHow to prevent multiple user login using one account in VB Pin
kingascona18-Mar-08 23:48
professionalkingascona18-Mar-08 23:48 
GeneralRe: How to prevent multiple user login using one account in VB Pin
Nilesh Hapse19-Mar-08 0:57
Nilesh Hapse19-Mar-08 0:57 
GeneralChange the title bar heading on a form in code... Pin
Mr Oizo18-Mar-08 22:45
Mr Oizo18-Mar-08 22:45 
AnswerRe: Change the title bar heading on a form in code... Pin
Rajesh Anuhya18-Mar-08 22:54
professionalRajesh Anuhya18-Mar-08 22:54 

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.