Divide screen
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
6 posts
Page 1 of 1
Hello, i want to create a program where i can divide 1 screen into 4 smaller screens, but i have no idea where to start and how i could do it, can anyone give me some directions or anything to get me moving ?
create a boardless form. then put 4 panels and a buttons if you want.
you can add controls at runtime to make it more difficult to code, LOLzzz ;)
put this code below 'public class form1
in each button put this code. you can do it using drag option and create panels at runtime
===== hope this helps.=========
you can add controls at runtime to make it more difficult to code, LOLzzz ;)
put this code below 'public class form1
Code: Select all
Public Class Form1
Declare Auto Function SetParent Lib "user32.dll" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As Integer
Declare Auto Function SendMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Private Const WM_SYSCOMMAND As Integer = 274
Private Const SC_MAXIMIZE As Integer = 61488
Dim pro As Process
in each button put this code. you can do it using drag option and create panels at runtime
Code: Select all
====change the to pro=Process.Start("C:\WINDOWS\notepad.exe") if you want to open notepad in your panel inside formpro = Process.Start("winword")
pro.WaitForInputIdle()
SetParent(pro.MainWindowHandle, me.panel1.Handle)
SendMessage(pro.MainWindowHandle, WM_SYSCOMMAND, SC_MAXIMIZE, 0)
===== hope this helps.=========
#noypikami is this a way of creating child forms ?
unfortunatly this is not working as i want, it will open most programs in its own window
unfortunatly this is not working as i want, it will open most programs in its own window
it's not a child form.. it opens a program inside a form/ inside a panel. the code works in multiple programs and can be viewed inside a single form not on its own window..
noypikami wrote:it's not a child form.. it opens a program inside a form/ inside a panel. the code works in multiple programs and can be viewed inside a single form not on its own window..The only program that i could get to open inside the actual form was notepad
6 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023