473,830 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Activity Bar

I have found an Activity Bar control which looks to be exactly what I
need for my splash screen, but I can't seem to get it working. When I
initialise the Start method, the application bar works great until I
do any other processing, which is when it freezes! There is no
documentation with the control which I downloaded from:

http://www.gotdotnet.com/Community/U...2-731052946BD5

I have tried creating my own thread to initialise the Start method,
but it makes no difference. I am probably missing something really
basic here or there is a bug in the control, which I can't believe as
what's the point of an activity bar that freezes during activity? If
anyone can help or point me towards other activity bar controls that
would be great.

Cheers
Nov 16 '05 #1
2 3034
Steve,

This is not a Activity Bar however two methods in a sample I made to show
two methods for a splash screen that does not freeze.

\\\needs on form 1 one button and three textboxes
Private WithEvents frm1 As Form2
Private Delegate Sub Frm1Handler(ByV al message As String)
Private WithEvents frm2 As Form2
Private MyThread As System.Threadin g.Thread
Private Sub Form1_Load(ByVa l sender As Object, _
ByVal e As System.EventArg s) Handles MyBase.Load
Dim timer1 As New System.Windows. Forms.Timer
AddHandler timer1.Tick, AddressOf mytimer1
TextBox1.Text = "0"
timer1.Enabled = True
timer1.Interval = 400
Dim timer2 As New System.Windows. Forms.Timer
End Sub
Private Sub mytimer1(ByVal sender As Object, _
ByVal e As System.EventArg s)
TextBox1.Text = (CInt(TextBox1. Text) + 1).ToString
DirectCast(send er, System.Windows. Forms.Timer).En abled = True
End Sub
Private Sub Button1_Click(B yVal sender As System.Object, _
ByVal e As System.EventArg s) Handles Button1.Click
frm1 = New Form2
frm1.itstop = Me.Top
frm1.itsleft = Me.Left + 200
AddHandler frm1.ready, AddressOf Frm1Ready
frm1.Text = "Extra thread"
MyThread = New System.Threadin g.Thread(Addres sOf frm1.Show)
MyThread.Start( )
frm2 = New Form2
frm2.itstop = Me.Top
frm2.itsleft = Me.Left + 400
frm2.Text = "In own thread"
AddHandler frm1.ready, AddressOf Frm2Ready
frm2.Show()
End Sub
Private Sub Frm1Ready(ByVal message As String)
Me.BeginInvoke( New Frm1Handler(Add ressOf Frm1HandlerSub) , New
Object() {message})
End Sub
Private Sub Frm1HandlerSub( ByVal message As String)
TextBox2.Text = message
frm1.Close()
MyThread.Abort( )
End Sub
Private Sub frm2ready(ByVal message As String)
TextBox3.Text = message
frm2.Dispose()
End Sub
///
\\\Needs a form2 with one textbox
Friend Event form2ready(ByVa l message As String)
Friend itstop As Integer
Friend itsleft As Integer
Private Sub Form2_Activated (ByVal sender As Object, _
ByVal e As System.EventArg s) Handles MyBase.Activate d
Me.Left = itsleft
Me.Top = itstop
Me.BringToFront ()
Dim timenext As DateTime = Now.Add(TimeSpa n.FromSeconds(1 0))
Do While timenext > Now
TextBox1.Text = Now.TimeOfDay.T oString
Application.DoE vents() 'to show the time
Threading.Threa d.Sleep(50)
Me.Opacity -= 0.004
Loop
RaiseEvent form2ready(Now. TimeOfDay.ToStr ing)
End Sub
Private Sub Form2_Closing(B yVal sender As Object, ByVal _
e As System.Componen tModel.CancelEv entArgs) Handles MyBase.Closing
e.Cancel = True
End Sub
///

I hope this helps a little bit?

Cor
Nov 16 '05 #2
The code in Activity Bar control calls Form.Refresh from a non-UI thread. As
far as I know, Refresh in turn updates the window immediately without going
through the message queue. In other words, the code is accessing the UI
directly from a non-UI thread which is the one thing you must not do.

For information on how to fix this, see Jon Skeet's Windows Forms
multithreaded programming FAQ:
http://www.yoda.arachsys.com/csharp/...#windows.forms

Regards,
Sami

"Steve" <go****@valleyb oy.net> wrote in message
news:7a******** *************** ***@posting.goo gle.com...
I have found an Activity Bar control which looks to be exactly what I
need for my splash screen, but I can't seem to get it working. When I
initialise the Start method, the application bar works great until I
do any other processing, which is when it freezes! There is no
documentation with the control which I downloaded from:

http://www.gotdotnet.com/Community/U...2-731052946BD5
I have tried creating my own thread to initialise the Start method,
but it makes no difference. I am probably missing something really
basic here or there is a bug in the control, which I can't believe as
what's the point of an activity bar that freezes during activity? If
anyone can help or point me towards other activity bar controls that
would be great.

Cheers

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4525
by: Kenneth Courville | last post by:
Hello, I have an application that will be logging to a SQL Server 2000 database user user activity from several Windows 2003 terminal servers. This information will be retrieved by monitoring the Security logs of these servers (this part I know how to accomplish already). A table in the database, tblLogEntries, will contain the following fields:
1
1409
by: Steve | last post by:
I have found an Activity Bar control which looks to be exactly what I need for my splash screen, but I can't seem to get it working. When I initialise the Start method, the application bar works great until I do any other processing, which is when it freezes! There is no documentation with the control which I downloaded from: http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=7B0E2EAB-42C4-47AA-9292-731052946BD5 I...
1
1449
by: SLE | last post by:
Hi there, I need to write an application which should monitor user activity client-side and transmit captured information to a central server. User activity means application usage and "internet activity" (browsing, FTP, or whatever). For the application usage part I decided to implement WMI Win32_Process events which will do fine; however I need a solid approach for the internet activity part - some advice would be greatly...
1
2409
by: Sandy | last post by:
We have a web report that times out after 20 minutes if there has been no activity on the report. The timeout is set at the application level and I am unable to get this adjusted. I would like to refresh the current screen after 15 minutes if there has been no activity by the user on the web report. Can someone provide me any ideas on how to write the javascript to determine if there has been 15 minutes without any activity. Thanks....
3
1219
by: RUSSELL MCGINNIS | last post by:
I have a web page which is periodically refreshing itself with data from the server. However I dont want this activity to counted towards the session's "activity counter" i.e. if a user does nothing on the page for 20 mins then I want the session to time out even though the page has been refreshing itself in the background. Any ideas?
0
1074
by: Scott Daniel | last post by:
Is is possible to do the above? I know there is a mechanism to monitor 'folder' activity and I have used it. But I'm wondering if there is a way of monitoring for CRM or database activity in a similar fashion to how the monitor "folder" function works? Any help is greatly appreciated. Thanks, Scott
7
9065
by: icemtn0611 | last post by:
Is there a way for javascript to detect activity in a child iframe that references a foriegn domain? i.e. It appears that security restrictions prevent events from propagating to the parent. I'm simply interested in whether there is user activity in the iframe ... I don't really need the events. I need to timeout the iframe upon a period of inactivity. I thought I might overlap a frame over the iframe, but events don't pass thru .....
4
11293
by: Sir C4 | last post by:
Can someone give a quick example of how to check for activity on a TCP port? For example, I'd like to watch and listen for activity on port 80. Once activity is detected, I'd like an event to be triggered. Thanks in advanced.
2
7294
by: RP | last post by:
I want to detect user activity (mouse move, key click). For certain critical areas (Form in my app.), I want to check whether there is any user activity for a certain interval. If not, then I want to log off the Form. I don't want to user Timer controls. Is there any build in .NET class that can do this and return user-activity.
0
9641
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10769
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10199
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7741
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6948
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5778
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4409
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.