Page 9 of 12 FirstFirst ... 7891011 ... LastLast
Results 81 to 90 of 116

Thread: thinBasic 1.10.x

  1. #81
    Senior Member catventure's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    587
    Blog Entries
    1
    Rep Power
    71
    oooh! I'm looking at PDF. Lots of very interesting stuff there, Eros. Really hope you can find time to get round to documenting/adding help for it all...
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)
    TAB Forum - http://adventure.rpgdynasty.com/
    TAB Email Group - http://tech.groups.yahoo.com/group/TAB_IF_CREATOR/

  2. #82
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    69
    Rep Power
    9
    Hi Eros,
    It seems a lot of work has done behind the scene. Thank you for your hard work. While inspecting the pdf you posted here, i've noticed the <Control Property GET/SET:<ControlName>.BackColor. I wonder how that works internally, especially when we used buttons. I mean, i am trying to do it in FreeBasic but i can't set my button back color. I can see that my buttons have a colored outline instead of a complete back color. These are the steps i followed.
    Case WM_CTLCOLORBTN message,
    Get dc_handle from wparam
    SetBkMode(dc_Handle, Transparent)
    SetBkColor(dc_Handle, myColor)
    Set hBrush with CreateSolidBrush(myColor)
    Return hBrush

  3. #83
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    51
    Posts
    8,343
    Blog Entries
    2
    Rep Power
    10
    Not all properties are available for all controls.
    Button is one of those that do not allow changing colors.

    Have a look at attached personalized XPButton create by Jose Rocha years ago.
    It is Power Basic code, not far from FreeBasic code. Maybe you can get ideas.

    You can also see thinBasic example of XPButton integration executing scripts in \thinBasic\SampleScripts\UI\XPButton\

    Ciao
    Eros
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	XPButton_002.jpg 
Views:	15 
Size:	10.8 KB 
ID:	9838   Click image for larger version. 

Name:	XPButton_001.jpg 
Views:	15 
Size:	7.5 KB 
ID:	9839  
    Attached Files Attached Files
    Last edited by ErosOlmi; 18-04-2018 at 21:13.
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  4. #84
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    69
    Rep Power
    9
    Hi Eros,
    Thanks for the reply.
    I saw the xpButton in sample scripts. Let me study the Josep Roca's code.

  5. #85
    XpButton is available in my WinFBX framework for PowerBasic. It has been implemented a class in the file CXpButton.inc.

    BTW I wrote it to demonstrate the use of visual styles, not to change the button background color. I never have had any interest in colored buttons or other controls because they can look horrible if the user selects a different theme.
    Forum: http://www.jose.it-berater.org/smfforum/index.php<br />Website: http://www.jose.it-berater.org/index.html<br />SED Editor, TypeLib Browser, headers and examples.

  6. #86
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    51
    Posts
    8,343
    Blog Entries
    2
    Rep Power
    10
    Attached an old code I took from PowerBasic forum years ago.
    It shows how to own draw a button.
    Code is to adapt to your needs but can show how to draw a button

    Also found this thread that can help: https://forum.powerbasic.com/forum/u...nerdraw+button

    As Josť said ... results can be horrible
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	color.PNG 
Views:	24 
Size:	5.1 KB 
ID:	9841  
    Attached Files Attached Files
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  7. #87
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    69
    Rep Power
    9
    @Josep Roca,
    Thanks for the reply. I know that it looks horrible when you change the system theme. But I want to make a custom button control just for a practice. I just tried and experimented with the code you posted on FreeBasic forum. It worked but the back color is only changed behind the button text area, not the full rect of button. By the way, i have some questions related to CWSTR.inc Which is the best forum to ask it ?

    @Eros Olmi,
    Thanks for the code sample and the link. Let me check.

  8. #88
    > By the way, i have some questions related to CWSTR.inc Which is the best forum to ask it ?

    http://www.planetsquires.com/protect/forum/index.php
    Forum: http://www.jose.it-berater.org/smfforum/index.php<br />Website: http://www.jose.it-berater.org/index.html<br />SED Editor, TypeLib Browser, headers and examples.

  9. #89
    Member
    Join Date
    Aug 2015
    Location
    Keralam, India
    Posts
    69
    Rep Power
    9
    @Jose Roca,
    Thanks.

  10. #90
    thinBasic MVPs ReneMiner's Avatar
    Join Date
    Oct 2012
    Location
    Germany
    Age
    48
    Posts
    1,241
    Blog Entries
    1
    Rep Power
    136
    myWindow(1).Caption = myBMP(1).Filename

    Can just read but not try out yet.
    Just one thing: old vb6-controls (and windows) also had an Index so if we have let's say a few windows of the same type that show a bitmap where we draw unto then it was possible to give them all the same name only they had different indexes so these windows can share the same subs or functions. For the event-subs it's easy the user just might use one of the 4 user-values attached to every UI-"object", but if you think about setting properties:
    Text1(1).Text = "Hello"
    Text1(2).Text = "world!"
    
    it would be worth to think about to add an index-property to all UI-things that have a name also
    maybe no PC currently but always a head full of ideas

Page 9 of 12 FirstFirst ... 7891011 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •