Drawing a sprite onto a window

Just starting out? Need help? Post your questions and find answers here.
Toris
User
User
Posts: 16
Joined: Mon May 05, 2003 6:59 pm

Drawing a sprite onto a window

Post by Toris »

Hi,

I'm currently trying to work out how to load a sprite, resize a window to the size of it, create a screen the size of the window, then draw the sprite.
The code I am using to do this, is:

Code: Select all

LoadImage(#LevelImage, GetGadgetText(#LevelImageFilename))
UseWindow(#PreviewWindow)
UseImage(#LevelImage)
ResizeWindow(ImageWidth()+20, ImageHeight()+20)
OpenWindowedScreen(WindowID(#PreviewWindow), 10, 10, ImageWidth(), ImageHeight(), 0, 0, 0)     
LoadSprite(#BackgroundSprite, GetGadgetText(#BackdropImageFilename), 0)
LoadSprite(#LevelSprite, GetGadgetText(#LevelImageFilename), 0)
DisplaySprite(#BackgroundSprite, 0, 0)
TransparentSpriteColor(#LevelSprite, 255, 0, 255)
DisplayTransparentSprite(#LevelSprite, 0, 0)
This code throws up the error "There is no current screen", on "LoadSprite(#BackgroundSprite, GetGadgetText(#BackdropImageFilename), 0)"

I know it's something simple, I just can't work it out.

Also, what is the best way to rotate an image 90 degrees clockwise, just create another sprite, then read from one sprite, and write onto the new one?

Thanks,
-Toris
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post by Pupil »

You need to open a screen before loading the sprites.
Toris
User
User
Posts: 16
Joined: Mon May 05, 2003 6:59 pm

Post by Toris »

Is that not what OpenWindowedScreen does?
Do you *have* to open a full-screen screen?
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post by Pupil »

Toris wrote:Is that not what OpenWindowedScreen does?
Do you *have* to open a full-screen screen?
Sorry, my head isn't put on straight today ;) -no the OpenWindowedScreen() should do just fine. What you should do is to test if opening of the windowedscreen() succeeded(just good coding practice). As i understand your code is part of a bigger project and i can't see any faults in this part of the code. Try to run your program with debugger turned off and see if it works?
Toris
User
User
Posts: 16
Joined: Mon May 05, 2003 6:59 pm

Post by Toris »

Thanks for your help :)

Still not working though, I turned off the debugger, and the program crashed.

I added a check:

Code: Select all

    If EventGadgetID() = #LoadImagesButton
      LoadImage(#LevelImage, GetGadgetText(#LevelImageFilename))
      UseWindow(#PreviewWindow)
      UseImage(#LevelImage)
      ResizeWindow(ImageWidth()+20, ImageHeight()+20)
      If OpenWindowedScreen(WindowID(#PreviewWindow), 10, 10, ImageWidth(), ImageHeight(), 0, 0, 0)     
        LoadSprite(#BackgroundSprite, GetGadgetText(#BackdropImageFilename), 0)
        LoadSprite(#LevelSprite, GetGadgetText(#LevelImageFilename), 0)
        DisplaySprite(#BackgroundSprite, 0, 0)
        TransparentSpriteColor(#LevelSprite, 255, 0, 255)
        DisplayTransparentSprite(#LevelSprite, 0, 0)
      EndIf
    EndIf
It's now not bringing up the debugger, the "#PreviewWindow" is now closing though, so, there must be some problem opening the window is there any preperation that needs to be done before opening a screen on a window?

[EDIT]
The window is already created by the way:

Code: Select all

Procedure Open_PreviewWindow()
  If OpenWindow(#PreviewWindow, 228, 136, 340, 260,  #PB_Window_TitleBar , "Preview Window")
  Else
    End
  EndIf
EndProcedure

; Init code
Open_PreviewWindow() ; Create preview window
[/EDIT]
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post by Pupil »

Toris wrote:... is there any preperation that needs to be done before opening a screen on a window?
You have to call the InitSprite() but i reckon you've already done that or you would get this debugg message instead "InitSprite() must be called before use the 'Sprite' commands."

Sorry, i'm out of ideas, i would have to have a snippet of your code that can be compiled so that i could see what happends..
Toris
User
User
Posts: 16
Joined: Mon May 05, 2003 6:59 pm

Post by Toris »

Hello again, here is the whole of my source file, the files testlvl and testback, are 320x240 bitmaps, but they will range from any size from 320x240 to 640x480.

Thanks...

Code: Select all

;- Window Constants
;
#GlooPWindow = 0
#PreviewWindow = 1

;- Gadget Constants
;
#MainTabPanel = 0
#TopImagePanel = 1
#SpawnersDropDown = 2
#SpawnLabel1 = 3
#SpawnX = 4
#SpawnY = 5
#SpawnCreate = 6
#SpawnAmount = 7
#SpawnLabel2 = 8
#SpawnLabel3 = 9
#SpawnLabel4 = 10
#SpawnLabel5 = 11
#SpawnEvilGood = 12
#ExitDropDown = 13
#ExitLabel1 = 14
#ExitX = 15
#ExitY = 16
#ExitSave = 17
#ExitLabel2 = 18
#ExitLabel3 = 19
#ItemDropDown = 20
#temILabel1 = 21
#ItemQuantity = 22
#ItemLabel2 = 23
#SpawnLabel6 = 24
#SpawnerEnabled = 25
#ExitLabel4 = 26
#ExitEnabled = 27
#ItemLabel3 = 28
#ItemEnabled = 29
#ItemType = 30
#ImagesLabel1 = 31
#SpawnX = 32
#SpawnY = 33
#SpawnCreate = 34
#SpawnAmount = 35
#ImagesLabel2 = 36
#ImagesLabel3 = 37
#ImagesLabel5 = 38
#Gadget_78 = 39
#ExitSaveTotal = 40
#ExitLabel5 = 41
#OptionsLabel1 = 42
#LevelTime = 43
#DrawAmount = 44
#OptionsLabel2 = 45
#CreateLabel1 = 46
#LevelTime = 47
#DrawAmount = 48
#CreateLabel2 = 49
#CreateLevelButton = 50
#LevelImageFilename = 51
#BackdropImageFilename = 52
#LoadImagesButton = 53

;- Sprite Constants
;
#BackgroundSprite = 0
#LevelSprite = 1
#ExitSprite = 2
#SpawnerSprite = 3

;- Image Constants
;
#LevelImage = 0

;- StatusBar Constants
;
#StatusBar_0 = 0


;- Image Plugins

;- Image Globals
Global Image0

;- Catch Images
Image0 = CatchImage(0, ?Image0)

;- Images
DataSection
Image0:
  IncludeBinary "C:\devkitadv\projects\deluxe-gloop\tools source\level creator\images\levedtitle.bmp"
EndDataSection

Procedure Open_GlooPWindow()
  If OpenWindow(#GlooPWindow, 420, 229, 600, 381,  #PB_Window_SystemMenu | #PB_Window_TitleBar , "GlooP Deluxe - Level Creator")
    If CreateStatusBar(#StatusBar_0, WindowID())
    EndIf
    
    If CreateGadgetList(WindowID())
      ImageGadget(#TopImagePanel, 0, 0, 600, 70, Image0, #PB_Image_Border)
      
      ;- Panel2000
      PanelGadget(#MainTabPanel, 0, 80, 600, 280)
      AddGadgetItem(#MainTabPanel, -1, "Images")
      TextGadget(#ImagesLabel1, 8, 8, 140, 20, "Level Image Filename:")
      TextGadget(#ImagesLabel2, 8, 38, 140, 20, "Backdrop Image Filename:")
      StringGadget(#LevelImageFilename, 158, 8, 240, 20, "testlvl.bmp")
      StringGadget(#BackdropImageFilename, 158, 38, 240, 20, "testback.bmp")
      ButtonGadget(#LoadImagesButton, 8, 68, 360, 20, "Load Level and Backdrop Images for Preview")
      AddGadgetItem(#MainTabPanel, -1, "Gloop Spawners")
      ComboBoxGadget(#SpawnersDropDown, 8, 8, 360, 20)
      TextGadget(#SpawnLabel1, 8, 38, 110, 20, "X Position:")
      StringGadget(#SpawnX, 128, 38, 240, 20, "", #PB_String_Numeric)
      StringGadget(#SpawnY, 128, 68, 240, 20, "", #PB_String_Numeric)
      StringGadget(#SpawnCreate, 128, 98, 240, 20, "", #PB_String_Numeric)
      StringGadget(#SpawnAmount, 128, 158, 240, 20, "", #PB_String_Numeric)
      TextGadget(#SpawnLabel2, 8, 68, 110, 20, "Y Position:")
      TextGadget(#SpawnLabel3, 8, 98, 110, 20, "To Create Per Frame:")
      TextGadget(#SpawnLabel4, 8, 128, 110, 20, "Type of GlooP:")
      TextGadget(#SpawnLabel5, 8, 158, 110, 20, "Amount to Create:")
      ComboBoxGadget(#SpawnEvilGood, 128, 128, 240, 20)
      TextGadget(#SpawnLabel6, 8, 188, 110, 20, "Spawner Enabled:")
      CheckBoxGadget(#SpawnerEnabled, 128, 188, 30, 20, "")
      AddGadgetItem(#MainTabPanel, -1, "Exits")
      ComboBoxGadget(#ExitDropDown, 8, 8, 360, 20)
      TextGadget(#ExitLabel1, 8, 38, 110, 20, "X Position:")
      StringGadget(#ExitX, 128, 38, 240, 20, "", #PB_String_Numeric)
      StringGadget(#ExitY, 128, 68, 240, 20, "", #PB_String_Numeric)
      StringGadget(#ExitSave, 128, 98, 240, 20, "", #PB_String_Numeric)
      TextGadget(#ExitLabel2, 8, 68, 110, 20, "Y Position:")
      TextGadget(#ExitLabel3, 8, 98, 110, 20, "GlooP To Save [Exit]:")
      TextGadget(#ExitLabel4, 8, 128, 110, 20, "Exit Enabled:")
      CheckBoxGadget(#ExitEnabled, 128, 128, 30, 20, "")
      TextGadget(#Gadget_78, 8, 158, 580, 20, "_________________________________________________________________________________________________")
      StringGadget(#ExitSaveTotal, 128, 188, 240, 20, "", #PB_String_Numeric)
      TextGadget(#ExitLabel5, 8, 188, 110, 20, "Total GlooP To Save:")
      AddGadgetItem(#MainTabPanel, -1, "Items")
      ComboBoxGadget(#ItemDropDown, 8, 8, 360, 20)
      TextGadget(#temILabel1, 8, 38, 110, 20, "Item Type:")
      StringGadget(#ItemQuantity, 128, 68, 240, 20, "", #PB_String_Numeric)
      TextGadget(#ItemLabel2, 8, 68, 110, 20, "Item Quantity:")
      TextGadget(#ItemLabel3, 8, 98, 110, 20, "Item Enabled:")
      CheckBoxGadget(#ItemEnabled, 128, 98, 30, 20, "")
      ComboBoxGadget(#ItemType, 128, 38, 240, 20)
      AddGadgetItem(#MainTabPanel, -1, "Options")
      TextGadget(#OptionsLabel1, 8, 8, 110, 20, "Level Time:")
      StringGadget(#LevelTime, 128, 8, 240, 20, "", #PB_String_Numeric)
      StringGadget(#DrawAmount, 128, 38, 240, 20, "", #PB_String_Numeric)
      TextGadget(#OptionsLabel2, 8, 38, 110, 20, "Draw Amount:")
      AddGadgetItem(#MainTabPanel, -1, "Create")
      TextGadget(#CreateLabel1, 8, 8, 110, 20, "Level Description:")
      StringGadget(#LevelTime, 128, 8, 240, 20, "", #PB_String_Numeric)
      StringGadget(#DrawAmount, 128, 38, 240, 20, "", #PB_String_Numeric)
      TextGadget(#CreateLabel2, 8, 38, 110, 20, "Save Level As:")
      ButtonGadget(#CreateLevelButton, 8, 68, 360, 20, "----- Create Level -----")
      ClosePanelGadget()
      
    EndIf
  EndIf
EndProcedure

Procedure Open_PreviewWindow()
  If OpenWindow(#PreviewWindow, 228, 136, 340, 260,  #PB_Window_TitleBar , "Preview Window")
  Else
    End
  EndIf
EndProcedure

; Init arrays
Dim ImageArray.l (640, 480)

; Init code
Open_PreviewWindow() ; Create preview window
Open_GlooPWindow() ; Create gloop window

; Enable all the image decoders
UseJPEGImageDecoder()
UsePNGImageDecoder()
UseTIFFImageDecoder()
UseTGAImageDecoder()

; Inits the sprite system
InitSprite()

Repeat
  
    ; Wait until we recieve an event
    EventID = WaitWindowEvent()
    
    ; If the load images button was pressed
    If EventGadgetID() = #LoadImagesButton
      LoadImage(#LevelImage, GetGadgetText(#LevelImageFilename))
      UseWindow(#PreviewWindow)
      UseImage(#LevelImage)
      ResizeWindow(ImageWidth(), ImageHeight())
      If OpenWindowedScreen(WindowID(#PreviewWindow), 10, 10, ImageWidth(), ImageHeight(), 0, 0, 0)     
        LoadSprite(#BackgroundSprite, GetGadgetText(#BackdropImageFilename), 0)
        LoadSprite(#LevelSprite, GetGadgetText(#LevelImageFilename), 0)
        DisplaySprite(#BackgroundSprite, 0, 0)
        TransparentSpriteColor(#LevelSprite, 255, 0, 255)
        DisplayTransparentSprite(#LevelSprite, 0, 0)
      EndIf
    EndIf
    
    ; If the create level button was pressed
    If EventGadgetID() = #CreateLevelButton
    
    EndIf
    
    ; If the main window has been closed, exit   
    If EventID = #PB_EventCloseWindow
      If EventWindowID() = #GlooPWindow
        End
      EndIf
    EndIf
    
ForEver
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post by Pupil »

Ok, i've taken a look and have some questions for you... Which version are you using, demo or full, if you're using the full version you're not using the latest because your code contains a now obselete command i.e. ClosePanelGadget()...

I've managed to put together some code that should work for you, you need the latest version of PB though, or you can maybe just replace CloseGadgetList() with ClosePanelGadget()...

Code: Select all

;- Window Constants
;
#GlooPWindow = 0
#PreviewWindow = 1

;- Gadget Constants
;
#MainTabPanel = 0
#TopImagePanel = 1
#SpawnersDropDown = 2
#SpawnLabel1 = 3
#SpawnX = 4
#SpawnY = 5
#SpawnCreate = 6
#SpawnAmount = 7
#SpawnLabel2 = 8
#SpawnLabel3 = 9
#SpawnLabel4 = 10
#SpawnLabel5 = 11
#SpawnEvilGood = 12
#ExitDropDown = 13
#ExitLabel1 = 14
#ExitX = 15
#ExitY = 16
#ExitSave = 17
#ExitLabel2 = 18
#ExitLabel3 = 19
#ItemDropDown = 20
#temILabel1 = 21
#ItemQuantity = 22
#ItemLabel2 = 23
#SpawnLabel6 = 24
#SpawnerEnabled = 25
#ExitLabel4 = 26
#ExitEnabled = 27
#ItemLabel3 = 28
#ItemEnabled = 29
#ItemType = 30
#ImagesLabel1 = 31
#SpawnX = 32
#SpawnY = 33
#SpawnCreate = 34
#SpawnAmount = 35
#ImagesLabel2 = 36
#ImagesLabel3 = 37
#ImagesLabel5 = 38
#Gadget_78 = 39
#ExitSaveTotal = 40
#ExitLabel5 = 41
#OptionsLabel1 = 42
#LevelTime = 43
#DrawAmount = 44
#OptionsLabel2 = 45
#CreateLabel1 = 46
#LevelTime = 47
#DrawAmount = 48
#CreateLabel2 = 49
#CreateLevelButton = 50
#LevelImageFilename = 51
#BackdropImageFilename = 52
#LoadImagesButton = 53

;- Sprite Constants
;
#BackgroundSprite = 0
#LevelSprite = 1
#ExitSprite = 2
#SpawnerSprite = 3

;- Image Constants
;
#LevelImage = 1

;- StatusBar Constants
;
#StatusBar_0 = 0


;- Image Plugins

;- Image Globals
Global Image0

;- Catch Images
Image0 = CatchImage(0, ?Image0)

;- Images
DataSection
Image0:
  IncludeBinary "C:\devkitadv\projects\deluxe-gloop\tools source\level creator\images\levedtitle.bmp"
EndDataSection

Procedure Open_GlooPWindow()
  If OpenWindow(#GlooPWindow, 420, 229, 600, 381,  #PB_Window_SystemMenu | #PB_Window_TitleBar , "GlooP Deluxe - Level Creator")
    If CreateStatusBar(#StatusBar_0, WindowID())
    EndIf
   
    If CreateGadgetList(WindowID())
      ImageGadget(#TopImagePanel, 0, 0, 600, 70, Image0, #PB_Image_Border)
     
      ;- Panel2000
      PanelGadget(#MainTabPanel, 0, 80, 600, 280)
      AddGadgetItem(#MainTabPanel, -1, "Images")
      TextGadget(#ImagesLabel1, 8, 8, 140, 20, "Level Image Filename:")
      TextGadget(#ImagesLabel2, 8, 38, 140, 20, "Backdrop Image Filename:")
      StringGadget(#LevelImageFilename, 158, 8, 240, 20, "testlvl.bmp")
      StringGadget(#BackdropImageFilename, 158, 38, 240, 20, "testback.bmp")
      ButtonGadget(#LoadImagesButton, 8, 68, 360, 20, "Load Level and Backdrop Images for Preview")
      AddGadgetItem(#MainTabPanel, -1, "Gloop Spawners")
      ComboBoxGadget(#SpawnersDropDown, 8, 8, 360, 20)
      TextGadget(#SpawnLabel1, 8, 38, 110, 20, "X Position:")
      StringGadget(#SpawnX, 128, 38, 240, 20, "", #PB_String_Numeric)
      StringGadget(#SpawnY, 128, 68, 240, 20, "", #PB_String_Numeric)
      StringGadget(#SpawnCreate, 128, 98, 240, 20, "", #PB_String_Numeric)
      StringGadget(#SpawnAmount, 128, 158, 240, 20, "", #PB_String_Numeric)
      TextGadget(#SpawnLabel2, 8, 68, 110, 20, "Y Position:")
      TextGadget(#SpawnLabel3, 8, 98, 110, 20, "To Create Per Frame:")
      TextGadget(#SpawnLabel4, 8, 128, 110, 20, "Type of GlooP:")
      TextGadget(#SpawnLabel5, 8, 158, 110, 20, "Amount to Create:")
      ComboBoxGadget(#SpawnEvilGood, 128, 128, 240, 20)
      TextGadget(#SpawnLabel6, 8, 188, 110, 20, "Spawner Enabled:")
      CheckBoxGadget(#SpawnerEnabled, 128, 188, 30, 20, "")
      AddGadgetItem(#MainTabPanel, -1, "Exits")
      ComboBoxGadget(#ExitDropDown, 8, 8, 360, 20)
      TextGadget(#ExitLabel1, 8, 38, 110, 20, "X Position:")
      StringGadget(#ExitX, 128, 38, 240, 20, "", #PB_String_Numeric)
      StringGadget(#ExitY, 128, 68, 240, 20, "", #PB_String_Numeric)
      StringGadget(#ExitSave, 128, 98, 240, 20, "", #PB_String_Numeric)
      TextGadget(#ExitLabel2, 8, 68, 110, 20, "Y Position:")
      TextGadget(#ExitLabel3, 8, 98, 110, 20, "GlooP To Save [Exit]:")
      TextGadget(#ExitLabel4, 8, 128, 110, 20, "Exit Enabled:")
      CheckBoxGadget(#ExitEnabled, 128, 128, 30, 20, "")
      TextGadget(#Gadget_78, 8, 158, 580, 20, "_________________________________________________________________________________________________")
      StringGadget(#ExitSaveTotal, 128, 188, 240, 20, "", #PB_String_Numeric)
      TextGadget(#ExitLabel5, 8, 188, 110, 20, "Total GlooP To Save:")
      AddGadgetItem(#MainTabPanel, -1, "Items")
      ComboBoxGadget(#ItemDropDown, 8, 8, 360, 20)
      TextGadget(#temILabel1, 8, 38, 110, 20, "Item Type:")
      StringGadget(#ItemQuantity, 128, 68, 240, 20, "", #PB_String_Numeric)
      TextGadget(#ItemLabel2, 8, 68, 110, 20, "Item Quantity:")
      TextGadget(#ItemLabel3, 8, 98, 110, 20, "Item Enabled:")
      CheckBoxGadget(#ItemEnabled, 128, 98, 30, 20, "")
      ComboBoxGadget(#ItemType, 128, 38, 240, 20)
      AddGadgetItem(#MainTabPanel, -1, "Options")
      TextGadget(#OptionsLabel1, 8, 8, 110, 20, "Level Time:")
      StringGadget(#LevelTime, 128, 8, 240, 20, "", #PB_String_Numeric)
      StringGadget(#DrawAmount, 128, 38, 240, 20, "", #PB_String_Numeric)
      TextGadget(#OptionsLabel2, 8, 38, 110, 20, "Draw Amount:")
      AddGadgetItem(#MainTabPanel, -1, "Create")
      TextGadget(#CreateLabel1, 8, 8, 110, 20, "Level Description:")
      StringGadget(#LevelTime, 128, 8, 240, 20, "", #PB_String_Numeric)
      StringGadget(#DrawAmount, 128, 38, 240, 20, "", #PB_String_Numeric)
      TextGadget(#CreateLabel2, 8, 38, 110, 20, "Save Level As:")
      ButtonGadget(#CreateLevelButton, 8, 68, 360, 20, "----- Create Level -----")
      CloseGadgetList()
     
    EndIf
  EndIf
EndProcedure

Procedure MyWindowCallback(WindowID, Message, wParam, lParam)
Shared hPreviewWin, PreviewBack, PreviewLevel
  Result = #PB_ProcessPureBasicEvents
  If WindowID = hPreviewWin
    If Message = #WM_PAINT
      If PreviewBack And PreviewLevel
        DisplaySprite(#BackgroundSprite, 0, 0)
        TransparentSpriteColor(#LevelSprite, 255, 0, 255)
        DisplayTransparentSprite(#LevelSprite, 0, 0)
      EndIf
      FlipBuffers()
    EndIf
  EndIf
  ProcedureReturn Result 
EndProcedure 


Procedure Open_PreviewWindow(x, y, width, height)
Shared hPreviewWin
  If OpenWindow(#PreviewWindow, x, y, width, height,  #PB_Window_TitleBar , "Preview Window")
    hPreviewWin = WindowID(#PreviewWindow)
    If OpenWindowedScreen(WindowID(#PreviewWindow), 0, 0, width, height, 0, 0, 0) = 0
      Debug "Failed to open screen"
    EndIf
    SetWindowCallback(@MyWindowCallback())
  Else
    hPreviewWin = 0
    End
  EndIf
EndProcedure

; Init arrays
Dim ImageArray.l (640, 480)

; Init code
If InitSprite() = 0 ; Inits the sprite system
  Debug "Failed to init DirectX"
  End
EndIf
Open_PreviewWindow(228, 136, 200, 100) ; Create preview window
Open_GlooPWindow() ; Create gloop window

; Enable all the image decoders
UseJPEGImageDecoder()
UsePNGImageDecoder()
UseTIFFImageDecoder()
UseTGAImageDecoder()

Repeat
 
  ; Wait until we recieve an event
  EventID = WaitWindowEvent()
  
  If EventID = #PB_Event_Gadget
    Select EventGadgetID()
      Case #LoadImagesButton
        LoadImage(#LevelImage, GetGadgetText(#LevelImageFilename))
        UseImage(#LevelImage)
        hPreviewWin = 0
        CloseScreen()
        CloseWindow(#PreviewWindow)
        Open_PreviewWindow(228, 136, ImageWidth(), ImageHeight())
        UseWindow(#GlooPWindow)

        If LoadSprite(#BackgroundSprite, GetGadgetText(#BackdropImageFilename), 0) = 0
          PreviewBack = #FALSE
        Else
          PreviewBack = #TRUE
        EndIf
        If LoadSprite(#LevelSprite, GetGadgetText(#LevelImageFilename), 0) = 0
          PreviewLevel = #FALSE
        Else
          PreviewLevel = #TRUE
        EndIf
    EndSelect
  ElseIf EventID = #PB_Event_CloseWindow
    End
  EndIf
ForEver 
Toris
User
User
Posts: 16
Joined: Mon May 05, 2003 6:59 pm

Post by Toris »

I was using v3.62, but I've just downloaded the update, and upgraded to v3.72.

I've tried your source code, and it works exactly how I want it to.

I shall take a look through it, and try and understand the alterations you have made.

Many thanks!
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post by Pupil »

Toris wrote: I've tried your source code, and it works exactly how I want it to.
Good that was what i was aiming for ;)
Toris wrote: I shall take a look through it, and try and understand the alterations you have made.
Good luck with that :)
Post Reply