|
Someone did a similar thing here (can't post the code, I'm afraid) by :
For each char from 32 to 255
create a label with a border, width and height as appropriate, and the font set to the desired font, Text of the char.ToString();
The labels can then be positioned however you want for a pleasing display.
On the click event of the label, it displays the same character in a label using the same font with an increased size, and on double-click it raises a 'CharacterSelected' event which pass back the font and character selected.
Should be enough to get you started?
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
Yeah, but how can one find out ALL the characters present in a specific font, without looping all Unicode char codes and measuring string width looking for non-zero?
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
not sure you need to - just display 'em - you'll get an empty box if they're not defined in that font.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
I am not going to create a grid with ten thousands of cells, I want to know what characters are present without painting anything.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Sorry - misread/misunderstood.
Yep - you don't want to have a dialog popping up that you have to scroll forever to find used characters... just stick with 33 through 255 if you ask me!
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
Hello thanks for all reply
I was lookin for an "out of the box" tool
The solution to create 256 labels seems a liitle bit heavy
Finaly maybe using a datagridview can be the right solution ??
|
|
|
|
|
Well, behind the scenes all a datagridview is going to do is to create the labels for you, so I'm not sure why you think it's a bit heavy - it also gives you complete control over your presentation.
I reckon you could knock up the code in 1/2 day easy - then publish it as an article on CP for the glory of it
.\\axxx
|
|
|
|
|
Hello , i have the following situation : with my function i get an XML file , parse it and add group box with image and a text box for every post node in the XML file , And for each group box i assign name and toolstrip menu which has a dinamicly added 1 item the thing i want to do is this - when clicked this item ( lets say the item has name Jeff) so .. when i press the menu item Jeff to add text to a text box ( the text is "@Jeff) . as u can see i managed to make the name adding in the toolstripmenu but i cant make it when i clic to add the name to the text box for each person
and here is my function so you could see what im talking about
public void parseXmlatme()
{
string sUser, sUrl;
string avatar;
sUser = Settings.Default.user;
AtMeFlowLayoutPanel.Controls.Clear();
sUrl = "http://edno23.com/api/xml/get.php?username=" + sUser + "&type=posts_mention_me";
rssReader = new XmlTextReader(sUrl.ToString());
rssDoc = new XmlDocument();
rssDoc.Load(rssReader);
for (int i = 0; i < rssDoc.ChildNodes.Count; i++)
{
if (rssDoc.ChildNodes[i].Name == "edno23")
{
nodeRss = rssDoc.ChildNodes[i];
}
}
for (int i = 0; i < nodeRss.ChildNodes.Count; i++)
{
if (nodeRss.ChildNodes[i].Name == "posts")
{
nodeChannel = nodeRss.ChildNodes[i];
}
}
for (int i = 0; i < nodeChannel.ChildNodes.Count; i++)
{
if (nodeChannel.ChildNodes[i].Name == "post")
{
nodeItem = nodeChannel.ChildNodes[i];
string C;
C = nodeItem["user_from"].InnerText;
avatar = nodeItem["user_from_avatar"].InnerText; ;
GroupBox grpBox = new GroupBox();
TextBox txtBox = new TextBox();
PictureBox picBox = new PictureBox();
ContextMenuStrip rightMenu = new ContextMenuStrip();
ToolStripMenuItem atMe = new ToolStripMenuItem();
rightMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
atMe});
rightMenu.Name = "rightclick";
rightMenu.Size = new System.Drawing.Size(153, 70);
atMe.Name = "toolStripMenuItem2";
atMe.Size = new System.Drawing.Size(152, 22);
atMe.Text = "@"+C;
name = C;
atMe.Click += atMe_Click;
grpBox.Location = new System.Drawing.Point(3, 3);
grpBox.Name = "grpBoxatme" + i;
grpBox.Size = new System.Drawing.Size(301, 73);
grpBox.TabIndex = 0;
grpBox.TabStop = false;
grpBox.Text = C;
grpBox.ContextMenuStrip = rightMenu;
txtBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
txtBox.Location = new System.Drawing.Point(59, 16);
txtBox.Multiline = true;
txtBox.Name = "txtBoxatme" + i;
txtBox.ReadOnly = true;
txtBox.Size = new System.Drawing.Size(235, 49);
txtBox.TabIndex = 2;
txtBox.Text = nodeItem["message"].InnerText;
picBox.Dock = System.Windows.Forms.DockStyle.Left;
picBox.ImageLocation = "http://img.edno23.com/avatars/thumbs/" + avatar;
picBox.Location = new System.Drawing.Point(3, 16);
picBox.Name = "pictureBoxatme" + i;
picBox.Size = new System.Drawing.Size(50, 54);
picBox.TabIndex = 0;
picBox.TabStop = false;
AtMeFlowLayoutPanel.Controls.Add(picBox);
AtMeFlowLayoutPanel.Controls.Add(grpBox);
grpBox.Controls.Add(picBox);
grpBox.Controls.Add(txtBox);
}
}
}
Thanks in advance
I'm a bomb technician, if you see me running - try to keep up.
|
|
|
|
|
this is a clue ...
using System;
using System.Drawing;
using System.Windows.Forms;
public partial class Form1 : Form
{
public Button sb;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
for (int x = 0; x < 10; x++)
{
sb = new Button();
sb.Size = new Size(25, 25);
sb.Location = new Point(x * 25, 10);
sb.Visible = true;
sb.Text = x.ToString();
sb.Click += new EventHandler(sb_Click);
Controls.Add(sb);
}
}
private void sb_Click(object sender, System.EventArgs e)
{
Button sb = sender as Button;
this.Text = sb.Text;
}
}
I know nothing , I know nothing ...
|
|
|
|
|
thank you very much ! this helped me solve the problem !
Mess with the best, die like the rest !
|
|
|
|
|
Hi
I have DataSet that I fill like this:
dsView = new DataSet();
adp = new OleDbDataAdapter("select * from Worki", Conn);
adp.Fill(dsView, "Worki");
this.dataGridView1.DataSource = dsView.Tables["Worki"].DefaultView;
If I change any cell in the Datagrid, How I can update the DataBase too ?
(I dont want to use sql query like Update table....)
thank's in advance
|
|
|
|
|
|
new to tablet pc application. is it possible to get noncontionous regions on which i can ink on a single form. i need ascii representation of character followed by its glyph for all the characters on a single form.i want to define area for each character separately. the stroke for one region should not interfere with the ink area of other.
right now i m using groupbox as a control and line control dll to draw horizontal lines so as to draw glyph in defined area.
InkOverlay mInkoverlay;
mInkoverlay = new InkOverlay(groupBox1);
mInkoverlay.Enabled = true;
thanks in anticipation
|
|
|
|
|
Are you going to post the same question here everyday until you get an answer?
You may have more luck in the Mobile Development forum.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi all,
I want to convert samples in a wave file to byte address in the file(MPEG Layer3 format) ...
Please help me.
thank you.
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
That's not exactly easy, and will depend on factors like the number of channels, and the compression level used. If you're using variable bit rate compression, it gets even more complicated.
Ideally, you should start by learning about the mp3 format. A good source of info is http://www.mp3-tech.org/[^], particularly in their "Programmer's Corner" section. I wrote my first decoder based mostly on what I learned there.
PS - if you're writing mp3 software, C# may not be the best tool for the job...
There are three kinds of people in the world - those who can count and those who can't...
modified on Sunday, June 14, 2009 2:26 PM
|
|
|
|
|
Hello,
I was just wondering how I can restart a C# Console Application to its main method? Please help.
[X] 100% HTML
[ ] 100% PHP
[ ] 100% C#
|
|
|
|
|
Simplest way would be to terminate the entire process, and relaunch it. Take a look at Process.Start
I are troll
|
|
|
|
|
Console.Clear();
I know nothing , I know nothing ...
|
|
|
|
|
Call it recursively?
|
|
|
|
|
One way to do it is to add using System.Windows.Forms; to the top and call Application.Restart(); . You may need to add the reference: "System.Windows.Forms.dll" to your project.
I'm not sure of the implications if there are any for using it in a console application.
modified on Tuesday, August 31, 2010 1:54 AM
|
|
|
|
|
Hello,
Does anyone know for some tools which can export merged cells from excel to CSV. For example CSV should look's like this part:
Godina,Mjesec,"AKTIVA; Neto strana aktiva; Strana aktiva","AKTIVA; Neto strana aktiva; Strana pasiva","AKTIVA; Neto strana aktiva","AKTIVA; Domaći krediti; Potraživanja od centralne vlade (neto)","AKTIVA; Domaći krediti; Potraživanja od kantona i općina","AKTIVA; Domaći krediti; Potraživanja od nefinansijskih preduzeća","AKTIVA; Domaći krediti; Potraživanja od privatnog sektora","AKTIVA; Domaći krediti","AKTIVA; Aktiva Ukupno","PASIVA; Novčana masa (M2); Novac (M1); Gotovina izvan banaka","PASIVA; Novčana masa (M2); Novac (M1); Depoziti po viđenju u domaćoj valuti","PASIVA; Novčana masa (M2); Novac (M1)","PASIVA; Novčana masa (M2); Kvazi novac (QM); Depoziti po viđenju u stranoj valuti","PASIVA; Novčana masa (M2); Kvazi novac (QM); Oročeni i štedni dep. u domaćoj valuti","PASIVA; Novčana masa (M2); Kvazi novac (QM); Oročeni i štedni dep. u stranoj valuti","PASIVA; Novčana masa (M2); Kvazi novac (QM)","PASIVA; Novčana masa (M2)","PASIVA; Obveznice i instrumenti tržišta novca","PASIVA; Ograničeni depoziti","PASIVA; Protustavke fondova","PASIVA; Vladini fondovi za kreditiranje","PASIVA; Ostale stavke (neto)","PASIVA; Pasiva Ukupno"
Fields are separated with commas "," but "tree" structure for each field is delimited with ; .
Godina
Mjesec
AKTIVA
-+Neto strana aktiva
-+--Strana aktiva
-+--Strana pasiva
-+Domaći krediti
-+--Potraživanja od centralne vlade (neto)
-+--Potraživanja od kantona i općina
.....
You can find example of such table on url: http://www.cbbh.ba/index.php?id=33&lang=bs&table=monetarni_pregled[^]
|
|
|
|
|
You might take a look at FileHelpers v2.0 - Delimited (CSV) or Fixed Data Import/Export Framework[^].
The library has the ability to deal with both xls and csv files/values.
Of course you will have to decide for yourself if it will solve your problem.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks I will take a look on it, it seems to me as very interesting library.
Best regards,
Fehim.
|
|
|
|
|
Hello,
I want to convert datagridview to excell.
I need to create a button that will do it.
Every time that i click on it , it will create a new worksheet (in a specified workboox- or a file).
Also i need it to autoresize the columns width (as in the datagrid) and change the background of the headercells to some color (doesn't matter which).
How can i do it?
|
|
|
|