Solved

Changing the workingarea using VB

Posted on 2011-02-24
12
365 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35148350
Definitely :)

Sid
0
 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
RLDC Reporting in Visual studio 11 44
Optimize the query 5 54
ModalPopup  question 22 39
vb.net datagrid scroll automatically to the first found row 11 28
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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