|
You didn't understand me... i want my text be curved on line...
|
|
|
|
|
you did not understood him... thats what he is trying to teach you ... better rephrase your question if you have a point...
its me =Þ
grim zax
|
|
|
|
|
Ok, let me explaine....
For example if i got horizontal line, i draw the text horizontally on it...
If i got a vertical line, i draw the text vertically...
If i got curved line, i draw each letter exactly on line... So if i got sin function and word "Hello World!", i need the 'H' at the start, 'e', next step on line... and so on... Let words dancing on line....
|
|
|
|
|
Please anyone help me i still new in this C# development.
I'm trying to have two classes e.g Customer, Account classes and the Account class must inherit the Customer class, but i don't know where to start.
please help
|
|
|
|
|
sosodev wrote:
but i don't know where to start
The best place to start is down at your local bookshop. Look for a book aimed at beginners, and not one aimed at teaching a programmer a new language. Go through tthe book writing out the examples and building on them as necessary. This will help you to understand the underlying principles of programming.
|
|
|
|
|
|
hi there,
try with this: public class Account: Customer
u can follow the walkthrough in MSDN to get familiar with C#
<< >>
|
|
|
|
|
|
Hi,
Can u tell me to make one set up exe for both the project Currently i have made two installer one for WIndows Service and another for my project. I can install the project set up and after that i am able to install Windows Service(This is user defined service)
My client wants to integrate into one set up exe
can anybody help me
Thanks
|
|
|
|
|
Hi,
I have made set up for user defined Windows Service and tested with Window2000 It working fine
but when i install the windows service in Windows XP, i get error while running the windows service
can any one tell me is there an\y difference in making Windows service in Win2k and Win XP I am making WIndows service (User defiend) in c#
regards,
Sanjeev
|
|
|
|
|
There are differences in what's supported, but it's usually what 2000 doesn't support that XP does.
Since you didn't mention what the error was, of what your coding is doing when the error occurs, it's impossible to tell you anything useful.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi
I have installed dotnetframework in Win XP and Win2k
when i run Windows Service and click on desktop of my product
its showing me the following error
Commn Language Runtime Debugging Services
Process id=0xb50(2896),Thread id=0xb54(2900)
click OK to terminate the application
Click CANCEL to debug the application
What should i write in my Windows Services(User defined service) so that it should not
show the above error
When i run my product exe from the desktop and after that i run my windows services it
shows that only one instance of application is allowed at a time
This program should identify if any man.exe exist it should stop that instance and start
another instance of man.exe but this program as a windows service does not work
protected override void OnStart(string[] args)
{
// TODO: Add code here to start your service.
Process[] aProcesses1;
if (aProcesses1.Length > 0)
{
if(rd1==true)
{
// The last excel process is the orphaned process which is killed
aProcesses1[aProcesses1.Length-1].Kill();
rd1=false;
}
}
int intExcelPID;
aProcesses1=Process.GetProcessesByName("man");
string strProc="These are the processes running \n";
for (int i = 0; i <= aProcesses1.GetUpperBound(0); i++)
{
intExcelPID = aProcesses1[i].Id;
strProc+=intExcelPID.ToString()+ " ";
}
//Retrive from registry the value of Path
RegistryKey hklm =Registry.LocalMachine;
hklm=hklm.OpenSubKey("SOFTWARE\\man");
Object obp=hklm.GetValue("Path");
string file=obp.ToString() + "\\man.exe";
Process.Start(@file);
}
When i write the above program it does not work even it does not start when i start my
computer
Regards
sanjeev
|
|
|
|
|
Wow. Where to begin...
First, you've put this in the the OnStart procedure of your service. This means that it will only run ONCE per start of the service or on startup of Windows. OnStart is meant for you to start your service code, possibly on another thread. The way you have it setup, your code will execute once, then stop.
The error comes up because you have a problem with your code in the OnStart() method. You've got ALOT of problems with this code.
protected override void OnStart(string[] args)
{
Process[] aProcesses1;
if (aProcesses1.Length > 0)
{
if(rd1==true)
{
aProcesses1[aProcesses1.Length-1].Kill();
rd1=false;
}
}
int intExcelPID;
aProcesses1=Process.GetProcessesByName("man");
string strProc="These are the processes running \n";
for (int i = 0; i <= aProcesses1.GetUpperBound(0); i++)
{
intExcelPID = aProcesses1[i].Id;
strProc+=intExcelPID.ToString()+ " ";
}
RegistryKey hklm=Registry.LocalMachine;
hklm=hklm.OpenSubKey("SOFTWARE\\man");
Object obp=hklm.GetValue("Path");
string file=obp.ToString() + "\\man.exe";
Process.Start(@file);
}
But first, I take it your trying to find Excel processes that are left open by an application? Why?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all, I am new in C#.
I have two classes, class A and class B. Class B is inherited from class A.
When I create an object of class B, will an object of class A also be created?
In addition, if class A has a member "public string myName", after I create an object of class B, the created instance also can access myName, but what does the statement " base.myName = "HELLO" " mean? I know it assign "myName" of the base class (class A) with "HELLO", but why do we assign member of the base class if no instance of the base class created?
Regards,
Tommy
|
|
|
|
|
When you create an instance of a derived class, an instance of the base class (usually embedded in the instance of the derived class) is automatically created for you. That answers your second question as well, there is an instance of the base class.
You can usually get away without using the base prefix, as public and protected members of the base class are accessible from the derived class directly. Usually, the base prefix is used to call the base class implementation from within overridden functions and to disambiguate functions and member variables.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks for your answer~~~
I have some more questions.
1) When a member in the base class (class A) is declared as private (say "private int x"), will the instance of the derived class (class B) has a that private member? Is that an inherited class always inherits all members of the base class but cannot access the private members? (For example, in this case, class B also has "private int x", but cannot access "x" )?
2) When a method in the base class (class A) is overridden by the derived class (class B), is that the overridden version of the method be always called?
For example,
class A
{
public virtual void Test()
{
Console.WriteLine("This is A");
}
}
class B : A
{
public virtual void Test()
{
Console.WriteLine("This is B");
}
}
static void Main()
{
B b = new B(); A a = b;
b.Test();
a.Test();
}
The above code sample is copied from a book, but I am confused.....
I know the statement "b.Test()" will cause the output "This is B"
but how about "a.Test()", as a is referenced to the object of type B, which version of the method will be called?
What is meant by "A a = b"?
Again, thanks a lot for your help!!
Regards,
Tommy
|
|
|
|
|
Hi, I'm trying to find out where the root path (ie. the physical folder of "http://mydomain.com/") is programmatically, but I'm not sure how to do this. After researching a bit, I came up with the following information:-
- In Wise Installer and Install Shield they check for the registry value under
HKLM\Software\Microsoft\InetStp\PathWWWRoot , but this only points to the default folder at installation, not the current (possibly moved) folder location. - In Windows XP, I'm able to find the correct location under
HKLM\System\CurrentControlSet\Services\W3SVC\Parameters\Virtual Roots , but this key does not exist in Windows 2003 Server operating system. In fact, on Windows 2003, I can't find the correct location anywhere in Registry! Is there a way to locate the right folder independent of any machine? - I know that in .NET it is possible to use
System.DirectoryServices.DirectoryEntry("IIS://mydomain.com/W3SVC") to locate the correct path, but I'm trying to find an easier way to do this - by using only files and registry. Using DirectoryEntry to query the IIS service may also result in a permission denied problem.
What I'm trying to do is to build a setup package in Install Shield to deploy a web-application. Since Install Shield can't locate the IIS root path correctly, I have to manually set the path myself. The capability of the Install-Script that comes with Install-Shield is limited, therefore I cannot use the third option above.
So can anyone shed a light here? Thanks in advance!
> whoami
The system is unable to identify you when you don't even know your name!
|
|
|
|
|
I would have the person manually set the path for your app, as they may have their server set up where the server has the files on a remote computer.
|
|
|
|
|
I am lookinf for a way to insert data into Field codes in Ms Word from C#, I have been able to get it to open up the template and insert the data but i cant find anyway to insert it at the point where the codes are (it just places the text at the top)
Anybody know of a way to reference the Fields?
Cheers
|
|
|
|
|
how about invoking the find & replace method.
|
|
|
|
|
Hi! Im trying to create a form with a button that saves the output as a "text" file. My problem is that this code compiles without any exceptions however it tends to hang at runtime. Can someone please tell me what is wrong with my code and if i'm missing anything. The output is bound to a grid and shows a couple of data based on my drop down list.
private void btnSave_Click(object sender, System.EventArgs e)
{
OdbcConnection cnn = new OdbcConnection();
cnn.Open();
OdbcCommand cmmd = new OdbcCommand();
OdbcDataAdapter adp = new OdbcDataAdapter (cmmd);
DataTable dt_emp = new DataTable();
adp.Fill(dt_emp);
System.Text.StringBuilder sb = new System.Text.StringBuilder();
for(int i=0;i<=dt_emp.Rows.Count - 1; i++)
{
for(int q=0;q<=dt_emp.Columns.Count - 1; q++)
{
sb.Append(dt_emp.Rows[i][q].ToString());
}
sb.Append(" ");
}
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=*.txt");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.text";
System.IO.StringWriter strWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(strWrite);
Response.Write(sb.ToString());
}
dt_emp is the data passed. Thanx in advance for all your replies!!!
|
|
|
|
|
Have you put in a break point to see if it's just working ? How many rows/columns are we talking here ?
tatchung wrote:
i<=dt_emp.Rows.Count - 1
i < dt_emp.Rows.Count is surely more readable ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
yeah i did and it passes right by the whole function. i'm sure there's something wrong with it but i just can't figure out what. rows = depends on the result columns = 5 (but i still have to add 3-5 more columns; i cut the columns down just to see if it'll work. i'm just starting to learn c# by the way and all your comments, suggestions and even violent reactions could be of great help to me
thanx for all your replies!
|
|
|
|
|
tatchung wrote:
yeah i did and it passes right by the whole function.
Do you mean the click event does not fire, or do you mean that the rows/columns are 0 and so the loop is skipped ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
the click does not fire. it hangs at runtime. did i miss anything in my code or do you think its in the query to the database?
thanx
|
|
|
|