|
Yeh, i have searched the Google and codeproject but the demo project in codeproject is not working . Regarding the documentation it is showing to use the firebird database . then i need to change all the code, that's the problem.
|
|
|
|
|
Hello,
Can i print a doc or pdf file with a default printer witch a knew his name? thank you verry mutch.
|
|
|
|
|
abbd wrote:
Can i print a doc or pdf file with a default printer witch a knew his name?
Yes.
(use Google for more information)
Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|
|
abbd wrote: Can i print a doc or pdf file with a default printer witch a knew his name?
Oh please go ahead. No need to ask.
Yes if you have a printer and paper. And correct connections. Hey! what does this has to do with C#?
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
i would print automatically with my application, thank you verry mutch.
|
|
|
|
|
I do not know whether to use the POSTSCRIPT, I have a virtual printer that is installed, I want to construct a an interface to print the pdf file by this virtual printer, help me please, thank you very much.
|
|
|
|
|
Yes, it certainly is possible to print with a predefined printer, no problem.
But what is your problem?
Is the problem printing the documents/pdf's?
Of is the problem to predefine a printer?
|
|
|
|
|
They are not a problem with printer or pdf, when we would print PDF we must open the pdf file and we click in file and print but i would print the pdf without open it with adobe, when i click on my program, he print the pdf, thank you verry mutch.
|
|
|
|
|
If I have a string "Mr P Smith" is there a way to split the string at the space characters into an array (like the 'explode' method in PHP)? To give:
tempString[0] = "Mr"
tempString[1] = "P"
tempString[2] = "Smith"
|
|
|
|
|
String.Split[^]
Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|
|
|
Hi
I am working with WindowsApplication in VS 2005.
I want create a UDP client server chat application...
I have a separate Client and Server class...
By default a WindowsApplication has Program.cs file which has a Main()....
I am not able to define a Main() either in Client or Server class...
It gives me an error stating:
Error 1 Program 'C:\Documents and Settings\admin\My Documents\Visual Studio 2005\Projects\WindowsApplication11\WindowsApplication11\obj\Debug\WindowsApplication11.exe' has more than one entry point defined:
What should i do for this?Please explain me this
Thanks for any help in advance.
modified on Friday, February 20, 2009 10:56 AM
|
|
|
|
|
So, do you have a solution with two executable projects in it? I suspect the error message is telling you exactly the problem.
Also, you are aware the UDP is a hopelessly unreliable protocol and you'll need to develop your own error checking if you don't want your messages going missing?
Regards,
Rob Philpott.
|
|
|
|
|
Sounds like the message is correct - suspect a pasted example that has its own main (???)
And I wouldn't go so far as "hopelessly" unreliable. There are times when UDP can be implemented with the same reliability as TCP - at least I "hope" so, or I might have to go back to the basement where I belong before I get to much farther along in my current project (see post above).
---------------------------------------------
Help... I'm embedded and I can't get out!
If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler
|
|
|
|
|
Hi, i'm practicing with c# - c++ dll integration. I reached my first goal, that was to make the c# and c++ sides share a simple struct. This is what i did:
c++ side (NANUReader.dll)
--------------
typedef struct NANUINFO{
int a;
int b;
char* s;
double d;
}NANUINFO;
__declspec(dllexport) void callMe(NANUINFO* info){
info->a = 1;
info->b = 2;
info->s = "hellooo";
info->d = 5.57684;
}
c# side
-------------
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)]
struct NANUinfo
{
int a;
int b;
string s;
double d;
}
[System.Runtime.InteropServices.DllImport("NANUReader.dll")]
static extern void callMe(ref NANUinfo info);
void callDLLFuntion(){
NANUinfo info = new NANUinfo();
callMe(ref info);
--here info has been filled by the dll--
}
This worked.
Now i would find a way to pass the dll a reference to some sort of empty dynamic collection (like an empty List<nanuinfo>) and make the dll populate it with an unpredictable number of NANUinfo structs. In other words, in the c# side i need something like this:
void callDLLFuntion(){
SomeCollectionType<nanuinfo> infoCollection = new SomeCollectionType<nanuinfo>();
callMe(ref infoColletion);
--here infocollection should be full of NANUinfo structs--
}
I don't even know if this can be achieved. Any help?
Thanks
|
|
|
|
|
bonjour tout le monde
i'am doing pc oscilloscope usb(sine wave) using c#...it's a big headache to me.does anyone know where i could find an example of c# coding(or if someone has done this befor for a help).thanks for your help
|
|
|
|
|
|
I am using the code shown below to allow the user to click on a listview item and display a file associated with the item clicked.
However, It is failing at the indicated line because users are still holding down the mouse button while changing the listview selection via the keyboard arrow keys.
How can I prevent this from happening please?
void diaryListView_MouseUp(object sender, MouseEventArgs e)
{
int selectedSubItem =
this.GetSubItem(this.diaryListView, new Point(e.X, e.Y));
if (selectedSubItem != -1)
{
ListViewItem lvItem = diaryListView.SelectedItems[0]; *** FAILS HERE ***
var file = lvItem.SubItems[14].Text.ToString();
if (selectedSubItem == 0 & lvItem.SubItems[14].Text.ToString().Length > 0)
{
viewFile(file);
}
}
}
public struct RECT
{
public int Left;
public int Top;
public int Right;
public int Bottom;
}
[DllImport("user32.dll")]
private extern static int SendMessage(
IntPtr hWnd, int wMsg, int wParam, ref RECT lParam);
public int GetSubItem(ListView lv, Point pt)
{
const int LVM_FIRST = 0X1000;
const int LVM_GETSUBITEMRECT = LVM_FIRST + 56;
const int LVIR_BOUNDS = 0;
ListViewItem.ListViewSubItem subItem = null;
int subItemIDX = -1;
RECT lviRect;
ListViewItem lvi = lv.GetItemAt(pt.X, pt.Y);
if (lvi == null && lv.SelectedItems.Count > 0)
lvi = lv.SelectedItems[0];
if (lvi != null)
{
int sendMessageVal = 0;
for (int i = 1; i < lvi.SubItems.Count; i++) {
subItem = lvi.SubItems[i];
lviRect = new RECT();
lviRect.Top = i;
lviRect.Left = LVIR_BOUNDS;
sendMessageVal =
SendMessage(lv.Handle,
LVM_GETSUBITEMRECT,
lvi.Index,
ref lviRect);
if (pt.X < lviRect.Left)
{
subItem = lvi.SubItems[0];
subItemIDX = 0;
break;
}
else if (pt.X >= lviRect.Left & pt.X <= lviRect.Right) {
subItemIDX = i;
break;
}
else
subItem = null;
}
}
if (subItem == null || lvi == null)
subItemIDX = -1;
return subItemIDX;
}</remarks></returns></summary>
modified on Friday, February 20, 2009 8:27 AM
|
|
|
|
|
kanchoette wrote: It is failing
isn't very descriptive; can you describe how it's failing?
Without that here are some comments anyway:
* why subscribe to the mouse up handler for this? like you said that will completely ignore the user hitting up and down on the keyboard. subscribing to diaryListView.SelectedIndexChanged would notify you any time the selection changes regardless of how the user made it happen.
* GetSubItem ? Why bother with this function? you're ignoring the index that was actually clicked and using zero instead, so why not just check if (diaryListView.SelectedItems.Count > 0) instead of if (selectedSubItem != -1) ?
* var file = lvItem.SubItems[14].Text.ToString(); -- what is this? Text is a string, then ToString() converts it to another string even though it already is one and then it's stored in a var even though you've jumped through hoops to ensure it's a string. Why? and why is it repeated in the conditional on the next line?
|
|
|
|
|
I fixed it by adding the top if statement
if (diaryListView.SelectedItems.Count > 0)
{
ListViewItem lvItem = diaryListView.SelectedItems[0];
var file = lvItem.SubItems[14].Text.ToString();
if (selectedSubItem == 0 & lvItem.SubItems[14].Text.ToString().Length > 0)
{
viewFile(file);
}
}
|
|
|
|
|
Hi, how can i create or delete a table in MsAccess using c# and Microsoft.Jet.OLEDB.4.0?
ty very much
Alessio
|
|
|
|
|
What are you having problems with? You need to call a command that executes a 'create' or 'drop' statement on the access database - have you written any code to do this?
It definitely isn't definatley
|
|
|
|
|
Bad Moon_Stick! Didn't you know that you've entered into A Contract with Legion the moment you helped someone? You are now required to write the homework for anyone who asks.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Ah crap - I wish I'd know that earlier!!
Sometimes it almost seems like it'd be better if I didn't try and help at all - it really does annoy me!!
It definitely isn't definatley
|
|
|
|
|
DataTable tabella = new DataTable("letturair");
DataColumn colonna;
DataRow righe;
OleDbCommand comando;
OleDbDataAdapter adattatore;
colonna = new DataColumn();
colonna.DataType = System.Type.GetType("System.String");
colonna.ColumnName = "CODICE";
tabella.Columns.Add(colonna);
string nomeColonna;
for (int i=1; i<=Convert.ToInt32(tbNumeroQuesiti.Text); i++)
{
nomeColonna="R"+Convert.ToString(i);
tabella.Columns.Add(nomeColonna, typeof(String));
}
....and now? how can i create my table in a Access document?
ty very much
|
|
|
|