|
The problem is that these message boxes are not connected to the log. Try listing both names at the time that you log your error message so that you can see exactly which path is being complained of. It may be that there is a bug somewhere in the code that is corrupting a path. Also please post the details in your message here on the forum rather than linking to some external site. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Ok well, I guess I am on my own on this one cause you seem to be a jackass cause my logs and pictures arent together and on a different website. If you would click on the first thread you would see that the log is there. Nice to see that someone wont give me a decent answer for some retarded reason...
|
|
|
|
|
ub3rst4r wrote: you seem to be a jackass
ub3rst4r wrote: for some retarded reason.
I made a perfectly reasonable request to you for some consistent information, and you respond with these insults. Hardly the way to encourage people, who freely give their own time, to offer to help you in the future.txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
There exist two table in DB, one contains the number of sets purchased, second contain sets send/delivered to customer.
there is a form on which i am showing details of sets i.e how much available in stocks.
DataTable dt = cINI.GetDataTable("Select [sName],[sPrice] from [sSet] Order By [sName]");
foreach (DataRow dr in dt.Rows)
{
ListViewItem lvItem;
lvItem = lvSets.Items.Add(dr["sName"].ToString());
lvItem.SubItems.Add(dr["sPrice"].ToString());
object inStock = cINI.ExcuteSQLScalar("Select Sum(mQuantity) from [mPurchase] where [mName] = '" + dr["sName"].ToString() + "'");
object sendSet = cINI.ExcuteSQLScalar("Select Sum(Quantity) from [SendSet] where [setName] = '" + dr["sName"].ToString() + "'");
if (inStock != DBNull.Value && sendSet != DBNull.Value)
lvItem.SubItems.Add( (Convert.ToInt32(inStock) - Convert.ToInt32(sendSet)).ToString());
}
Is there any other way to acheive this?
As its taking 4-5 seconds in showing up.
regards
|
|
|
|
|
You coud load table in Background thread.
How big is your database, and is it local or Remote, And is it Sql or accsess?
|
|
|
|
|
Saksida Bojan wrote: You coud load table in Background thread.
Need help on this, as no idea
Saksida Bojan wrote: How big is your database, and is it local or Remote, And is it Sql or accsess?
it's daily order booking, so eventually it will grow by day.
Its local, can be used on LAN. It is access.
|
|
|
|
|
Hum Dum wrote: Need help on this, as no idea Frown
Beginners Guide To Threading In .NET Part 1 of n[^]
If you use this approach. Data to be populated will still need 4-5 second, but it will not prevent UI from showing.
ps: I do not know where i read about foreach, but it is not recomended in some case. it is better to use for loop. It is said each loop will always recalculate how many it has
|
|
|
|
|
Saksida Bojan wrote: it is better to use for loop
No difference. Both takes same time.
|
|
|
|
|
Now i remeber where i read it. it was stream read using while(!reader.EOF) it is completly diffrent thing
|
|
|
|
|
I can think of two things you might try:
1. Instead of creating and executing the Sum(Quantity) queries every time through the loop, create them once as prepared statements then simply set the parameters each time. That should reduce the amount of work the database has to do and it should go noticeably faster for relatively little code changes.
2. Depending on how strong your SQL skills are, you could combine the queries together into a single query which gives you the data you need all in one go. That way, the database is doing the work of joining the tables together which you are currently doing in your foreach loop, and databases are designed to do that sort of thing efficiently.
|
|
|
|
|
my problem is like this
i have two different application like on-screen keyboard and excel sheet
in my problem i have:
1st application: form with number buttons.
2nd application: few forms with many texboxes in each.
now i need to fill those text boxes with number using 1st application
i want to how will 1st application know which text box of which form is having cursor and how will it send the data to it. i think it require knowledge of win32 api calls and all. which i very little idea. can u help me out in this .
thanks in advance
|
|
|
|
|
|
Hi,
Is there any sample code (C#, VC++) for parental control provided by Windows (XP/VISTA/Windows 7) to extend them and write our own parental control in .Net with all features provided by Win 7.
|
|
|
|
|
If you're still interested in this please contact me
I am trying to build a team to work on C# parental control software
pascal 2007 at ganaye dot com
|
|
|
|
|
Hi,
I need to send and read sms throw my PDA (WM5.0).
Can you help me with an example?
Thanks.
|
|
|
|
|
|
Hi,
I am using the code below to generate a 10 by 10 matrix
I can run it through the main and console application. If I wanted to create a class how would refer to the class? What would be the simple code to create a new instance of the class and run the Generate() method? Would it be random.Generate()?
public static void Generate()
{
//Declaring Array
int [,]Arry=new int[10,10];
//Random Class
Random random = new Random();
string str = string.Empty;
//Loop ith element
for (int i=0; i<10; i++)
{
//loop jth element
for (int j = 0; j < 10; j++)
{
//get random number between 1 and 1000
Arry[i, j] = random.Next(1, 1000);
//printing elements a00,a01,a02....
Console.Write(Arry[i, j].ToString()+" ");
}
Console.WriteLine();
}
Console.Read();
|
|
|
|
|
Iman Mohtashemi wrote: What would be the simple code to create a new instance of the class and run the Generate() method
If you wanna use it as static so that you will not create instance of a class, the best option is to return a value as Arry[][]. But there is no problem if you want it to print to console. Also in my experience both are very simple tu use as long as you know witch one is better suited in witch senario
Iman Mohtashemi wrote: Would it be random.Generate()?
No, It woudn't be. it would be: ClassName.Generate()
|
|
|
|
|
I think you need to get a beginner's book on c#/.NET
But here you go.
public class MyClass
{
static Random s_random = new Random();
public int[,] IntArray = new int[10,10];
public MyClass()
{
for(int x = 0; x< 10; x++)
{
for(int y = 0; y < 10; y++)
{
IntArray[x, y] = random.Next(1, 1000);
}
}
}
public override string ToString ()
{
StringBuilder sb = new StringBuilder();
for(int x = 0; x< 10; x++)
{
for(int y = 0; y < 10; y++)
{
if(y>1)
sb.Append(", ");
sb.Append(IntArray[x, y].ToString());
}
sb.Append(Environment.NewLine);
}
}
}
public static void Generate()
{
MyClass array = new MyClass();
Console.Write(array.ToString())
} Opacity, the new Transparency.
|
|
|
|
|
I want to know that if we want to insert a second video while playing first video (eg. a news strip while broadcasting video seen in the channels). How would i do that?
There are two type of ads.
1) Strip scrolling at the bottom of screen
2) L shaped ad.
Any help will be appreciated...
|
|
|
|
|
Process each frame and compose the new frame as necessary (e.g., overly an ad over the video). Add the processed frames to the output video.
|
|
|
|
|
Can You please elaborate. You may take me a complete noob in the world of C#. But i have to advise/supervise this project in detail...
Can you refer me to some article or somewhat a sample (code will be appreciated) for this.
Thanks
|
|
|
|
|
I gave you the high level solution. Break the problem down into smaller components and try to solve each of them yourself. If you have trouble, then come back here and ask another question. And by "here", I mean "Code Project", not this specific question... any new question should be asked as a new question, not as a reply to this post. Here is an example of how you might break it down:
1) A video is composed of frames.
2) Each frame is an image.
3) Images can be modified, such as by adding an overlay.
4) The overlay will be another image or video.
5) If a video, each frame is composed of an image (see item #2).
6) If an image, just overlap that image on the frame image.
7) You will need some means of indicating transparency.
8) You will need some means of recombining the frames you create into a new video.
9) You will want to keep the audio from the first video.
I imagine Google will help with a lot of that.
|
|
|
|
|
why is it that when i click the Close (X) button in my windows form the window just closes and but the application does not exit. help help. it doesn't have any event. can i override any method concerning that.?
|
|
|
|
|
a WinForm app will exit when you somehow close the main form (typically the one passed to Application.Run) provided there are no busy foreground threads anymore, so if you started extra treads (Thread, ThreadPool, BackgroundWorker, ...) they should either be flagged IsBackground=true or somehow terminate.
That is exactly what background means: not prohibiting app exit.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|