|
Sorry, I missed what you were getting at.
tab.index = new string[length];
for(int i=0; i<length; i++)
{
tab.index[i] = "";
}
Your class does not have a constructor (so C# will create a default one for you) perhaps you should consider creating one in order to initialise the fields properly.
Also, you may want to consider making your fields private or protected and exposing them through properties. See this article[^] for some good reasons to use properties.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
-- modified at 5:12 Wednesday 21st December, 2005
|
|
|
|
|
I have solved in this way:
struct_db mystruct = new struct_db();
public struct str1{
public string nome;
public string lunghezza;
public string tipo;
}
public class tab{
public string nometab;
public str1[] fields;
public string[] index;
public string[] procedure;
public tab(){
fields = new str1[100];
index = new string[100];
procedure = new string[100];
}
}
public class struct_db{
public int count;
public tab[] tabs;
public struct_db(){
tabs = new tab[100];
for (int i = 0;i < 100;i++)
tabs[i] = new tab();
}
now work properly...
|
|
|
|
|
Hi,
I'm quite new to C# and I have been fiddling around with a little problem for some time now.
I have a form with a PrintPreviewControl on it. I also have a RichTextBox on the same form. Now, I want to update the PrintPreviewControl contents whenever I type something in the RichTextBox. As far as I can see, the PrintPreview is only updated when it is created (it seems the creation of the PrintPreviewControl fires the PrintPage event with the previewers graphics context). My question is, how can I update the PrintPreviewControl on demand?
Thank!
Regards,
Lars
|
|
|
|
|
Hi frend!
1 begginer saying to another:
this.TextBox1.TextChanged
then put ur PrintPreviewControl code inside this:
TextBox1_TextChanged
just a though...then again I could be wrong
Aim small, miss small...
|
|
|
|
|
tatchung,
My problem is not how to handle events, but how to access the PrintPreviewControls graphics context on demand. The graphics context is part of the PrintPageEventArgs which is automatically passed to the PrintPage event handler upon creation of the PrintPreviewControl.
Regards,
Lars
|
|
|
|
|
Hi,
i have to create a graphics application in c3 which should draw lines when an user-defined event is triggered...
Plz help me in creating this application in codes.........
Thanx
|
|
|
|
|
You can use the Graphics.DrawLine function.The function takes System.Drawing.pen object to determine color and width and the coordinates as parmaters.
Hope this help.
|
|
|
|
|
thanx bassam...
I have found it right....
|
|
|
|
|
Dear All,
I am calling AcceptChanges in DataTable after adding some rows to the datatable, but that is not affecting the row status.
Please let me know what are the conditions, when the Acceptchange will not take affect.
thanks in advance
Contact him at: hasansheik@hotmail.com
hasansheik@yahoo.co.in
hasansheik@lycos.com
Contact him at: hasansheik@hotmail.com
hasansheik@yahoo.co.in
hasansheik@lycos.com
|
|
|
|
|
Hi Guys I'm still new in development,I need a C# code to scan a document & to save it to the DB pls help..
|
|
|
|
|
Dear All,
I am calling AcceptChanges in DataTable after adding some rows to the datatable, but that is not affecting the row status.
Please let me know what are the conditions, when the Acceptchange will not take affect.
thanks in advance
Contact him at: hasansheik@hotmail.com
hasansheik@yahoo.co.in
hasansheik@lycos.com
|
|
|
|
|
If you use binding you have to call EndCurrentEdit method
BindingManagerBase bmText = this.BindingContext[textBox1];
bmText.EndCurrentEdit();
DevIntelligence.com - My blog for .Net Developers
|
|
|
|
|
Hello !
I am developing a Windows base application in Visual Studio 2003 by using C# as a language i am using Datagrid Control I have two problems one in Datagrid and one in application can anyone resolve it????
(1). I want when a user clicks any column of datagrid a whole row of selected column must be selected how is it possible ??
(2). When I run application it also shows Taskbar of the System i don't want to show this taskbar I want to show application in full screen of Monitor without any Taskbar
U can also email me the solution at my email address abubakar.malik@gmail.com
Regards,
Abubakar
|
|
|
|
|
I need to develop a system that can transfer data from 1 pc to another pc using dialup because the user dont want use any FTP service.. so i cannot use any isp services
so i think i need to create a service at one side that can accept called from another side and get the transaction and stop the connection...
and i need to create i utlity that can dialup and get data and disconnect..
2 utility 1 dialup and 1 accept call..
how do transfer this to my coding any example or source that i can use.. in c#...
or is there any otherway for me to settle this issue.
thanks
|
|
|
|
|
I have a case which i run the sql statement from my c# application..
becasue the query is big and dont have indexed on the table sometimes i got the timeout error
how so i set the timeout period..
i cannot change the database structure cause is it in use and they dont do want to make any changes to it..
any sugesstion..
|
|
|
|
|
Try this.
Set the 'CommandTimeOut' of the Connection and the SQLCommand object you r using to execute the sql to 0 (Zero)
Rohitha M.Hewa
Senior IT Executive
Naturub Group of Companies - Sri Lanka
|
|
|
|
|
That is dangerous because the application will block until SQL Server returns the answer. You should always put an acceptable upper limit so that control will eventually return to the application.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
I use crystal reports 9 as my reporting tool for my c# applications. For the reports which I need some kind of processing (calulations etc..) what I do is do all the processing in C# code and pass a data set to the 'SetDataSouce' method of the ReportDocument object in c# code where I call the report (I am using crystal report engine to call the reports in my c# application and to pass the paramenter fields, to set the selection formula etc.. at runtime)
This mechanism works fine in the computer where I develop my application. But once I make a setup package in install the application in a user machine (I installed MDAC7, .Net 1.1 framework, Crystal reports 9 and then my setup package in the user machine) the report does not show any data.
I user visual studio 2003. .net framework 1.1
Pls help me...
Thanks
Rohitha M.Hewa
Senior IT Executive
Naturub Group of Companies - Sri Lanka
|
|
|
|
|
Hi,
I am working with C# web forms. I want to send a copy of all the aspx files to another folder after the project complied. Do you have any idea?
Thanks and Regards!
|
|
|
|
|
To copy a site, you also need to copy the binary, and to reset the folder in IIS.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi,
Can you tell me in more details.
Thanks!
|
|
|
|
|
Hi,
That is good. Can you please tell me in more details.
|
|
|
|
|
What do you need to know ? Do you know how to use IIS ? Do you know what IIS is, or has the IDE just set that stuff up for you ? Or are you using one of the newer versions with a web server built in ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi friends,
I wish to create a playing kit for kids ..
One of it includes, to design many boxes like what we have for "Match the following" in our academics....
In Box1---B,F,L,P,D...(jumbled alphabets)
In box2---Lamb,Dog,Box,Fish,Peacock...(many words as match for the jumbled alphas)..
Kids have to match the alphabet to the right word using a line drawn when they drag items and match as wat we do in defining relationship diagram ib Access....
Could anyone help me in doing this?
Thanx.....
|
|
|
|
|
If you look for Doodle, you'll find a GDI+ paint program I wrote here on CP. It shows how to do a line drawing tool, which is basically what you're talking about.
Christian Graus - Microsoft MVP - C++
|
|
|
|