|
Let's take an example. If your destination directory is named DirA and it already contains a file named AnyFile.txt. When you transfer a newer version of this file (for example by greater timestamp), what would you like the directory to contain?
\DirA\AnyFile.txt (<- older version)
\dirA\???
Mika
|
|
|
|
|
Hi,
Currently I have developed a service.It is working fine.
Now I want to Implement thread synchronization using Mutex.
Iam very new to threading concept..I unable to do that
Kindly help me in doing the same
|
|
|
|
|
balu12345 wrote: Implement thread synchronization using Mutex.
If it's just a single service, why Mutex ? You shoud read the basic concepts from here[^]
|
|
|
|
|
hi,
Thanks for your reply...
I want to make single instance of my service working at any time....there should not be any multiple instance........
This threading synchronization I have to apply on Programm.cs file or in my service class file..
Kindly tell me
|
|
|
|
|
I need to save font selected by user by Ctrl+MouseWheel in Winforms RichTextBox.
I tried override below but this does not remember font: in this method Font.Size property
seems to be always *initial* Font size when RichTextBox is created, *not* the font size set by ctrl+mouse wheel.
How to find the font size set by Ctrl+Mouse wheel ?
Andrus.
class MyRichTextBox : RichTextBox
{
protected override void OnMouseWheel(MouseEventArgs e)
{
base.OnMouseWheel(e);
Settings.Default.TextBoxFont = new SerializableFont(Font);
}
}
Andrus
|
|
|
|
|
Hi,
Ctrl+MouseWheel does not change the font. Instead it changes the ZoomFactor property of a RichTextBox.
Hope this helps,
Mika
|
|
|
|
|
Database: XML
Hi at all,
i use a Dataview to show the Data from a xml File. I have the following code to read the xml file:
dsAuthors.ReadXml(xmlFilePath, XmlReadMode.InferSchema);
this.dataGridView1.DataMember = "Document";
custDV = dsAuthors.Tables[0].DefaultView;
this.dataGridView1.DataSource = custDV;
if i use the rowfilter i see not the rows thye have empty cells.
Dataview.Rowfilter = "City = 'Berlin'";
does anybody know how can i avoid this effect. Or how can i avoid to set empty cells in dataview?
Thanks in Advance
Cola
|
|
|
|
|
Hi,
Do you mean that you don't see rows that do not have value for City-column? If that's the problem, modify your condition:
Dataview.Rowfilter = "City = 'Berlin' OR City IS NULL OR City = ''";
(if both NULL and empty strings should be returned)
Mika
|
|
|
|
|
Thanks,
thats a good idea.
Let me check it tomorrow.
Greetings
CoLa
|
|
|
|
|
You're welcome
Mika
|
|
|
|
|
it works not yet perfect. Let me explain.
I have 4 Records:
----------------------------
1| <city>Berlin
1| <street>Alex
1| <zipcode>10117
----------------------------
2| <city>Berlin
2| <zipcode>10117
----------------------------
3| <city>Paris
3| <street>LyonAvenue
3| <zipcode>90865
----------------------------
4| <city>Paris
4| <zipcode>90865
----------------------------
I want to display Record 1 + 2 at the same time.
Now i filter the Records where City = 'Berlin'
If i use the Statemnt
"City LIKE '%Berlin%'AND Street is null" Display Record 2
"City LIKE '%Berlin%'AND Street is not null" Display Record 1
"City LIKE '%Berlin%'OR Street is null" Display Record 2 + 4
Have you any idea?
Thanks in Advance
CoLa
|
|
|
|
|
Hi,
i have the Solution.
It was my mistake. I had the follwoing statement an this was false.
"City LIKE '%Berlin%'AND Street is not null AND Zipcode is not null"
the right statement in this case is:
"City LIKE '%Berlin%'AND Street LIKE 'Alex'" if i want to see all records with City = Berlin
i must use this Statement
"City LIKE '%Berlin%"
Thanks for your help.
CoLa
|
|
|
|
|
Yes, that's exactly correct. Glad this solved.
Mika
|
|
|
|
|
|
|
Hi, I have an image in memory as an RGB array, I need to make a fast copy of it?
I access the image in usafe mode using the following pointer byte* p = (byte*)(void*)pBuffer; I need another copy of the data so that I can create a new pointer to it and leave my origional data unaffected.
Thanks...
|
|
|
|
|
I guess you can use System.Runtime.Interop.Marshal.AllocHGlobal to do that. I wouldn't do this in managed code at all but I guess it should work.
led mike
|
|
|
|
|
SELECT product.name AS Name, product.modelNo AS [Model No], product.[desc] AS Description, category.categoryName AS Category,
product.MRSP AS MSRP, product.retailPrice AS [Retail Price], product.[image] AS Img
FROM (category INNER JOIN
product ON category.categoryID = product.categoryID)
When this is being showed on my datagrid, the retail price and msrp is not in currency format. How do i make it either adding a $ sign infront OR having it to be 2 decimal place
|
|
|
|
|
This has nothing to do with your SQL query. You need to learn how to use the datagrid specifically how to format things. I suggest you find some beginner articles about using the DataGrid. I imagine there are some here on CodeProject. If you are trying to use the ASP.NET DataGrid you might also want to check out the DataGrid Girl's web site.
http://www.datagridgirl.com/[^]
led mike
|
|
|
|
|
Hello,
I wonder if it is possible to execute some lines of code, which are stored in a config-file, e.g. textfile.
I guess there is a way using Reflection, so could anyone give me a hint on where to start?
Thanks in advance.
|
|
|
|
|
buchstaben wrote: I guess there is a way using Reflection, so could anyone give me a hint on where to start?
This Article[^] might be as good a place to start as any
led mike
|
|
|
|
|
Hello,
I have several high-res (600dpi) TIFF files. I need to stitch these files together into one new high-res (600dpi) TIFF file. I got it working with the standard resolution (96dpi) but i can't get it to work with 400 or 600 dpi. Any help would be welcome!
This is the code i have so far:
Bitmap bmp = new Bitmap((int)imagewidth, (int)imageheight, PixelFormat.Format24bppRgb);
bmp.SetResolution(600, 600);
Graphics g = Graphics.FromImage(bmp);
int startpoint = 0;
for (int x = 0; x < bands.Count; x++)
{
string file = bands[x].ToString();
Bitmap tmp = new Bitmap(file);
g.DrawImage(tmp, startpoint, 0, tmp.Width, tmp.Height);
startpoint = startpoint + tmp.Width;
}
bmp.Save("c:\\bands\\alltogeher.tif", ImageFormat.Tiff);
Thanks, Ben
|
|
|
|
|
bverp wrote: I got it working with the standard resolution (96dpi) but i can't get it to work with 400 or 600 dpi.
What is the error you are getting?
|
|
|
|
|
Parameter invalid. It doesn't say much about the error.
|
|
|
|
|
bverp wrote: Parameter invalid. It doesn't say much about the error.
Yeah, they are normally not very helpful in GDI+.
I suspect .NET does not support such large DPI on images.
|
|
|
|