G
Guest
Hi,
Here's my question first and then some information about what my problem is. Anyone know how or have a function/module/class/whatever to convert from argb to rgb?
We have quite a few vb6 applications that are all called from another vb6 application called the navigator. It's kind of like using explorer. Basically we have two "modes" in the navigator. One is test and one is production. When in test the back color is an ugly orange (just to alert the user they're in test mode) and production is just the typical gray. So when the navigator is told to call an application it writes a bunch of properties to a file for the called application to pick up and apply. One of those properties is backcolor. Well colors must be handled quite differently between vb6 and .net.
In the called application (vb6) the code I use to set backcolor is frmParticipants.BackColor = RetrieveProperty("BackColor"). For the orange test mode the value is 33023. Well in .net I can't specify a color that way. When I send that same orange color property to the called program I use Me.BackColor.ToArgb.ToString and that sends a value of -32768 which the vb6 application doesn't like.
Through some more digging I realized that colors from vb.net are stored as argb and in vb6 it's rgb. I don't really understand what the "a" does in argb other than cause me a headache :-/. I do not want to have to go into each vb6 application and make any changes to convert from argb to rgb so I need to do this on the .net side. Anyone know how or have a function/module/class/whatever to convert from argb to rgb? I guess that's my question in a nutshell.
Thanks,
Jesse
Here's my question first and then some information about what my problem is. Anyone know how or have a function/module/class/whatever to convert from argb to rgb?
We have quite a few vb6 applications that are all called from another vb6 application called the navigator. It's kind of like using explorer. Basically we have two "modes" in the navigator. One is test and one is production. When in test the back color is an ugly orange (just to alert the user they're in test mode) and production is just the typical gray. So when the navigator is told to call an application it writes a bunch of properties to a file for the called application to pick up and apply. One of those properties is backcolor. Well colors must be handled quite differently between vb6 and .net.
In the called application (vb6) the code I use to set backcolor is frmParticipants.BackColor = RetrieveProperty("BackColor"). For the orange test mode the value is 33023. Well in .net I can't specify a color that way. When I send that same orange color property to the called program I use Me.BackColor.ToArgb.ToString and that sends a value of -32768 which the vb6 application doesn't like.
Through some more digging I realized that colors from vb.net are stored as argb and in vb6 it's rgb. I don't really understand what the "a" does in argb other than cause me a headache :-/. I do not want to have to go into each vb6 application and make any changes to convert from argb to rgb so I need to do this on the .net side. Anyone know how or have a function/module/class/whatever to convert from argb to rgb? I guess that's my question in a nutshell.
Thanks,
Jesse