|
hi,
in 2003, if you add a form to your project it will create two files: Form1.cs (in C#) and Form1.resx. and all you design time and other codes will be in the Form1.cs file.
but in 2005, it will create 3 files: Form1.cs, Form1.Designer.cs and Form1.resx. Form1.cs contains the code that you type such as event handlers and other functions, and Form1.Designer1.cs contains the auto generated design time code.
so, if you want to modify the design time code, open the Form1.Designer.cs file and make the changes.
hope this helps
ragards
|
|
|
|
|
Oh! You have been a great help. I never know this before. Thanks alot.
I begin to like this codeproject now. I can get help in a matter of minutes. Very cool.
All the best,
Jack Toke
From Hell With Love
|
|
|
|
|
OK - cool. I did tell you where the file was. Editing them by hand is generally a bad idea, but you can still do it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
jackptoke wrote: I can get help in a matter of minutes. Very cool.
Don't count it every time. We all have lives too, you know.
|
|
|
|
|
Dear All,
I need to add some text on an image( may be in bmp or jpg format). I have to do it using C#.
Can anyone help me? Plz give me some hint.
Enamul Hoque
|
|
|
|
|
There are several articles about it at codeproject. Search and you will find them
|
|
|
|
|
I have tried with the search string,
"adding text over an image"
and with many more combinations.
But each time codeproject shows, Sorry No Results Found.
Plz help me. What should be the search string.
I am badly in need of it
|
|
|
|
|
using (Bitmap bm = Bitmap.FromFile("c:my.jpg"))
{
using(Graphics gr = Graphics.FromImage(bm))
{
gr.DrawString(......
}
}
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks Christian. I have solved my problem with your help.
Thanks very much.
|
|
|
|
|
Now Let me state my original problem.
Actually i need to overlay text on a .avi file.
I have planned it like this:
First i will extract the frames from the avi file, then overlay text on each frame and then reconstruct the avi file with these frames.
Is my approach efficient????
Can anyone suggest a more efficient solution?
Please Help me.
|
|
|
|
|
Christian, Please help me.
i need to implement a solution immediately in C#.
Is there a way to overlay text on an avi file directly?
Enamul Hoque
|
|
|
|
|
Hello, I am writing a class and in this class I want write a method that get some information . this information must fill by 3 textboxes in loginform for connecting to database.but I do not know what should I do?
this is the code in my class:
using System;
using System.Collections.Generic;
using System.Text;
namespace DuryHouse
{
class Genral_Class
{
public string conection_string;
//Define Method for connect to Database
public Conect_DataBase(string servername,
string userid ,
string pasword );
{
???????? I do not know what I should write ?????
}
and what codes I should write in login form after preesing OK button for connect to database.
my database is SQLserver2000
}
|
|
|
|
|
Have you tried google ? You're basically asking how to connect to SQL Server from C#, right ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It looks like you are writing a DAL. The name "Genral_Class" [sic] would therefore be inappropriate. If you were planning on putting in lots of stuff in there then you might as well not use an OO language because you clearly aren't taking advantage of it.
You have not told us what you want the connect database method to do. Do we guess? My guess is that it could be any one of the following
* Generate the connection string and store it in the field.
* Generate the connection object
* Generate the connection object and open the connection (thus making the connection)
* Something else
|
|
|
|
|
Hello .
I want to pass some Controllers & Buttons I build in Windows.Form , in to a method that make them Enable & change there Background.
Any way what I struggle all night is how to pass a Control / Button / Object to a method without ( Object Sender... , Event...)
to other function.
I want to take the Control object for example and send his name propertey trough string to a function and then
to cast him into Object type .
Something like :
this.TurnControlActive( UrlFile.Name ); // * UrlFile =// System.Windows.Forms.Control *//
and then pass in to ....
private void TurnControlActive( ....... )
{
// Here the Control / Object need to become Enabled //
}
Who to pass an Object / Control / Or how to retrieve a Control by his string name ..?
Thank alot.
|
|
|
|
|
You'd need to build a dictionary of control names that map to controls. Otherwise, you need to iterate through them all to find the one you want.
Epsilone3 wrote: Any way what I struggle all night is how to pass a Control / Button / Object to a method without ( Object Sender... , Event...)
to other function.
I have no idea what this means. I don't agree with the design, but you can pass a control around without having to do anything to it's events.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks Christian can you/anyone can send me sample of that kind of code , that map that controls , or pass a control to other function by is name ?
If I got a Button and Control objects ,
Can I pass them to same Function Cast them to an Object and then
Manipulated there color & made them Enabled ? for example .
Thak alot.
|
|
|
|
|
hi
i want to convert a string variable to char by this code :
string _s = s.Substring(i, 1);<br />
char _ch = (char)_s.Clone(); // Error Occured
but the following error has shown me :
Specified cast is not valid.
how to solve my problem and how to convert string to char ?
thanks
|
|
|
|
|
Have you tried the Convert.ToChar method?
string StartString = "C";
char EndChar;
EndChar = System.Convert.ToChar(StartString);
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Why not char _ch = s [ i ] ; ?
|
|
|
|
|
hi all
i'm a newbie in programming so there is some "basic thing/way/how-it-should-be-wrote in coding" i still try to catch so please be patient
i'm trying to populate a listview with a .csv file a i just dont catch how to put it in string to add it. I already find how read the file, take one line at the time but thats it. From this point, i'm lost.
anyone ready to help ?
Thanks
|
|
|
|
|
listView1.Items.Add("<text>");
Where listView1 is the name of the listview control.
|
|
|
|
|
That will add empty string to the listview and a newbie might think that nothing is added.
You can use either listview1.Add to add a single element or listview1.AddRange Both have overloads so I suggest you have a look at them
|
|
|
|
|
thanks guys, i'm gonna look for this right now
|
|
|
|
|
ok, i'm gonna try to be more specific, i think i missed something
check this out please and tell me what i didn't do right
there is my .csv file
3,One,Two,Three,Four,Five,Six,Seven,Eight,
0,5/19/2007 6:21:02 PM,A,B,C,777,,,,
1,5/19/2007 6:20:59 PM,A,B,C,666,,,,
2,5/19/2007 6:20:57 PM,A,B,C,555,,,,
<br />
string[] Entier;<br />
<br />
string[] Colonnes;<br />
<br />
<br />
<br />
Entier = File.ReadAllLines("pdg.csv");<br />
<br />
<br />
foreach (string CurrentLine in Entier)<br />
{<br />
<br />
Colonnes = CurrentLine.Split(new Char[] { ',' });<br />
<br />
foreach (string CurrentCol in Colonnes)<br />
{<br />
ListViewItem item1 = new ListViewItem(CurrentCol);<br />
item1.SubItems.Add(Unit);<br />
listView1.Items.Add(item1);<br />
}<br />
}
and there is my code. as you see i can read the file, can read only one line, can read one "item" in the line but i just dont know how to take all those parts and put it in my listview.
something i just dont catch
|
|
|
|