Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7443851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:23:55+00:00 2026-05-29T11:23:55+00:00

Okay, so I am trying to use a privatefontcollection for my program to add

  • 0

Okay, so I am trying to use a privatefontcollection for my program to add a little bit of uniqueness to it. The font that I am using is not installed on computers by default. The font’s name is youmurdererbb_reg. I have the font file in the resources folder and the file is in a .ttf format. Here is what i have so far:

Imports System.Drawing
Imports System.Windows.Forms
Imports System.Drawing.Text
Imports System.Text

Dim pc As New PrivateFontCollection


    Private Sub Main_Menu_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        Try
            pc.AddFontFile(YouMurderer)
        Catch ex As Exception
            Trace.WriteLine(ex.ToString)
        End Try

    End Sub


    Private Sub Main_Menu_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint

    Dim Fnt As Font = New Font(pc.Families(0), 80, FontStyle.Regular)
    e.Graphics.DrawString("This is the text that is being drawn", Fnt, Brushes.Black, 10, 10)

    End Sub

Now where i declared the Private Font Collection, I have tried these different things to get it to work:

Dim YouMurderer As String = Encoding.ASCII.GetString(My.Resources.youmurdererbb_reg)

Dim YouMurderer As String = Convert.ToString(My.Resources.youmurdererbb_reg)

Dim YouMurderer As String = Convert.ToBase64String(My.Resources.youmurdererbb_reg)

Dim YouMurderer As String = Encoding.UTF8.GetString(My.Resources.youmurdererbb_reg)

But whichever one I choose, it just shows the entire form with a large red “X” (Like a pictureboxes’ “ErrorImage”) (I have a picture set to the forms background as additional information).

Another problem is that if i don’t try to convert it:

Dim YouMurderer As String = My.Resources.youmurdererbb_reg

Then it comes up with the error of:

Value of type '1-dimensional array of Byte' cannot be converted to 'String'.

I need help with this in .NET (Framework 4)! The entire program is being written in VB.net, not C#, or C++, or JAVA.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:23:56+00:00Added an answer on May 29, 2026 at 11:23 am

    I’ve created a library that makes this easy called BizArk. You can install it using NuGet, or, if you just want to use the source as a reference, you can get to the code here (Current/BizArkCore/Util/FontUtil.cs). Note that the code is in C#, but’s there’s not much code, so hopefully you should be able to follow along.

    If you use the FontUtil class as it is, you can use it to create any font, even built in fonts. Here’s how to use it…

    Private Sub Main_Menu_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    
        Try
            FontUtil.RegisterFont(My.Resources.youmurdererbb_reg)
        Catch ex As Exception
            Trace.WriteLine(ex.ToString)
        End Try
    
    End Sub
    
    Private Sub Main_Menu_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
    
        Dim Fnt As Font = FontUtil.Create("YouMurderer", 80, FontStyle.Regular)
        e.Graphics.DrawString("This is the text that is being drawn", Fnt, Brushes.Black, 10, 10)
        Fnt.Dispose()
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay so I'm trying to make a little gag program that will run away
Okay, so I'm trying to use Javascript to make a Game (Engine?Maybe...). Unfortunately, that
Okay, here's what I'm trying to do: I'm trying to use PHP to develop
OKay I don't use actionscript and trying to help my friend edit a flash
Okay, I feel like a bit of a 800 pound gorilla trying to thread
Okay so I am trying to use a simple UINavigationController with iPhone SDK in
Okay, I am trying to use OCI8 with PHP 5.3.x and Oracle 10g and
Okay... I'm trying to use the most recent version of ITextSharp to turn an
Okay, I'm trying to use this method to get my data into R, but
trying to use the preferred on method call but the code is not working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.