|
ok I tried your method...
public static class thenameuse {
public const string Legal = "L";
public const string Alias = "P";
public const string None = "";
}
public class theName
{
public thenameuse nameuse;
public string prefix;
public string FirstName;
public string Middle;
public string LastName;
public string Suffix;
}
public theName[] Name;
but from the form class...
cn.Patient.Name[0].nameuse. (I do not get the the const values to populate when hitting the '.') I tried a few things, to no avail. What am I missing?
|
|
|
|
|
referenced them by
nameuse.Legal
nameuse.Alias
Thank you! I got it now!
|
|
|
|
|
Hi,
I have a project suite that is written in vb6. Since some of the programs in the suite don't work, I created the same programs in c#. How can I create a setup file that will have the rest of the vb6 projects and c# projects?
Also, if this message doesn't belong to this message board, I apologize and would like it if you can tell me where I can ask this question.
Thank you,
Prateek
|
|
|
|
|
Hi;
i am writing some codes. that codes are found and mark any squares,circles on image.I know that its very complicated. So please help me. I'm waiting for helps.
thanks for helps.
Ali GOKDEMIR
|
|
|
|
|
Graphics dc = this.CreateGraphics();
Pen redPen = new Pen(Color.Red, 10);
dc.DrawEllipse(redPen,10,10,50,50);
|
|
|
|
|
... not forgetting to call Dispose on the Graphics and Pen objects of course - better done in using blocks so you can't forget.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
thanks for mail. Your codes are usefull. But i want to found shape (ellipse, square...) on picture.
how can i write like this?
|
|
|
|
|
hi. i think you are looking for a template matching algorithm.
there are several ways for this. but the main problem in all algorithms is the size of object.
if you looking for a fixed size object then it can be a little easy but when you looking for circles of any size then you should read expert articles in this context.
sorry but i don't think that anyone in this heaven can give you a perfect code of this.
just google the "template matching" or "object recognition" to get some clues.
sometimes 0 can be 1
|
|
|
|
|
i have a problem in which i have to get data from one site into excel sheet . can i make this using C#. please help
|
|
|
|
|
You can certainly make this using C#.
|
|
|
|
|
thz for your kind reply .... well sir if u can help me how to get started. which classes i have to use. what r its requirement
|
|
|
|
|
I'd start by writing out my requirements, and then mapping out a couple of possible solutions (probably using storyboards).
naveen20_5 wrote: what r its requirement
This is your project. How are we supposed to know?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys
|
|
|
|
|
naveen20_5 wrote: can i make this using C#.
You can do almost everything using C# (IT related )
You can use this class[^] and use the DownloadData Method to get the byte[]. and then you can parse those data and create a excel file.
|
|
|
|
|
Its just that easy
My current favourite word is: Delicious!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
|
Well, thats just a hint
|
|
|
|
|
Hi All,
I found this site
http://www.codeproject.com/KB/edit/HDNumericTextBox.aspx[^]
to be perfect for all my numeric text box needs. So I added the control to my toolbox without problems (dll was supplied), but when I drag and drop it on my form I get an error
"Failed to create component "numericTextBox".
System.FormatExeception: Input string was not in the correct format.
I really would like to get this up and working...and ideas on how to make this thingy work?
I'm in VS2008, C#, Windows Application.
Thanks!
|
|
|
|
|
Or you can just add MaskedTextBox control and set the MASK value to 0000000000.
And it will be numeric text box. simple
|
|
|
|
|
That doesn't give me decimals...
|
|
|
|
|
Then you can use 00000.00 as Mask . and it will be decimal.
|
|
|
|
|
but I want to use the numeric text box control...it's soo much easier and faster and does what I want. Just pop it in the form and your done..I have tons of them...
I also tried another piece of code and I got the same exact error...so it must be a form setting of some sort.
Thanks
|
|
|
|
|
Hi all!
I am trying to create an application for Pocket PC 2003 using C#, to send an SMS by connecting a built-in GSM modem through the USB port. I have found a library called SMSLib, which contains all the functions for sending n receiving an SMS through a GSM modem connected via USB.
I wrote a desktop appln. initially, to check whether the library works. It worked out successfully on the desktop app.
Now i have written the same code in a PPC2003 C# project, but it is not working.
The port to which i have connected the modem is not getting detected on the emulator. Because of this it is givin me an IOException.
Plz. can sumone tel me wat i should do, so that the port gets detected on the emulator???????????
N yes, I have also tried using ActiveSync, but No Luck!! May be it is not useful, or may be I dont know how to use it.
PLEASE help me out... Plz....
Thank You!
|
|
|
|
|
You should post your question in Mobile Developement [^]board and there maybe someone can give you any right direction.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Hello,
I'm having trouble with this code. I have 3 files:
program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace keyFortress
{
static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
lView mylView = new lView();
mylView.GetData();
mylView.LoadList();
}
}
}
lView.cs
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlServerCe;
using System.Security.Cryptography;
using Microsoft.Win32;
namespace keyFortress
{
class lView
{
public DataSet _DataSet;
public SqlCeConnection _Conn;
public SqlCeDataAdapter _DataAdapterTitles;
public void GetData()
{
string strConn = @"Data Source = |DataDirectory|\psw01.sdf;Password=******";
try
{
_Conn = new SqlCeConnection(strConn);
string strSQL = "SELECT username, "
+ "password "
+ "FROM tbl_data "
+ "ORDER BY username";
_DataSet = new DataSet();
_DataAdapterTitles = new SqlCeDataAdapter(strSQL, _Conn);
_DataAdapterTitles.Fill(_DataSet, "tbl_data");
}
catch (Exception ex)
{
string msg = ex.Message.ToString();
MessageBox.Show(msg, "Unable to retrieve data.",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
public void LoadList()
{
DataTable dtable = _DataSet.Tables["tbl_data"];
listView1.Items.Clear();
for (int i = 0; i < dtable.Rows.Count; i++)
{
DataRow drow = dtable.Rows[i];
if (drow.RowState != DataRowState.Deleted)
{
ListViewItem lvi = new ListViewItem(drow["username"].ToString());
lvi.SubItems.Add(drow["password"].ToString());
listView1.Items.Add(lvi);
}
}
}
}
}
Form1.Designer.cs
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlServerCe;
using System.Security.Cryptography;
using Microsoft.Win32;
namespace keyFortress
{
partial class Form1
{
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.listView1 = new System.Windows.Forms.ListView();
this.SuspendLayout();
this.listView1.Location = new System.Drawing.Point(12, 28);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(131, 167);
this.listView1.TabIndex = 0;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = View.Details;
this.listView1.LabelEdit = true;
this.listView1.AllowColumnReorder = true;
this.listView1.CheckBoxes = false;
this.listView1.FullRowSelect = true;
this.listView1.MultiSelect = false;
this.listView1.GridLines = false;
this.listView1.Columns.Add("username", -2, HorizontalAlignment.Left);
this.listView1.Columns.Add("password", -2, HorizontalAlignment.Left);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 264);
this.Controls.Add(this.listView1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ListView listView1;
}
}
When I compile this I get the following error:
The name 'listView1' does not exist in the current context, this appears twice:
listView1.Items.Clear();
listView1.Items.Add(lvi);
Can anybody tell what the problems is?
Many thanks
modified on Wednesday, March 25, 2009 10:52 AM
|
|
|
|
|
The problem is that you have never instancized (whatever you spell this word :P) it.
In order to use the listView1, you have to call the InitializeComponents() function, do this in the constructor of lView:
public lView()
{
InitializeComponents();
{
And it should work.
|
|
|
|