?
Solved

Changing the workingarea using VB

Posted on 2011-02-24
12
Medium Priority
?
376 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
9 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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…
Integration Management Part 2
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

809 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