|
Look at the PrivateFontCollection class
|
|
|
|
|
i have some tables in pdf format that have to stored in arrays for my reference in project (c sharp)
now i have coverted those tables into excel sheet. Now my problem is how can i access the tables through c sharp (i am using studio 2003). i also converted the excel sheet into access database so that i can connect it to the project. is it possible ? if can i convert the table intries into integer arrays ?
|
|
|
|
|
You could do this two ways...either through connecting to excel file Excel on Connectionstrings.com[^] or through Office Interop...
Going the connection string route may be the easiest, but the Office Interop way is powerful but a bit too involved to post...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Like this i am now able to read the values, but i am now copying string to string. when i tried declaring s as int array and s = (int) ran.text, i am getting error
how can i convert the ran.text string to s int array
for(int row = 2; row< 12; row++) // loop through first 10 rows excel is
{
ran = (Excel.Range)Worksheet.Cells[row, 1];
s = (string) ran.Text;
MessageBox.Show(s);
}
|
|
|
|
|
s[i]= int.Parse((string)ran.Text);
this is working for me, i dont know whether it is correct type casting or not
|
|
|
|
|
How do i select which windows form opens 1st in a project?
I have a create, home, and track form and currently the home form opens first where i obviously want the create form to open 1st.
Thanks
|
|
|
|
|
You can change it in Program.cs file
|
|
|
|
|
|
You will see the code like that in Program.cs
<br />
[STAThread]<br />
static void Main()<br />
{<br />
Application.EnableVisualStyles();<br />
Application.SetCompatibleTextRenderingDefault(false);<br />
Application.Run(new Form1());<br />
}
So, change form1 to the form name you want.
eg:
<br />
[STAThread]<br />
static void Main()<br />
{<br />
Application.EnableVisualStyles();<br />
Application.SetCompatibleTextRenderingDefault(false);<br />
Application.Run(new FormThatIWantToShow());<br />
}
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Thanks
|
|
|
|
|
hello
I have a network that contains about 50 computers.then I want to connect to
one of this computers with it`s telnet . also i want to do this with c#.
please help me.
|
|
|
|
|
|
my application listens for socket connections. client can open socket connections and transmit messages. it connects to another server to get updates. each second my application get 300-400 data updates filters them and tranmits the updates to the connected clients same filterred 10 to 12 updates to each clients.
When 500 clients connected to my application its cpu use was 40-80% memory use 15 MB but after 3 hours I get windows error. some window apprears saying "This application encountered some problem needs to shut down. Sorry for the enconvience." Amazingly my app is running happyly no change in cpu and mem uses. When i close the error window it shuts my app.
This is a multithreaded application. I checked for deadlocks confident that there is none and .net 2 handles deadlock itself. Confident that there is no memory leaks. Application totally written in C#.
Can anybody help how to ger rid of this windows error?
|
|
|
|
|
shahidul.haq wrote: and .net 2 handles deadlock itself
How is .NET supposed to do that (generally)?
First thing to do is to find out the unhandled exception that's being thrown. Usually an unhandled exception is the reason for "This application encountered some problem...", but without the exception only looking into a crystal ball can help you.
Did you check the other properties of the process at runtime? GDI Handles and USER objects come to mind. When they're used and not disposed of correctly, the app will run out of handles after some time.
But once again: It's impossible to tell without seeing code.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I have a winApplication which has a form.
In that form I have a sql data adapter which contains 4 command for select,update,delete,insert.
When I execute insert command, with passing 9 parameters values, by use of executenonguery function I receive "procedure or function "procedure name" has too many argument specified" error massage at line of executing.
What should I do? I don't know what's happend there cause I check every parameters by breakpoint and saw that every parameters were passed!
|
|
|
|
|
#1. maybe, the parameters that you are sending from code are more than the actual parameters of stored procedure.
OR
#2. try to call the stored procedure with fully qualified name. (eg: dbo.myStoredProcedure or mydb.dbo.myStoredProcedure )
OR
#3. check-out this article[^] if you are using Datagrid view or ObjectDataSource
Hope it helps...
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
hey guys ! I have like 20 forms in my project that all are pretty much the same, so i'm looking for a way to doublicate them(Like in delphi)! I tried to add Inherite forms but when i do that I just get the controls not the code !!
plz help me out
Thanx
Mr.K
|
|
|
|
|
mrkeivan wrote: I have like 20 forms in my project that all are pretty much the same,
Why not use only 1 form if all forms are the same?
mrkeivan wrote: so i'm looking for a way to doublicate them
What about "Copy and Paste"?
mrkeivan wrote: I tried to add Inherite forms but when i do that I just get the controls not the code !!
Yeah. This is the way it is.. this is like inheriting the base class. When you inherit the base class, the new class won't get the code but it access its parent functionalities.
What about creating a user control?
If the most of things (controls, layout) are the same, you may probably create one user control. Place this control in all forms.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
There is posisbility to use inherited forms. (In the new item window). I tried to use this, but it does not work well with the form designer view (unfortunately). You can try to put all functional stuff in a separate class and use an object of this class in your form. You even can attach alle controls to control functionality you define in this class.
Rudolf Heijink
|
|
|
|
|
Rudolf Jan Heijink wrote: but it does not work well with the form designer view (unfortunately).
ya. me too.. it sucks..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
I hava a page,named TaskConf,there is a System.Windows.Forms.Timer timer1,and there is a funtion named SetTmier() to Start timer1
public void SetTimer()
{
timer1.interval = 60000;
timer1.Ticked += new EventHandler(Task_refrush);
timer1.Enable = true;
}
The funtion Task_refrush is the event funtion,which is belong to page TaskConf.
In the other page login I call TaskConf Constructor,and then Start two thread to Start SetTimer and Task_refrush which ara belong to TaskConf:
TaskConf tc = new TaskConf();
.
.
.
..
...
Thread t1 =new Thread(new ThreadStart(tc.Task_refrush));
t1.Start();
Thread t2 = new Thread(new ThreadStart(tc.SetTimer));
t2.Start();
I found these two threads are all running,The code in Task_refrush and SetTimer is excuted,(TaskConf is not open,but constructed,only the page login is open),the timer1 in TaskConf is started,but why the timer1 does not run the funcion Task_refrush every minute?Why?
|
|
|
|
|
supercsharp1 wrote: I hava a page,named TaskConf,there is a System.Windows.Forms.Timer timer1
Are you using Windows.Forms.Timer in ASP.NET Webpage??
If you are calling the start() function of timer in constructor of the form, Tick() event of timer will get fired without showing the form...
public Form3()<br />
{<br />
InitializeComponent(); <br />
timer1.Start();<br />
}
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi,
how can i encrypt a string into binary and save it into Database as binary???
All I ever wanted is what others have.... CrazySanker
|
|
|
|
|
Have a look at http://www.codeproject.com/useritems/Encrypt_an_string.asp
|
|
|
|
|
thankx
All I ever wanted is what others have.... CrazySanker
|
|
|
|