12 Replies - 952 Views - Last Post: 27 April 2012 - 12:47 AM Rate Topic: -----

#1 timotz  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 34
  • Joined: 01-April 12

splitting the screen using vb.net is it possible?

Posted 23 April 2012 - 09:35 PM

is it possible for the monitor's screen to be split into multiple panels using vb.net ? what i'm thinking about is I have two or three panels in the screen, the first panel is running a powerpoint presentaion, the other has an excel worksheet open and the other has a windows and fax viewer open something like that. is it possible to do this on a windows form application project?

i'm using windows xp sp3
pentium 4 3.00ghz
2.99 ghz 1.99g ram
Intel® 82915G/GV/910GL Express Chipset Family (this is the video card right?)
a plug and play 17 inch 1708 Dell monitor

i googled this and nothing seems to fit exactly with what i want.

please if you know a way to do this or at least something close to it, please do share it with me. thanks in advance :)

Is This A Good Question/Topic? 0
  • +

Replies To: splitting the screen using vb.net is it possible?

#2 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 960
  • View blog
  • Posts: 3,689
  • Joined: 02-July 08

Re: splitting the screen using vb.net is it possible?

Posted 23 April 2012 - 09:44 PM

You could make a form transparent with your panels placed easily in the designer and no form focus problems. If you set the form's TranparencyKey to a color that is not going to be used by a font or control then set the form's BackColor to that it make the form's client area transparent, I would use a formless border. That would be the simplest way.
Was This Post Helpful? 0
  • +
  • -

#3 timotz  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 34
  • Joined: 01-April 12

Re: splitting the screen using vb.net is it possible?

Posted 23 April 2012 - 10:13 PM

View Post_HAWK_, on 23 April 2012 - 09:44 PM, said:

You could make a form transparent with your panels placed easily in the designer and no form focus problems. If you set the form's TranparencyKey to a color that is not going to be used by a font or control then set the form's BackColor to that it make the form's client area transparent, I would use a formless border. That would be the simplest way.


that is a really cool trick! thanks always have been wondering how to do that. if i do this, i'm gonna need a way to put a running application to one panel's area. i tried adding a reference of MS Powerpoint 14 Object Library to my project and tried to see if I can add it as a toolbox item in visual studio but that didnt work (i thought it was possible since you can do that with Windows Media Player). anyone have any ideas or perhaps a tutorial on how to run a program inside a windows form application?
Was This Post Helpful? 0
  • +
  • -

#4 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 960
  • View blog
  • Posts: 3,689
  • Joined: 02-July 08

Re: splitting the screen using vb.net is it possible?

Posted 24 April 2012 - 01:20 PM

There are some API's for setting a program to dock inside of a panel - look into the SetParent API from PInvoke.com.
Was This Post Helpful? 2
  • +
  • -

#5 timotz  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 34
  • Joined: 01-April 12

Re: splitting the screen using vb.net is it possible?

Posted 24 April 2012 - 05:07 PM

thank you for your input sir! i will see what i can come up with
Was This Post Helpful? 0
  • +
  • -

#6 ricardosms  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 73
  • View blog
  • Posts: 297
  • Joined: 02-April 10

Re: splitting the screen using vb.net is it possible?

Posted 25 April 2012 - 04:51 AM

Are you looking for something similar to when you right click the taskbar and select stack windows or show windows side by side?

Attached Image


I don't know if this will be relevant to you, but check here:

http://msdn.microsof...4(v=vs.85).aspx

This post has been edited by ricardosms: 25 April 2012 - 06:45 AM

Was This Post Helpful? 1
  • +
  • -

#7 ricardosms  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 73
  • View blog
  • Posts: 297
  • Joined: 02-April 10

Re: splitting the screen using vb.net is it possible?

Posted 25 April 2012 - 03:51 PM

This is not a very good example, but check it

Public Class Form1
    Structure RECT
        Dim left As Long
        Dim Top As Long
        Dim right As Long
        Dim bottom As Long
    End Structure

    Private Declare Function TileWindows Lib "user32" (ByVal hwndParent As Integer, ByVal wHow As Integer, ByRef lpRect As RECT, ByVal cKids As Integer, ByRef lpKids As Integer) As Short
    Dim myrect As New RECT

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        myrect.Top = 5
        myrect.left = 5
        myrect.right = 100
        myrect.bottom = 100
    End Sub


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim sz As Short
        sz = TileWindows(0, 50, myrect, 1, 1)
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        myrect.Top = 5
        myrect.left = 5
        myrect.right = 100
        myrect.bottom = 100
    End Sub
End Class



It may help.
Was This Post Helpful? 0
  • +
  • -

#8 timotz  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 34
  • Joined: 01-April 12

Re: splitting the screen using vb.net is it possible?

Posted 25 April 2012 - 05:45 PM

thanks for the reply ricardosms. yes i want something that looks like that but running or embedded on a windows form. 1 big panel on one half and 3 panels sharing the other half.

something like this maybe. i'll try to study that page for a while and see what i can come up with. but if anyone can help expand on that topic, it would be greatly appreciated :)
Was This Post Helpful? 0
  • +
  • -

#9 timotz  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 34
  • Joined: 01-April 12

Re: splitting the screen using vb.net is it possible?

Posted 25 April 2012 - 06:25 PM

apparently i wasnt looking hard enough. i found this thread in the c# forum. it is exactly what i want to do. but my problem is that it can only embed win32 applications and .net framework applications just open in their own window and not in the form. if anyone has suggestions please do tell :D i'll be searching for a solution too
Was This Post Helpful? 0
  • +
  • -

#10 timotz  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 34
  • Joined: 01-April 12

Re: splitting the screen using vb.net is it possible?

Posted 25 April 2012 - 10:00 PM

lol i'm going nuts here i'm just playing minesweeper on the panel where i can load the win32 apps xD
Was This Post Helpful? 0
  • +
  • -

#11 timotz  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 34
  • Joined: 01-April 12

Re: splitting the screen using vb.net is it possible?

Posted 25 April 2012 - 11:58 PM

here is my output. still can only use win32 files. i really want to be able to open MS office and maybe browsers on the other ones. ended up using some api's.
Posted Image

This post has been edited by timotz: 26 April 2012 - 12:02 AM

Was This Post Helpful? 0
  • +
  • -

#12 ricardosms  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 73
  • View blog
  • Posts: 297
  • Joined: 02-April 10

Re: splitting the screen using vb.net is it possible?

Posted 26 April 2012 - 02:06 AM

That looks good, I will explore it myself.

I know that some other programs can be embedded if you have a control, like the webbrowser. I have done it with Acrobat before, I have to look for the code, I misplaced it.
Was This Post Helpful? 0
  • +
  • -

#13 timotz  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 34
  • Joined: 01-April 12

Re: splitting the screen using vb.net is it possible?

Posted 27 April 2012 - 12:47 AM

Solution to my problem :) just use webbrowser for office docs :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1