|
1- it's not clear that the first digit is not drawn.because some country codes are three digit
2- what is the min and max width of barcode sticks.
3- what is the odd and even standart and which binary numbers will be used.
thanks for your interest..
signature...
|
|
|
|
|
1 & 2 depend on which type of barcode you're trying to create. I'm guessing you're trying to create an EAN barcode given you specify a country code?
You should probably get a copy of Roger Palmer's book if you need more info http://www.paltec.ca/Book.htm[^]
3 - Sorry, I don't understand.
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
yes, i am try to code ean13. I will do this for a small shop. which type of barcode do you suggest me? ean8 is appropriate for this stuation?
forthermore, what is you suggestion to solve odd and even numbers.
signature...
|
|
|
|
|
The business I work for uses code39 for most barcodes.
We can read ean however code39 is definitely the easiest to create.
What you will need is the code39 font which is freely available - search on google.
The beauty of code39 is that the only requirement is:
Starts and ends with an asterisk *
Everything between the asterisks is in caps.
For instance if one of our products is bic01 what we do is code it as *BIC01* and simply change the font to code39.
Any barcode reader that can read code 39 will then be able to read this and the code returned will be BIC01.
IN this manner just install the font on the users computer and ensure that your code uses that font.
The disadvantage of ean is that strictly speaking you need to purchase a subset of these barcodes to make sure that no duplicates exists - from experience I can tell you that duplicates do exist.
Trying to create your own barcodes by drawing black lines is asking for trouble - you are much better off buying an ean font(if that is what you really want) than trying to design one - it will cost you much less, in terms of money and bug fixing, in the long term .
You always pass failure on the way to success.
|
|
|
|
|
thanks for your helps.
signature...
|
|
|
|
|
1. added and initialized some components, including radio buttons
// Create and initialize a GroupBox and a radio Button control.
GroupBox groupBox1 = new GroupBox();
RadioButton radio1 = new RadioButton();
RadioButton radio2 = new RadioButton();
groupBox1.Size = new Size(100,100);
groupBox1.Location = new Point(4,24);
groupBox1.FlatStyle = FlatStyle.System;
groupBox1.Text = "Engin";
radio1.Location = new System.Drawing.Point(8,24);
radio1.Size = new Size(50,20);
radio1.Text = "radio1";
radio1.Name="cb9";
radio2.Location = new System.Drawing.Point(8,64);
radio2.Size = new Size(50,20);
radio2.Text = "radio2";
radio1.Name="cb10";
groupBox1.Controls.Add(radio1);
groupBox1.Controls.Add(radio2);
2. in the button click function, added following to detect state
private void btnPF_Click(object sender, EventArgs e)
{
//DETECTING components
foreach(Control c in panel1.Controls)
if (c.Name.Equals("cb1"))
{
CheckBox lb = c as CheckBox;
if (lb.Checked)
{
//MessageBox.Show("cb1 checked", "info");
}
}
else if (c.Name.Equals("cb9"))
{
RadioButton lb = c as RadioButton;
if (lb.Checked)
{
//MessageBox.Show("radio1 checked", "info");
}
}
else if (c.Name.Equals("cb10"))
{
RadioButton lb = c as RadioButton;
if (lb.Checked)
{
//MessageBox.Show("radio2 checked", "info");
}
}
All of the components are detected properly but not the radio buttons
any help is greatly appreciated
|
|
|
|
|
If RadioButtons are contained in a GroupBox which is in a Panel , then they do not appear in the Panel.Controls collection - they are in the GroupBox.Controls collection, regardless they are also inside the Panel . Similarily, controls inside a panel do not appear in the Form.Controls collection.
By the way, I suggest comparing references instead of comparing names of controls, that is, use "c == cb10 " instead of "c.Name.Equals("cb10") ".
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
Whenever i am trying to execute a select statement in a ExecuteScalar() i get the exception from subject: Object reference not set to an instance of an object.
My script is:
public int InsertRecordSP(ref invOrdenes orden)
{
Database db = new Database();
try
{
//abro la coneccion y defino el Store Procedure a utilizar
db.open("insertOrder");
//Ingreso los parametros del Store Procedure
db.setParam("lastOrder", orden.getOrden());
//Ejecuto el Store Procedure
return db.executeScalar();
}
catch (DatabaseException de)
{
log.Error("DatabaseException: " + de.Message);
}
finally
{
db.close();
}
return 0;
}
public Database()
{
// set variables
this.host = ConfigurationSettings.AppSettings.Get("sql-host");
this.user = ConfigurationSettings.AppSettings.Get("sql-user");
this.password = ConfigurationSettings.AppSettings.Get("sql-password");
this.database = ConfigurationSettings.AppSettings.Get("sql-database");
// create the SqlConnection object
String source = "server=" + host + ";uid=" + user + ";pwd=" + password + ";database=" + database;
conn = new SqlConnection(source);
}
public void open(string sprocName)
{
try
{
conn.Open();
scmd = new SqlCommand(sprocName, conn);
}
catch (Exception e)
{
throw new DatabaseException(e.Message);
}
}
public int getParam(string paramName)
{
SqlParameter sqlParam = new SqlParameter();
sqlParam.ParameterName = "@" + paramName;
sqlParam.SqlDbType = SqlDbType.Int;
return (int) sqlParam.Value;
}
public int executeScalar()
{
try
{
return (int)scmd.ExecuteScalar();
}
catch (Exception e)
{
throw new DatabaseException(e.Message);
}
}
What i am doing wrong?
Regards, Diego.
|
|
|
|
|
Hi Diego,
you should have a look at the entire exception, not just its Message.
Use ToString() instead.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
If the stored procedure insertOrder does what it name suggests, it doesn't return any result at all. The ExecuteScalar method returns null if the query doesn't return a result, so when you try to use the return value, you get that exception.
---
single minded; short sighted; long gone;
|
|
|
|
|
Why is the value of the tags not being read when the code reads System.xml.XmlTextReader.Text property?
Hence within element <column> column 1 is not being read as text
Note: "sample.xml" is not being rendered well. Tried using HTML escape characters to display a sample but it was unsuccessful. See the code below.
using System;
using System.Xml;
namespace ReadXMLfromFile
{
class Class1
{
static void Main(string[] args)
{
XmlTextReader reader = new XmlTextReader("sample.xml");
while (reader.Read())
{
{
switch (reader.NodeType)
{
case XmlNodeType.Element:
Console.Write("<" + reader.Name);
while (reader.MoveToNextAttribute())
Console.Write(" " + reader.Name + "='" + reader.Value + "'");
Console.WriteLine(">");
break;
case XmlNodeType.Text:
Console.WriteLine (reader.Value);
break;
case XmlNodeType. EndElement:
Console.Write("");
break;
}}}}}}
(source: MSDN)
sample.xml
----------
<database schema-name="products">
<column data-type="text" name="Code" pk="true" fkreferences="Product.Code"> column 1
<column data-type="int" name="Qty"> column 2
<column data-type="currency" name="CostPrice"> column 3
<table name="ProductsInStock"> </table>
<column data-type="text" name="ProductID" pk="true"> column 1
<column data-type="text" name="Description"> column 2
<table name="Product"> </table>
------------------
-- modified at 13:26 Saturday 29th September, 2007
-- modified at 5:24 Sunday 30th September, 2007
-- modified at 5:26 Sunday 30th September, 2007
<div class="ForumSig">Jon</div>
|
|
|
|
|
SqlDataReader read = cmd.ExecuteReader();
read.Read();
photo.Visible = false;
if (read["newsPhoto"] != DBNull.Value)
{
photo.Visible = true;
photo.ImageUrl = "retriveImage.aspx?id=" + read["newId"].ToString();
}
this my code to display image
but all time enter this if statment either i upload the image or not all time he enter if statment ... where the problem ?????
Palestine
|
|
|
|
|
does the path come through from the DB ? Does it exist ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hey
does anyone know where I can find one? its just really for changing the base of and handling large integers... preferably under an MIT/BSD style licence...
thx!
|
|
|
|
|
|
thepersonof wrote: any ideas?
lots of them. It suffices to Google around.
CodeProject has a couple of articles on big integers.
GNU has a multiprecision package.
etc.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi all,
I am working in a windows application. i have a text say for eg,
<img src="http://static.ibnlive.com/pix/sitepix/06_2007/kumaraswamy_cm90.jpg"
alt="BACKTRACKING? Kumaraswamy says he never said he would step down on October 3."
title="BACKTRACKING? Kumaraswamy says he never said he would step down on October 3"
border="0" width="90" height="62" align="left" hspace="5&"/>
Kumaraswamy has denied reports that he would step down on October 3
i need to remove the img tag entirely and display only this part.
Kumaraswamy has denied reports that he would step down on October 3
i tried using the following regular expression to extract img tag.but its not working
Regex r=new Regex("<img[^<>]+>")
can anybody help out with this?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
anu81 wrote: Regex r=new Regex("<img[^<>]+>")
OTOH, < and > are themselves regular expression delimiters, you'll have to escape them like
@"\<img[^\<\>]+\>"
|
|
|
|
|
Hi every body,
I want to fetch database tables from SQLSERVER DBMS and display all these tables along with their attributes using c# from which the user can select the reqiured tables and correspoding fields.two points i need to know.
1-how to retrieve "database schema" from SQLSERVER.
2-after fetching,where these tables schemas can be stored from where they can be displayed to user.
Regards,
chanzeb chaudhary.
|
|
|
|
|
What brand of SQL server are you using? Microsoft SQL Server? MySQL? Oracle? Something else?
---
single minded; short sighted; long gone;
|
|
|
|
|
SQL Server is the name of the MS product, I think it's safe to assume that's the one he means.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
I have an icon resource with various large and small sizes / colour depths. Vista and XP both support png compression on icons > 48 x 48 but if I compress these icons within the resource my application won't compile.
Error 18 'CSCA8.tmp' is not a valid Win32 resource file
Is there a workaround for this?
(Using vs 2005 by the way)
Dave
|
|
|
|
|
|
That's not C# code. Pascal?
Why do you think that the code needs to ne optimised?
---
single minded; short sighted; long gone;
|
|
|
|