Solved

Changing the workingarea using VB

Posted on 2011-02-24
12
330 Views
Last Modified: 2012-05-11
Hi all,

I have a form named FormQueues and I am trying to having it dock to the right of the main window (usually referred to as Screen.PrimaryScreen.WorkingArea) so that no window can go on top of it and cover it. Like a taskbar if you want.

I am using Windows XP and Visual Basic 2005 but I can not get the workingarea to change. I have looked all over the net and nothing comes up that is helpful.

Can anybody help?
0
Comment
Question by:touyets17
  • 6
  • 3
12 Comments
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 34978921
In vb6, we had the liberty of using the API SetWindowPos :)

For vb.Net, use the inbuilt property .Topmost to achieve what you want.

Me.TopMost = True

Now the problem is that the moment the app is full screen .Topmost fail for your window. So to overcome it place the above code inside a timer :)

Private Sub Timer1_Tick(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Timer1.Tick
    Me.TopMost = True
End Sub

Open in new window


Hope this helps.

Sid
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35147322
Could you please tell me why did you give a "C" to my suggestion?

Sid
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35147646
Thanks aiki

Sid
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35148350
Definitely :)

Sid
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:touyets17
ID: 35148845
Hi both, sorry, didn't mean to influence Sid's ranking. Sid's answer didn't answer my query totally. i needed to reserve the space on teh workspace and Sid's answer only permitted me to have the form on top of any other window but it hid whatever part of teh window that was right beneath it.

After a lot of research on teh net, i can not find anythinga nd I gave up on that aspect of the form. :( it happens.

thanks for helping Sid since you were the opnly one to.
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35148891
>>> Sid's answer only permitted me to have the form on top of any other window but it hid whatever part of teh window that was right beneath it.

touyets17: Thanks for getting back. Let's try it again.

Can you please explain what exactly do you want? Because when we move a form to the top, the window beneath it will get fully/partially hidden. :)

Sid
0
 

Author Comment

by:touyets17
ID: 35415292
Hi all, sorry, I was away on holidays for a few weeks there.

Let's say that I have a screen resolution of 800x600 and I want teh software to change that working area (not teh resolution) to 500x 600 so taht a part of teh screen is completely reserved for my applicationa nd the other programs think that the maximum tehy can open up to is 500x600 and therefore not overlap my application
0
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 500 total points
ID: 35416293
Ah! I now understand :)

You want to achieve what WinSplit sort of does :)

I have never tried it but here is one tool which I have used in the past which also follows the same principle. It's like a taskbar/sidebar which reserves place for itself. The code is in vb6 but I am sure can be changed to vb.net.

See this link.

Is this what you wanted?

Sid
0
 

Author Closing Comment

by:touyets17
ID: 35688131
That second link was exactly what I wanted!!!! thanks!. that was a hell of a difficult one i find ...
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now