|
Dear Sirs
i wrote a c# program for my self and i want install my program on the other computer. when i install this program the database file will appear obviusly and any one can delete or remove it. how i can make my database file hidden when i install it on other computers?
B.regards
Morteza
khkjhkh
|
|
|
|
|
Mortezaonline2004 wrote: how i can make my database file hidden when i install it on other computers?
Why hide the database file? If someone wants to remove it or delete it, it'll make your program not work and it would be their own fault
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
If you are using ACCESS database then u can protect it using password. If it is XML file then probably you can write encrypt and decrypt algorithm and store encrypted data in XML and later decrypt it. If somebody deletes the file then he can delete your application also. So nothing will work..
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
hi all,
is there any way to convert a xml file to pdf file ?
plz help...
thanks
|
|
|
|
|
Hi everyone,
how can I determine the length of a message in a named pipe? I am using the CreateFile API function to get the Handle to the named pipe and pass it to the FileStream constructor - I can read/write messages and even do async operations. The windows service (named pipe server) writes large XMLs (message) into the pipe. Right now I am using myFileStream.ReadByte() to read sigle bytes - pretty slow.
Is there any way to get the length of the message in a named pipe?
Thanks,
Olcay
|
|
|
|
|
I just bought a Tira IR receiver and I want to be able to use it with C#, but I havn't done much c++ coding before. Could somebody help me out with writing a c# dllimport function for this:
<br />
typedef int (__stdcall * tira_six_byte_cb) (const char * eventstring);<br />
extern "C" __stdcall int tira_set_handler ( tira_six_byte_cb cb );<br />
any help would be appreciated
Thanks
|
|
|
|
|
Hi Folks,
I have lengthy string and i splited string to char[]. But now i need to identify the char is numeric or alphabet char. If any body know plz share with me.
ranandbe
|
|
|
|
|
Use the Char.IsDigit and Char.IsLetter methods. You can use these on a string also, so you don't have to get the char array for that.
---
b { font-weight: normal; }
|
|
|
|
|
I am using this third party tool in my windows(C#) application.
PowerTools for .NET "SPREAD" from
Far Point Technologies.inc.
I am using grid in which cell type for one column is button.
Now problem with this button is ,button clicked event occures for both mouse buttons(i.e. with left as well as right button).
I want to ristrict the right button click event on this button.
Does any body has idea about this?
please let me know.
Sagar
|
|
|
|
|
I guess your best chance would be to ask the makers of the control what to do.
I strongly doubt that someone here even has the same control in use...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
i used it in my program. its langauge is my country's langauge but i need to change it to English.
need help.
thank
|
|
|
|
|
hi, i have a windows service and its has a config file app.config now what ever chages i have to do windows services is through this config file.now is there a way so that i can give a G.U.I to the config file. and chage the parameter of config file from the G.U.I.
if poosible can u provide me a small code if not u may just give me logic.
thanx.
|
|
|
|
|
1) Open file
2) Find XML Node
3) Update node and/or attribute
4) Save file
5) Close file.
only two letters away from being an asset
|
|
|
|
|
Hi,
I'm displaying my records in a datagrid.When I'm selecting a particular record,the I level(Parent Record is not been updated in the respective fields).Instead when I select the child table,I can be able to update the record.
Can anyone let me know the cause for this?
Thank you,
Sincerely,
Deepa!
|
|
|
|
|
could u be more specific about the problem?
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
|
Hi there,
I am new to the graphics section of C#.
I wanted to change the monochrome bitmap to byte array and send the pixel data to the serial thermal printer.
When i convert the bitmap to byte array, the first two byte i get is 13780 instead of 19778 (representation of BM as per bitmap specs). I used the following code as reference:
ImageData = ConvertImageToByteArray(bmp,System.Drawing.Imaging.ImageFormat.Png);
private static byte[] ConvertImageToByteArray(System.Drawing.Image imageToConvert,ImageFormat formatOfImage)
{
byte[] Ret;
using (MemoryStream ms = new MemoryStream())
{
imageToConvert.Save(ms,formatOfImage);
Ret = ms.ToArray();
}
return Ret;
}
if i call the above function as below
ImageData = ConvertImageToByteArray(bmp,System.Drawing.Imaging.ImageFormat.<b>Bmp</b>);
then all the byteArray is filled with 0;
What am i doing wrong? Or is there any other approach for doing this? Any solution and suggestion will be appreciated.
|
|
|
|
|
MacMohan wrote: the first two byte i get is 13780
How do you calculate that value?
---
b { font-weight: normal; }
|
|
|
|
|
I display the byteArray in the textbox.
|
|
|
|
|
Yes, but how do you turn the two first bytes into that value?
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Try using this code to copy the bytes form a bitmap to a byte array:
<br />
public byte Copy(Bitmap img)<br />
{<br />
BitmapData imgData = img.LockBits(new Rectangle(0, 0, img.Width, img.Height), ImageLockMode.ReadWrite, img.PixelFormat);<br />
IntPtr scan = imgData.Scan0;<br />
byte[] buffer = null;<br />
if (img.PixelFormat == PixelFormat.Format24bppRgb)<br />
buffer = new byte[img.Width * (img.Height / 3) * 3];<br />
else<br />
buffer = new byte[img.Width * (img.Height / 3) * 4];<br />
Marshal.Copy(scan, buffer, 0, buffer.Length);<br />
img.UnlockBits(imgData);<br />
return buffer;<br />
}<br />
<br />
Hope it helps<br />
Do your best to be the best
|
|
|
|
|
I am looking for a solution for intercepting or redirecting the STDOUT to a stream or in the end to a TextControl. For redirecting STDOUT of another process or Console.Out I found a lot of solutions, but that wasn't working with my problem.
In my scenario the C# application calls some functionality from an unmanaged DLL. The unmanaged function produce normally a lot of console output. My idea was to hide the console and redirect the STDOUT and perhaps the STDERR to a StringWriter and further to a multi line TextControl.
Setting a StringWriter via Console.SetOut only works for Console calls, but not for the unmanaged stuff from the DLLs.
After some more investigation I found the Win32 console functions likes SetStdHandler. Currently it seems to be the solution for my problem. But now I do not know, how to get a "FileHandle" from a StringWriter Stream and I do not want to use a FileStream for it.
Does anybody has an idea or knows another way of redirecting the STDOUT to a StringWriter or a TextControl?
Thanks in advance,
Lars
|
|
|
|
|
Have you looked at the System.Diagnostic.Process class? It has some methods on it to redirect standard output.
|
|
|
|
|
I believe System.Diagnostic.Process only lets you redirect the STDOUT of a child process. His parent process (C#) is running unmanaged code that writes to the console but not via Console.Out.
|
|
|
|
|
You are right on this. With System.Diagnostic.Process you can only read StandardError and StandardOutput and write to StandardInput of the child process, which System.Diagnostic.Process has started.
|
|
|
|