|
Hi,
Use interop to access the twain com object for this purpose:
[DllImport("twain_32.dll", EntryPoint="#1")]
If you want me to create a tutorial walking you through the process of using this technique, please send me a note through the website: www.KYNOU.com
I hoped I helped
|
|
|
|
|
Does anyone know if there exists a decent API that allows wrapping of the most common GUI APIs?
I'm not very comfortable with WinForms, but I can't switch to WPF yet. I'm considering writing my own widget system, or using wx.NET, but either way I'd like to keep as much of my code as possible - regardless of the underlying API.
The wrapper should have functionality for analyzing a WinForms designer.cs file and creating a common format XML file from it (preferrably XAML-oriented).
|
|
|
|
|
|
You mean as an intermediate description format? Yes, MyXAML would probably work. But I hope to find a wrapper that can act as a proxy API for (the most common features of) any GUI system.
I.e., when I create a ProxyAPI.Button, a button from the selected provider API will be created (be it WinForms, wx.NET, CEGUI, WPF or whatever).
|
|
|
|
|
Why not show "+" in TreeList?
My code:
TLNode tln1 = new TLNode(1, treeList1.Nodes, "name1", "123"); Ok!
treeList1.Nodes.Add(tln1);
TLNode tln2 = new TLNode(2, treeList1.Nodes, "name2", "123"); Ok!
treeList1.Nodes.Add(tln2);
TLNode tln3 = new TLNode(3, treeList1.Nodes[0].Nodes, "name3", "123"); not show
treeList1.Nodes[0].Nodes.Add(tln3);
TLNode tln4 = new TLNode(4, treeList1.Nodes[0].Nodes, "name4", "123"); not show
treeList1.Nodes[0].Nodes.Add(tln4);
public class TLNode : TreeListNode
{
String Title;
String Url;
public TLNode(int id, TreeListNodes owner, String title, String url) : base(id, owner)
{
Title = title;
Url = url;
}
...
}
Please help.
|
|
|
|
|
try inserting to the tln1 the tln3 and 4, and not to the treelist...
eg.
TLNode tln1 = .....
...
...
tln1.Nodes.Add(tln3)...
...
|
|
|
|
|
This code don't show all item
TLNode tln1 = new TLNode(1, treeList1.Nodes, "name1", "123");
TLNode tln2 = new TLNode(2, tln1.Nodes, "name2", "123");
tln1.Nodes.Add(tln2);
// treeList1.Nodes.Add(tln1);
TLNode tln3 = new TLNode(3, tln1.Nodes, "name3", "123");
tln1.Nodes.Add(tln3);
TLNode tln4 = new TLNode(4, tln1.Nodes, "name4", "123");
tln1.Nodes.Add(tln4);
And this code show 1 item "name1", and "+" don't show.
TLNode tln1 = new TLNode(1, treeList1.Nodes, "name1", "123");
TLNode tln2 = new TLNode(2, tln1.Nodes, "name2", "123");
tln1.Nodes.Add(tln2);
treeList1.Nodes.Add(tln1);
TLNode tln3 = new TLNode(3, tln1.Nodes, "name3", "123");
tln1.Nodes.Add(tln3);
TLNode tln4 = new TLNode(4, tln1.Nodes, "name4", "123");
tln1.Nodes.Add(tln4);
My be write same code for me, please. I don't know how to do this.
I have VS 2005 + MSDN(+DevExpress) but i am russin. My english is weak(feeble).
Thank you ever so much.
-- modified at 14:10 Saturday 20th May, 2006
|
|
|
|
|
May be my class have error?
public class TLNode : TreeListNode
{
String Title;
String Url;
public TLNode(int id, TreeListNodes owner, String title, String url) : base(id, owner)
{
Title = title;
Url = url;
}
public override string GetDisplayText(object columnID)
{
return Title;
}
public override void SetValue(object columnID, object val)
{
DevExpress.XtraTreeList.Columns.TreeListColumn id = (DevExpress.XtraTreeList.Columns.TreeListColumn)columnID;
switch (id.AbsoluteIndex)
{
case 0:
val = Title;
break;
}
}
public override object GetValue(object columnID)
{
DevExpress.XtraTreeList.Columns.TreeListColumn id = (DevExpress.XtraTreeList.Columns.TreeListColumn)columnID;
switch (id.AbsoluteIndex)
{
case 0:
return Title;
default:
return "";
}
}
}
SetValue have stop point and debuger don't go in this metod after end edit.
May by this is error?
|
|
|
|
|
Hi,
I want to show date format in VS.Net C# default control like this
Day-Month-Year Hours:Minutes AM|PM
i set the control property on custom and add this text to custom format
like this dd-MM-yyyy HH:mm AM/PM but is show values like this
20-05-2006 6:25 A.5/P.5. Please tell me how i solve this problem.
thanks
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
Well, as far as I know, a time with the format HH:mm will give you time in 24-hour format, like 20:05 for example for 08:05 PM. It looks like the M of AM and PM is mistakenly perceived as the M of month. Try putting hh:mm and see what happens. That's all i can think of from the information you gave.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
datetime.Tostring (a , b) ;
a and b change output string to
mm-dd-yy hh:mm:ss
and ....
|
|
|
|
|
dd-MM-yyyy hh:mm tt
For more info about custom date/time format strings take a look at here[^].
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
Hi All
I want to add a shortcut of an exe on IE explorer standard button toolbar programmatically using c#. Please help me if any one has any idea to do this task.
Thanks in advance.
Amit
|
|
|
|
|
hi
iam new to c# can any one help me how to connect a tool strip progress bar to a webbrowser similar to internet explorer or other browsers.
thank you
|
|
|
|
|
Microsoft has launched Express Editions.
After download and install you have the opportunity to download their "Build a Program NOW" pdf document.
This document will give you a walkthrough in Chapter 6
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Hi all,
I want to convert html files into text file but i need efficient method for it coz i need to convert about 500 documents each time. currently i m using this code to convert it.....
string temp = null;
StreamReader sr = new StreamReader(path);
temp = sr.ReadToEnd();
temp = Regex.Replace(temp, "<[^>]*>", " ");
sr.Close();
StreamWriter sw = new StreamWriter(newpath,false);
sw.WriteLine(temp);
sw.Flush();
sw.Close();
well this is very efficient and fast method but the problem m having with this is that it is removing the symbols like ([,],<,>) and all other of this sort......but it is not removing actual tags like (html, class, table ) etc....so plz tell wat shud i do to remove these
looking forward for help
Regards,
|
|
|
|
|
hi,
You can follow a simple logic in this case. When you encounter a "<" symbol note the index of this first ocurrence. Then until you get the proper ">" symbol, parse the string, when you get the symbol, just remove string from the index you noted first and the new index for ">". This logic may be inefficient but its the simplest one. To tweak your performance use StringBuilder instead of string. And one reason for this logic to work is that HTML also parses the text in this manner to render the output, so if the html file is displayed fine in a browser then the above logic will work in any case.
Tell me if it works. I would like to know that.
Anant Y. Kulkarni
|
|
|
|
|
Hi Sir, i will surely try this logic.....but tell me that wots the difference between string class and stringbuilder class and how it effects the efficiency of the program.....
Looking forward for help
Regards,
|
|
|
|
|
Hi,
string is immutable. That means for each operation that you perform on a string a new string object needs to be created and the result of the operations are stored in this new object. Immutable means unchangable. And thats why it is recomended to use StringBuilder class in .Net if frequent string operations are needed to be performed.
To know more about it try searching msdn.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
Rizwan, see this[^] article, specifically the removeHtml() method.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
hi
i have 2 tables (Aparteman,ApartmanDetails) that i want to relate these together.when i create a function as follow :
private void CreateRelation()
{
//ds_Apartman1.Clear();
oleDbDataAdapter1.Fill(ds_Apartman1, "Aparteman");
oleDbDataAdapter2.Fill(ds_Apartman1, "ApartmanDetail");
DataRelation datarelation1;
DataColumn datacolumn1;
DataColumn datacolumn2;
datacolumn1 = ds_Apartman1.Tables["Aparteman"].Columns["id"];
datacolumn2 = ds_Apartman1.Tables["ApartmanDetail"].Columns["id_apartman"];
datarelation1 = new DataRelation("detail", datacolumn1, datacolumn2);
ds_Apartman1.Relations.Add(datarelation1);
//dataGridView1.DataSource = ds_Apartman1.DefaultViewManager;
//dataGridView1.DataMember = "Aparteman";
}
and run it from a button , only table of Aparteman show and don't show ApartmanDetail table.
Please help that how to solve my problem ??
|
|
|
|
|
hi all,i need a messagebox with yes or no buttons without using either script languages or popupwindow and i should able to catch the user input(ie.yes or no)
ayyp
|
|
|
|
|
Use the JavaScript-s prompt() function.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
i need this msgbox without using any script languages and popupwindows is it possible?
ayyp
|
|
|
|
|
No, I don't think it's possible simply because ASP.NET cannot run code on your machine. It is possible however to create a custom control that will have some javascript code in to launch a messagebox-like box. There are some nice articles about such controls on this website, check them out and see if they fit your need.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|