Gadgets and depending DLL's

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by cor.

What versions of the Windows 95-98 DLL's are needed to work correctly with all the gadgets.

I have a program which works great with PanelGadget and Trackbar on a win98 system, but used on a win95 system it's not working correctly.

Create a Panelgadget with 2 panels:
On one panel place a trackbar gadget.

Now change from the trackbar gadget to other panel and back
Now the trackbar is gone.

The strange thing is:
checked with code below and it works fine

With my complete source 1400 lines.

This problem arrives only with win 95 system

Code: Select all

#WindowWidth  = 390
#WindowHeight = 350

If OpenWindow(0, 100, 120, #WindowWidth, #WindowHeight, #PB_Window_MinimizeGadget, "PureBasic - Gadget Demonstration")

 If CreateGadgetList(WindowID())
    
    Top = 10
    GadgetHeight = 24


    PanelGadget(3, 20, Top, #WindowWidth-50, #WindowHeight-Top-60)
    AddgadgetItem(3,0,"Tab1")
    TrackBarGadget(4, 10, 10, 150, 50, 0, 100) 
    AddgadgetItem(3,1,"Tab2")
    AddgadgetItem(3,2,"Tab3")
    
    ClosePanelGadget()

  EndIf
  
  

  Repeat
    EventID = WaitWindowEvent()
    
    If EventID = #PB_EventGadget

      Select EventGadgetID()
        Case 0
          If EventType() = #PB_EventType_ReturnKey
            MessageRequester("Info", "Return key pressed", 0)
          EndIf
        
      EndSelect

    EndIf

  Until EventID = #PB_EventCloseWindow

EndIf

End
 
Using Windows 98 SE
Registered PB version : 3.2 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> I have a program which works great with PanelGadget and Trackbar on a win98
> system, but used on a win95 system it's not working correctly.

Your example also fails on Win 2000. The problem is a known PanelGadget bug,
and a fix is planned. In the meantime, you can do what I do, which is to make
the window invisible during creation by adding #WS_VISIBLE to the flags, like
so...

#PB_Window_MinimizeGadget becomes #PB_Window_MinimizeGadget|#WS_VISIBLE

...and then calling the ShowWindow API before your main loop, like so:

ShowWindow_(WindowID(),#SW_SHOW) ; Goes before Repeat : EventID = WaitWindowEvent()...

The PanelGadget will then be created properly.

PB - Registered PureBasic Coder

Edited by - PB on 24 July 2002 21:44:17
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Better use the integrated:

#PB_Window_Invisible

flag with the HideWindow() command...

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by cor.

Thanks to you both PB and Fred,

I will try it the next day.

I'll let you know if it works
Better use the integrated:

#PB_Window_Invisible

flag with the HideWindow() command...

Fred - AlphaSND
Using Windows 98 SE
Registered PB version : 3.2 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by cor.

BTW.

I downloaded at the update url PanelGadgetExtension ( 24-07 )

It seems that the combobox problem is solved.
It even works when pressing ESC if you do want to change anything.

Does this also solve the PanelGadget problem?

Using Windows 98 SE
Registered PB version : 3.2 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

> Better use the integrated #PB_Window_Invisible flag with the HideWindow() command...

Oops, I forgot that the HideWindow command was added in v3.10... sorry!


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by cor.

When compiled under win98 and running under win95
Panelgadget and trackbar ok

When compiled under win95, same problem as before, with al the latest updates

Cor

Thanks to you both PB and Fred,

I will try it the next day.

I'll let you know if it works
Better use the integrated:

#PB_Window_Invisible

flag with the HideWindow() command...

Fred - AlphaSND
Using Windows 98 SE
Registered PB version : 3.2 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com
Using Windows 98 SE
Registered PB version : 3.2 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com
Post Reply