StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
johnwang  
#1 Posted : Tuesday, January 26, 2021 3:29:32 PM(UTC)
johnwang

Rank: Member

Reputation:

Groups: Approved
Joined: 4/2/2020(UTC)
Posts: 11
United States

Thanks: 4 times
Was thanked: 1 time(s) in 1 post(s)
Hi, is there an example of the proper way to call sp_config.PenColor to modify the primary stroke color? It's not a function and if I try to set it to anything I get an invalid field assignment error
Rob  
#2 Posted : Tuesday, January 26, 2021 5:19:03 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Since it's GDI, it uses a weird COLORREF struct.

This works for me:
(I couldn't seem to get the constructor to work)
Code:
var newColor = new COLORREF();
newColor.R = 56;
newColor.G = 169;
newColor.B = 255;

sp_config.PenColor = newColor;
sp_config.Save();
sp.Reload();

thanks 1 user thanked Rob for this useful post.
johnwang on 1/26/2021(UTC)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.