Hello everyone, I want to insert a button in one of the 2 forms inside the MDI window, but the button is placed in the MDI window, and not in "MDI1" or "MDI2"
This is the original code
#include once "window9.bi"
OpenWindow ("", 10,10,400,400)
ClientMDIGadget (MenuTitle (Create_Menu (), "MDI"), 100)
WindowColor (MDIGadget ("MDI1", 10,10,200,200), & h6405A3)
WindowColor (MDIGadget ("MDI2", 100,10,200,200), & h498721)
Do
var event = WaitEvent ()
If event = EventClose Then exit do
Loop
I want to insert a button in the window "MDI1"
Thank you
Insert button in MDI.bas example in libwindow9 library
Re: Insert button in MDI.bas example in libwindow9 library
Example from help:I want to insert a button in the window "MDI1"
Code: Select all
#Include "window9.bi"
Dim As HWND mdi1,mdi2,clientmdi
Dim As HMENU hMessages,MenName
Dim As Integer event
OpenWindow("",10,10,400,400)
hMessages=Create_Menu()
MenName=MenuTitle(hMessages,"MDI")
clientmdi=ClientMDIGadget(0,0)
mdi1=MDIGadget("MDI1",10,10,200,200):WindowColor(mdi1,&h6405A3)
UseGadgetList(mdi1)
ButtonGadget(1,10,10,100,30,"Button")
UseGadgetList(clientmdi)
mdi2=MDIGadget("MDI2",100,10,200,200):WindowColor(mdi2,&h498721)
Do
event=WaitEvent
If event=EventClose Then
If EventHwnd=mdi1 Then
Close_Window(mdi1)
ElseIf EventHwnd=mdi2 Then
Close_Window(mdi2)
Else
end
EndIf
EndIf
If event=eventgadget Then
If EventNumber=1 Then
end
EndIf
EndIf
Loop
Re: Insert button in MDI.bas example in libwindow9 library
Thank you VANYA
I could already fix it.
A question.
In most examples of Window9, when a window is passed over the windows of Window9, they get scratched, and they do not repaint well, if you want I send you a photo.
Do you know why that is ???
Greetings.
I could already fix it.
A question.
In most examples of Window9, when a window is passed over the windows of Window9, they get scratched, and they do not repaint well, if you want I send you a photo.
Do you know why that is ???
Greetings.
Re: Insert button in MDI.bas example in libwindow9 library
I hope you did not run the examples on a virtual system. (virtualbox , vmware ,...) ? Although I never had any problems even in a virtual systemTolo68 wrote:Thank you VANYA
I could already fix it.
A question.
In most examples of Window9, when a window is passed over the windows of Window9, they get scratched, and they do not repaint well, if you want I send you a photo.
Do you know why that is ???
Greetings.
Photography won't help. Please record the whole process on video (including the source code itself, compiling and running it). There are many programs for recording screen video.