|
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
|
|
|
|
|
|
Hi:
I'm a bit confuse whether i need to release resouce on dcom object (just like db connection) after use. For example:
public myApps
{
private object dcomInstance;
public void Connect(string ip)
{
Type t = System.Type.GetTypeFromProgID("myCompany.Application", serverIP, true);
dcomInstance= Activator.CreateInstance(t);
}
public void doSomeStuff()
{
dcomInstance.SomeFunction();
}
}
Main()
{
myApps a = myApps();
a.Connect(remoteip);
a.doSomeStuff;
}
Once I'm done with the myApps in Main(), is it necessary to release on the dcomInstance or that .net framework automatically does that for me.
If releasing resource is necessary, how should i do it?
Some sample codes will be greatly appreciate. Thanks!
|
|
|
|
|
hey ..
i'm getting OutOfMemory Exception in this:
private int[,,,,,,] m7Array = new int[50,50,50,50,50,50,50];
why ?
|
|
|
|
|
Have you any idea how many gigabytes you are asking for ?
AFAIK 32-bit Windows cant give more than 1 or 2 GB to a single process (assuming
the RAM is actually available).
|
|
|
|
|
i have 7 numbers i'd like to remember.
say 1,2,3,4,5,6,7 ..
what i was thinking about was to increase by 1 the array place, that is m7Array[1,2,3,4,5,6,7]++.
how else can i do this ? XOR hashing won't work (different combination will give the same) and also XOR with elements summery.
anyone have a different idea ?
|
|
|
|
|
You want to store 7 numbers in an array, what you need is
int myArray[] = new int[7];
for(int i = 0; i < 7; i++)
{
myArray[i] = i;
}
WilenX wrote: what i was thinking about was to increase by 1 the array place
Not sure what you mean by this. Do you want an Array that grows dynamically? If so, what you need is a List. Check out System.Collections .
Cheers,
Vıkram.
Déjà moo - The feeling that you've seen this bull before.
Join the CP group at NationStates. Password: byalmightybob
|
|
|
|