Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Design your GUI Sample
#11
I guess your right, I didn't try that big one that had everything on it, I only tried the ones that wouldn't work before. I just thought it was fixed, sorry.

It seems that the MakeFont routine isn't working in xp now with ver13. It's now doing gpf in XP.

To top that, my memory stick thing went out on me, to the store I go.


qbos:

I read everything I could find on Progress bar Control, and most of it didn't make sense at the start. I came up with this one to start out with, and I think I'll probably use it for a Sample. Maybe in a sub menu let it change colors to the background and bar.



Code:
FUNCTION ProcessWindow (BYVAL hDlg AS Uinteger, BYVAL wMsg AS Uinteger, BYVAL wParam _
                  AS Uinteger, BYVAL lParam AS LONG, BYVAL hInstance AS LONG) AS LONG
      dim hCtrl as long
      dim wmid as long, wmEvent as long
      Static advance As long
      InitCommonControls
      
   If wMsg = WM_CREATE then
                  
       hCtrl = CreateWindowEx(WS_EX_CLIENTEDGE, "msctls_progress32", "", _
           WS_CHILD OR WS_VISIBLE OR WS_CLIPSIBLINGS Or CCS_BOTTOM, _
                 50,  50,  100,  30, _  
                 hdlg,  101, 0, BYVAL NULL)
       SendMessage hctrl, PBM_SETBKCOLOR, 0, &HB8E989' clrbk changes background color          
    
       hCtrl = CreateWindowEx (0, "button", "Start", _
           WS_CHILD OR WS_VISIBLE OR BS_Pushbutton , _
                 0,  50,  50,  30, _  
                 hdlg,  102, 0, BYVAL NULL)

   ELSEIF wMsg = WM_COMMAND THEN       ' Messages sent for Command Items
      wmID = wParam and &hFFFF         'Control ID  
      wmEvent = wParam shr 16          'Window Event  
  
      IF wmEvent = BN_CLICKED THEN        ' Intercept a Mouse click
         IF wmID =  102 THEN         ' If start Button is clicked
             hCtrl = GetDlgItem(hDlg,  101) 'get handle for bar
             SendMessage hctrl, PBM_SETBARCOLOR, 0, &H400080' change bar color
             Sendmessage hCtrl, TBM_SETRANGE, 0, 100
             for advance = 1 to 100
                Sendmessage hCtrl, pbm_setpos, advance, 0
                SLEEP 50
             next  
             PostQuitMessage 0  ' shutdown after progress bar is done
        END IF
     END IF
   ELSEIF wMsg = WM_CLOSE  THEN   ' Message from Clicking on system close Icon
       PostQuitMessage 0
   END IF
   ProcessWindow = DefWindowProc(hdlg, wMsg, wParam, lParam)
  
END FUNCTION



Later...........Jerry Fielden
Reply


Messages In This Thread
Design your GUI Sample - by fielden - 03-28-2005, 07:19 AM
Design your GUI Sample - by na_th_an - 03-28-2005, 12:28 PM
Design your GUI Sample - by gbos - 03-28-2005, 04:51 PM
Design your GUI Sample - by fielden - 03-28-2005, 08:19 PM
Design your GUI Sample - by TheBigBasicQ - 03-28-2005, 08:24 PM
Design your GUI Sample - by fielden - 03-28-2005, 09:52 PM
Design your GUI Sample - by adosorken - 03-29-2005, 04:35 AM
Design your GUI Sample - by fielden - 03-31-2005, 06:19 AM
Design your GUI Sample - by zydon - 03-31-2005, 02:43 PM
Design your GUI Sample - by retsyo - 03-31-2005, 06:22 PM
Design your GUI Sample - by fielden - 04-01-2005, 04:40 AM
Design your GUI Sample - by fielden - 04-03-2005, 12:08 PM
Design your GUI Sample - by zydon - 04-04-2005, 06:50 AM
Design your GUI Sample - by fielden - 04-04-2005, 08:43 AM
Design your GUI Sample - by fielden - 04-06-2005, 08:42 PM
Design your GUI Sample - by fielden - 04-09-2005, 02:44 AM
Design your GUI Sample - by fielden - 04-11-2005, 06:39 PM
Design your GUI Sample - by fielden - 05-15-2005, 05:22 PM
Design your GUI Sample - by anarky - 05-18-2005, 09:18 PM
Design your GUI Sample - by fielden - 05-19-2005, 12:26 AM
Design your GUI Sample - by anarky - 05-19-2005, 08:38 PM
Design your GUI Sample - by fielden - 05-19-2005, 11:36 PM
Design your GUI Sample - by fielden - 08-14-2005, 10:31 PM
Design your GUI Sample - by dumbledore - 08-15-2005, 12:00 AM
Design your GUI Sample - by fielden - 08-15-2005, 03:22 AM
support for fb 0.13? - by Spearor - 08-26-2005, 06:45 PM
Design your GUI Sample - by fielden - 08-27-2005, 05:37 AM
Design your GUI Sample - by whitetiger0990 - 08-27-2005, 06:38 AM
Design your GUI Sample - by fielden - 08-27-2005, 09:16 AM
thnx! - by Spearor - 08-27-2005, 03:32 PM
Design your GUI Sample - by fielden - 09-11-2005, 08:46 AM
Design your GUI Sample - by Jerry Fielden - 02-23-2006, 12:07 AM
Design your GUI Sample - by fielden - 06-11-2005, 09:06 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)