Simulate Win95 Taskbar Within Your App

Simulate Win95 Taskbar Within Your App

The Windows 95 taskbar (with the Auto Hide check box set) is quite attractive and provides a compact, nonintrusive way to access and organize information. You can easily simulate this functionality in a VB program and provide a useful alternative to a pull-down menu and/or SpeedButton. To set up such a “taskbar” in your VB application, include a control that can act as a container for other controls in your VB form. The PictureBox control looks good and works well; or you can use a Panel or a Frame.

Set the PictureBox’s Align and AutoSize properties. The Align property indicates where the taskbar will reside on the form, and the AutoSize property ensures that the PictureBox is sized to fit the contours of its parent form whenever the form is resized.

Set the PictureBox’s Visible property to False. Make sure your custom taskbar is not visible until the mouse is moved over a defined “hot” zone on the form. A “hot” zone is a location on the screen defined in X or Y coordinates. You can use these coordinates in any unit of measurement, such as twips or pixels. Set the Parent form’s ScaleMode property to the unit of measurement you wish to work in.

Set the Width and/or Height of the PictureBox to appropriately show embedded controls or information. Set up code in the Form’s MouseMove event to handle the taskbar. This code aligns the taskbar to the left of the screen:

 'Object		Property		Setting'------		--------		-------'Form		Name			FrmTaskBarEx'			ScaleMode	Pixel'PictureBox	Name			PicTaskBar'			Align		Align Left'			AutoSize		True'			Visible		FalsePrivate Sub Form_Load()' Set Width of PictureBox to 1/4 size of Parent form ' when form is loaded. This is wide enough to show ' all of the controls I embedded in the PictureBox,' and will vary with each application.	PicTaskBar.Width = Me.ScaleWidth / 4End SubPrivate Sub Form_MouseMove(Button As _	Integer, Shift As Integer, X As Single, Y As Single)' When the horizontal mouse position is less ' than or equal to defined hot zone' (in this case, horizontal pixel position 4), show taskbar	If (X <= 4) Then 		PicTaskBar.Visible = True		' When the horizontal mouse position is 		' greater than the width of the 		' PictureBox, hide taskbar	ElseIf (X > PicTaskBar.Width) Then		PicTaskBar.Visible = False	End IfEnd Sub
Share the Post:
XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes

ransomware cyber attack

Why Is Ransomware Such a Major Threat?

One of the most significant cyber threats faced by modern organizations is a ransomware attack. Ransomware attacks have grown in both sophistication and frequency over the past few years, forcing

data dictionary

Tools You Need to Make a Data Dictionary

Data dictionaries are crucial for organizations of all sizes that deal with large amounts of data. they are centralized repositories of all the data in organizations, including metadata such as