Can i clone my window

Just starting out? Need help? Post your questions and find answers here.
Bong-Mong
User
User
Posts: 35
Joined: Sat Jan 03, 2004 6:53 pm

Can i clone my window

Post by Bong-Mong »

1.Can i clone my window, and how would i go about it.

3xwindows, on window_2 there is a button to open window_1 again.

can i open the cloned window_1 and ifso will my file$ conflicked?

2.what do i read up on, i want to read up on audio qualizers* but i don't know where to start

3.Drag n Drop, can i tell drag n drop what files to drag. i.e .wav .mp3 only.
or how do i tell a listicongadget only to accept .wav .mp3

thanks for reading.
1.3AMD, 2x 256 sdr, 32 AGP
localmotion34
Enthusiast
Enthusiast
Posts: 665
Joined: Fri Sep 12, 2003 10:40 pm
Location: Tallahassee, Florida

Post by localmotion34 »

ok i am not 100% sure about this but here some code to show the example:

Code: Select all

; PureBasic Visual Designer v3.82 build 1344

Global window,button,frame
;- Window Constants
;
Enumeration
  #Window_0
EndEnumeration

;- Gadget Constants
;
Enumeration
  #Button_0
  #Frame3D_0
EndEnumeration

window=#Window_0   ;set our variable starting with the original values
button=#Button_0   ;
frame=#Frame3D_0   ;
Procedure Open_Window_0()
  Windowtext$="Window" +" " + Str(window+1)
  If OpenWindow(window, 216, 0, 600, 300,  #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar , Windowtext$)
    If CreateGadgetList(WindowID())
      ButtonGadget(button, 80, 100, 120, 40, "Clone Me!!!")
      Frame3DGadget(frame, 30, 60, 230, 140, "Button")
      
    EndIf
  EndIf
  window=window+1 ;now we add 1 to the values we set before so we dont reuse them
  button=button+2 ; we make sure we step 1 above the follwing frame gadget value
  frame=frame+2   ;
 
EndProcedure

Open_Window_0()

Repeat
  
  Event = WaitWindowEvent()
  
  If Event = #PB_EventGadget
    
    ;Debug "WindowID: " + Str(EventWindowID())
    
    GadgetID = EventGadgetID()
    
    For a=0 To button Step 2 ;since #button_0 = 0 at the beginning, we have to step 2 values above because
      If GadgetID=a         ;frame3d_0 is always button+1
          Open_Window_0()
        EndIf 
      Next 

    
  EndIf
  
Until Event = #PB_EventCloseWindow

End
hope this helps at least some

Code: Select all

!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
Post Reply