Hi,
i am trying to write Jananese characters with DrawString().
It is not working. The characters a printed as boxes only.
How can i change the culture of my windows forms application ?
It seems not to work, because an additional textbox isn't printing in
japanese charaters, too.
best regards,
gürkan
This is the code:
private void OnPaint(object sender, System.Windows. Forms.PaintEven tArgs e)
{
System.Windows. Forms.Applicati on.CurrentCultu re =new CultureInfo("ja-JP");
System.Threadin g.Thread.Curren tThread.Current Culture = new
CultureInfo("ja-JP");
System.Threadin g.Thread.Curren tThread.Current UICulture = new
CultureInfo("ja-JP");
e.Graphics.Draw String("\u307b, \u308b,\u305a,\ u3042,\u306d"/*,"????"*/,normalFont,tit leBrush,50,50);
} 3 2256
Gürkan,
The current culture has nothing to do with how characters are rendered.
A character has one value, that's it. The problem here is that your font
doesn't support those characters, hence the black boxes.
You have to use a different font which supports the characters.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Gürkan Demirci" <fa********@hos t.de> wrote in message
news:%2******** **********@TK2M SFTNGP09.phx.gb l... Hi,
i am trying to write Jananese characters with DrawString(). It is not working. The characters a printed as boxes only.
How can i change the culture of my windows forms application ? It seems not to work, because an additional textbox isn't printing in japanese charaters, too.
best regards,
gürkan
This is the code: private void OnPaint(object sender, System.Windows. Forms.PaintEven tArgs e)
{
System.Windows. Forms.Applicati on.CurrentCultu re =new CultureInfo("ja-JP");
System.Threadin g.Thread.Curren tThread.Current Culture = new CultureInfo("ja-JP");
System.Threadin g.Thread.Curren tThread.Current UICulture = new CultureInfo("ja-JP");
e.Graphics.Draw String("\u307b, \u308b,\u305a,\ u3042,\u306d"/*,"????"*/,normalFont,tit leBrush,50,50);
}
using a font which supports japanese characters would certainly help.
"Gürkan Demirci" <fa********@hos t.de> schrieb im Newsbeitrag
news:%2******** **********@TK2M SFTNGP09.phx.gb l... Hi,
i am trying to write Jananese characters with DrawString(). It is not working. The characters a printed as boxes only.
How can i change the culture of my windows forms application ? It seems not to work, because an additional textbox isn't printing in japanese charaters, too.
best regards,
gürkan
This is the code: private void OnPaint(object sender, System.Windows. Forms.PaintEven tArgs e)
{
System.Windows. Forms.Applicati on.CurrentCultu re =new CultureInfo("ja-JP");
System.Threadin g.Thread.Curren tThread.Current Culture = new CultureInfo("ja-JP");
System.Threadin g.Thread.Curren tThread.Current UICulture = new CultureInfo("ja-JP");
e.Graphics.Draw String("\u307b, \u308b,\u305a,\ u3042,\u306d"/*,"????"*/,normalFont,tit leBrush,50,50);
}
thank you both.
that solved my problem
regards
"Gürkan Demirci" <fa********@hos t.de> schrieb im Newsbeitrag
news:%2******** **********@TK2M SFTNGP09.phx.gb l... Hi,
i am trying to write Jananese characters with DrawString(). It is not working. The characters a printed as boxes only.
How can i change the culture of my windows forms application ? It seems not to work, because an additional textbox isn't printing in japanese charaters, too.
best regards,
gürkan
This is the code: private void OnPaint(object sender, System.Windows. Forms.PaintEven tArgs e)
{
System.Windows. Forms.Applicati on.CurrentCultu re =new CultureInfo("ja-JP");
System.Threadin g.Thread.Curren tThread.Current Culture = new CultureInfo("ja-JP");
System.Threadin g.Thread.Curren tThread.Current UICulture = new CultureInfo("ja-JP");
e.Graphics.Draw String("\u307b, \u308b,\u305a,\ u3042,\u306d"/*,"????"*/,normalFont,tit leBrush,50,50);
} This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: twostepted |
last post by:
Hello,
This is a bit of a long post (sorry) but here is the jist of it:
I've developed a Windows forms User Control marquee (auto-scrolling
text like a readerboard). I'm trying to optimize it so that it'll
display very large strings with out comsuming so many resources. That
is, as the size of the display string increases, the marquee uses
additional CPU cycles.
I've considered two possible solutions.
|
by: Charles A. Lackman |
last post by:
Hello,
I have created a complete PrintDocument and need to create an image from it.
How is this done?
e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
e.Graphics.DrawString(Line1.Text, FontLine1, TheBrush, Thelocation1, 390 +
yPos, AStringFormat)
e.Graphics.DrawString(Line2.Text, FontLine2, TheBrush, Thelocation2,
TheHeight1 + (390 + yPos))
|
by: Mad Scientist Jr |
last post by:
Can someone post a clear example of how to change the background color
of an individual datagrid cell for a Windows desktop app? (preferably
in vb.net)
I found some code on how to do this when the user clicks on the cell:
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged
DataGrid1.Controls(DataGrid1.CurrentCell.ColumnNumber +
2).BackColor =...
|
by: D Witherspoon |
last post by:
No matter what I do the default paper size is always either A3 or 11 by 8.5
..
Here is the code.
Dim dlg As DialogResult
pd.DocumentName = "Weld Image"
Dim pkPaperSize As New Printing.PaperSize("sdfgsfdg", 850, 1100)
|
by: Michael Galvin |
last post by:
I am trying to use Python to send to the printer a calender filled
with a mix of text and simple graphics. I want to draw on the printed
page something like a table with 6 rows and 7 columns to represent a
calendar. I want to place text precisely within those boxes on the
printed page. I am using Python 2.4 on Windows XP
I was in the past able to do this within Visual Basic using its
printer object. Visual Basic's printer object uses...
| |
by: Peter Row |
last post by:
Hi,
I've started work on my own control some parts of which use standard
controls, others I need to draw on my controls surface to get the display
output I require, however....
I seem to be stupid or missing the point. I used DrawString( ) as a simple
test but I cannot get it to work at all unless I handle my custom controls
Paint event.
|
by: Dom |
last post by:
In some programs, I see that certain items in a listbox have been
grayed, to indicate that they are "there" but can not be chosen. This
is very helpful. Can you do this in CSharp? Is there a
lstMain.SelectedItem.Enabled?
Dom
|
by: Tony Johansson |
last post by:
Hello!
If I use the DrawString below with object of StringFormat as the last object
it works good.
If I instead remove object StringFormat below as the last object of
DrawString I get some rows that are not printed correctly.
It's look like when toner is too low for the printer.This is only for some
rows.
Can somebody explain why this happens?
What kind of StringFormat is used when this parameter is missing?
|
by: Dilip |
last post by:
Howdy Folks
I have a display where the Graphics.DrawString function is called to
display something. Since the text seems to be larger than its
bounding rectangle, the call basically splits the string into multiple
lines.
Is there a way to find out into how many lines the string was split?
I am asking because this string is being displayed inside an owner
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |