|
That got complicated, and resulted in showing a "n"
Decided to use these chars in string form, and it works for now ❶❷ they are in Segoe UI
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
You said you wanted to use Segoe UI Symbol; which means that has to be the font specified in your "UI" when you use (hex) codes for "special" characters in that font.
The "symbol font" in fact contains numerous "black circles" of various sizes (or the same size). You can't just pick "any" black circle and expect it to show up in "any" font.
In my app, I mix all "4" Segoe fonts (MDL2, UI, Symbol, Emoji) at the same time and never have any issues: character code + font family.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I get it now!
I selected the wrong font file, and can use Segoe UI Symbols, which has the large circle, and alphanumeric chars as well. So I don't have to compromise now, and can finish as planned. Realize my UI goal or vision.
So this font style and font file solves my issue and is the correct fix. And I should not depend on Windows or the OS to do font searching and swapping for me, because it's unreliable.
Wow, I put so much effort into trying to solve this and it was very hard. Thank you Gary for putting me on the right track, and pushing me to get it right and not compromise for something sub standard.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
You're welcome.
And the "black circles" aren't really "black"; that's the default "foreground" color; you can change it to any color you want. That applies that "all" characters.
If you want a different color for the background, it has to come from the object "behind" it. "Characters" have no background color you can set. Emoji is colored by default and you can't change that.
You can layer characters to "insert" a color into (say) a "hollow circle" with a "solid colored circle" behind it (so as not have to put another "background" behind). And you can rotate individual characters (e.g. pointing arrows)
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I was pretty excited and thought I had it all figured out, only to be proven wrong again, where I got ".." which is 2 dots. target computer is a Win 7 32 bit OS, My "Extras" app is targeted at Framework 4.6.1. I got the code from Charmap; U+2824 Black Large Circle. On my rig it works great.
With my other Win Forms app called "Simple BOL" using .Net Core 7 I think, I can change the forecolor of a ListView cell or column, and make red, black and green circles on my rig running Win 11 64. But on these Win 7 32 bit OS machines with the app in question called "Extras", no luck either. In fact on my machine with Extras, the forecolor for a target cell won't change colors either.
So another swing and a miss for strike 3 now, batter out. Well I still have plenty of innings left in the game, so I'll try again tomorrow.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
U+2824 is NOT a "circle"; it is a "Braille Pattern Dots-36" in the "Segoe UI Symbol" font (i.e. 2 "dots"). It is exactly what it is.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
That sounds encouraging, but that's the code Character Map presents to me on both my computers. Hmm...
I have U+28C0 for the braille code of 2 dots Braille Pattern Dots 78
Mind if I ask what code you have for the Large Black Circle?
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
You talk codes without font names; which is meaningless.
It should be a simple matter for you to compare the character maps of "both operating systems" and draw your own conclusions.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
U+2B24 - I thought the B was an 8 in Segoe UI Symbol.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Finally got it working today. Thanks for the help, I learned a lot on this and your input made things clearer. This ended up being a deep lesson on Fonts and Chars for me, and will make coding more fun in the future, using some emojis to brighten things up a bit. Thanks Gerry!
I just need to get some glasses pretty soon.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Good morning,
I'm trying to capture an image from a RTSP stream using ffmpeg.
I'm struggling, it is as if ffmpeg isnt working. A snip from my code is below:
using System.Runtime.InteropServices;
using FFmpeg.AutoGen;
using SixLabors.ImageSharp.Formats.Png;
using SixLabors.ImageSharp.Formats;
Class Program
{
unsafe static void Main(string[] args)
{
string inputUrl = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4";
ffmpeg.avformat_open_input(&pFormatContext, inputUrl, null, null);
The error that I'm receiving which is related to the last line of code is:
System.NotSupportedException
HResult=0x80131515
Message=Specified method is not supported.
Source=FFmpeg.AutoGen
StackTrace:
at FFmpeg.AutoGen.DynamicallyLoadedBindings.<>c.<Initialize>b__2_1284(AVFormatContext** <p0>, String <p1>, AVInputFormat* <p2>, AVDictionary** <p3>)
at FFmpeg.AutoGen.ffmpeg.avformat_open_input(AVFormatContext** ps, String url, AVInputFormat* fmt, AVDictionary** options)
at Program.Main(String[] args)
Any help would be appreciated,
Freddie
|
|
|
|
|
You'll probably have better luck reporting this as an issue in the GitHub project - assuming it hasn't already been reported:
Issues · Ruslan-B/FFmpeg.AutoGen · GitHub[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
The documentation at FFmpeg: Demuxing[^] implies that it expcts an actual filename as input. So try reading the stream into a local file, and see if it can process that.
|
|
|
|
|
|
I have about 6 user controls, each with its own GUI and code to load data from a MySQL database.
Are there any tutorials or examples on how to use multithreading to load all 6 user controls on a Form when the Form is shown?
Thanks in advance.
|
|
|
|
|
Controls cannot be created and used on anything other than the UI (startup) thread. Your controls CAN, however, used Tasks or Threads to load data from the database, but populating the control data with the data returned from the database must be done on the UI thread.
There are plenty of articles on the web about using tasks to get data. There is nothing specific to user controls that changes how that's done.
|
|
|
|
|
What Dave said and use ObservableCollections to have the UC's update "live".
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I am using visual basic to try and get the webview2 current url but all I get is the first page that I opened with the webview2. I used
dim URL as string = webView21.Source.ToString() but not returning current page url. I have work on this for 2 days now and no luck. I sure hope some body can answer this or my whole project is toast.
|
|
|
|
|
You have to handle the NavigationCompleted event, then you can get the "current" uri from either webView21.Source or webView21.CoreWebView2.Source .
|
|
|
|
|
Thanks so much Dave. I knew there had to be away, just couldn't find it. Vb.net is just a hobby for me but if I can help someone else I will pay this forward.
|
|
|
|
|
First some background. 10+ years ago my spouse started a small webshop and I made the administration part in Delphi. Slowly transitioning it to the web. I have tried to make everything as automatic as I can. Like register a payment automatically makes a record in the ledger.
On the same line I later made a C# .NET as a part in the handling of incoming invoices. She scans the invoice to PDF and place it on the desktop or drops it there if it is delivered electronically. My application detects the file and pops up and she can fill in the things needed to put in the ledger and store it in the database.
Now last week the application starts and then closes without being touched for years. It worked last month, the delphi written things still works.
Does anyone have any idea why, this coincide with me reading something about Microsoft removing some old version of TLS. The application uses Entityframework.
Then I tried opening up the source in VS 2017 community edition(?) where it was written but I never get past the "credentials is wrong" page. Moved the code to another computer with VS 2022 on it where I had trouble getting it to work. When I did I got back an exception telling me "opening of table didn't work" but no indication of why.
|
|
|
|
|
You've said a lot but nothing that can be used to give any suggestions. We know nothing about the code, what it uses or does, nor the EXACT exception messages.
|
|
|
|
|
I don't use C# on a daily basis and I haven't touched the code for a long time. There could be that this debug session broke when imported in 2022 instead of 2017 where the original development was done.
I hoped that someone would say something along the lines of (Microsoft disabled Tech Z version X, try installing Y). But anyway Entity framework and under references MySql.Data and MySql.Data.Entity.EF6.
NuGet packages MySql.Data 6.9.9 and MySql.Data.Entity 6.9.9 (This one is marked as depreceted).
This is the exception I received:
System.Data.Entity.Core.EntityException
HResult=0x80131501
Message=The underlying provider failed on Open.
Source=EntityFramework
StackTrace:
at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<getresults>b__5()
at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<system.collections.generic.ienumerable<t>.GetEnumerator>b__0()
at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
at BusinessLayer.Supplier.GetAll() in C:\mitt\marieshopnet\BusinessLayer\Supplier.cs:line 33
at PendingLedgerEvidence.Form1..ctor() in C:\mitt\marieshopnet\PendingLedgerEvidence\Form1.cs:line 60
at PendingLedgerEvidence.Program.Main() in C:\mitt\marieshopnet\PendingLedgerEvidence\Program.cs:line 19
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
MySqlException: Unable to connect to any of the specified MySQL hosts.
|
|
|
|
|
The "provider" exception (probably) refers to the MySQL database driver / adapter. If you haven't touched stuff "in years", you need to verify all the versions (of components) you need are in "sync".
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Your app's connector could not connect to the database host, or it connected and failed authentication. TLS is a transport protocol, a newer version of handshaking or validating in more detail. TLS last I checked is at V1.3, and V1.0, V1.1 was discontinued, but that was years ago.
If your database is hosted at home or in your shop, then that's a local connection, and could be a firewall blocking a port number for MySQL. If your using a cloud host, then perhaps they upgraded.
But if you wrote the app personally, you should remember how that part works, and be able to fix it fairly quickly. EF has nothing to do with the connection to the database server. You can use Fiddler to watch the connection, or check error logs, there is something out there that will guide you.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|