|
Try this :
static void Main()
{
FileInfo fileInfo = new FileInfo("file name.exe");
string withoutExt = Regex.Replace(fileInfo.Name, fileInfo.Extension, "");
Console.WriteLine(withoutExt);
Console.ReadKey();
}
|
|
|
|
|
Hello everyone,
My situation is,
- when design the old version web services, I have not considered a SOAP header is needed for a specific web services method;
- client is generating proxy code from old version web services, which is not considering of SOAP header issues as well;
- now I want to upgrade web services code to retrieve some SOAP header from client request, and let client to set the SOAP header from each request;
My question is, since client is using old proxy which does not contain any information about how to generate SOAP header automatically, how could they add SOAP header in each request?
thanks in advance,
George
|
|
|
|
|
i want create a font which height/width equals an ratio?
eg:height/width=0.7.
in the c# i dont find the way to achieve it.
we can only set the size of the font.
and the font's height and width is readonly.
from vevi
|
|
|
|
|
i want to use the API to achieve it.
i use the method :createfont(...) in gdi32.dll to create the font i wanted. but after i use the method Font.FromHdc(CreateFont(...) ),
the font is not exactlly i want . the width i give is useless.
can anyone give me an example for this .
from vevi
|
|
|
|
|
I dont think you can scale the font. You need to do that on a Graphics level.
|
|
|
|
|
|
Wan--Vevi wrote: on the Graphics level i cant do that
You can use the Graphics.Transform property perhaps. Otherwise I am not sure what Win32 API provides, maybe there is an easier way.
Good luck
|
|
|
|
|
With C++/MFC, the CFont class had a CreateFont () method that allowed both the height and width to be specified. The font returned was the closest match.
A quick search reveals this is also in Win32 as I suspected: http://msdn.microsoft.com/en-us/library/ms534214.aspx[^]
It is possible (and not that hard as I recall) to use GDI in a C# app, so you can use this in your program.
|
|
|
|
|
the font which create by the method CreateFont(...) is not a
true type font.
and .net can not recieve a untrue type font.
this is a problem.
from vevi
|
|
|
|
|
Hello everybody,
VS 2003.
i'm displaying a datatable inside a dataGrid, at each update i'm doing, i must reload the datagrid.
i need to know how can i maintain the row or the scroll position after reloading the datagrid.
thanks in advance for your help,and
best regards
|
|
|
|
|
michael_jhons wrote: i need to know how can i maintain the row or the scroll position after reloading the datagrid.
You can explicitly set VerticalScrollingOffset property after each refresh.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
dear Manas,
thank you so much for your reply, but i'm using VS2003 there is no Datgridview (VS2005) control, all i have is the datagrid control.
is it possible that i can use this property in my case ?
Best regards
|
|
|
|
|
michael_jhons wrote: but i'm using VS2003 there is no Datgridview (VS2005) control, all i have is the datagrid control.
Oops..I dont have VS2003 here...
michael_jhons wrote: is it possible that i can use this property in my case ?
No You can not.
Try to implement like this[^].
I remember that I have implemented this fro datagrid in past using some trick which I do not remember anymore.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
ok Manas, thank you for your concern, i'll try the scrollToRow class taht you gave me.hope it works
thank you
|
|
|
|
|
On Console Application
Write a function to copy files from one folder to another (XCopy). The function will have multiple versions. Each version should build on the previous version.
HINT: Look at classes DirectoryInfo, Directory, FileInfo, Path
Version 1.
The function should have the following parameters:
Source path
Desitnation path
Assumption in this version:
The destination path does not exist.
Sub-folders are not processed.
Version 2.
The function should have the following parameters:
Source path
Destination path
Assumption in this version:
Sub-folders are processed.
The destination paths does not exist.
Version 3.
The function should have the following parameters:
Source path
Destination path
Assumption in this version:
Sub-folders are processed.
The destination paths may exist. There may be files in the destination folders. These files should be overwritten if the files at the destination are older than files at source.
Version 4.
An overloaded function should have the following parameters:
Source path
Destination path
File name filter
Assumption in this version:
(same as Version 3)
Version 5.
An overloaded function should have the following parameters:
Source path
Destination path
Multiple file name filters (string array)
Assumption in this version:
(same as Version 4)
|
|
|
|
|
WE DO NOT DO YOUR HOMEWORK FOR YOU!!!
|
|
|
|
|
What about mine? will you do mine for me?
A train leaves London at 9:00 and travels at 40 mph towards Exeter.
A second train leaves Exeter for London at 10:00 and travels at 60 mph.
If the distance is 250 miles, what time should I go to the pub today?
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
I would suggest you buy a 4 pack before the trip, but seeing that it is illegal now to drink on public transport, I deem the problem non-NP complete, and thus not solvable in real time.
|
|
|
|
|
There's no restriction on getting bladdered on a train, it's only on London transport. However, I'm not overly concerned about being on either train. I just wanna go to the Pub.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
O great! Buy a case then!
|
|
|
|
|
That's a shame. I have some GIS code I need writing - could you knock it up for me?
|
|
|
|
|
Pete O'Hanlon wrote: could you knock it up for me?
Sorry, I dont do sloppy seconds
|
|
|
|
|
leppie wrote: Sorry, I dont do sloppy seconds
That's not what the rumours say.
|
|
|
|
|
V.Mahajan wrote: Plz Help me on this...
This is very vague subject...
V.Mahajan wrote: Write a function to copy files from one folder to another (XCopy). The function will have multiple versions. Each version should build on the previous version.
HINT: Look at classes DirectoryInfo, Directory, FileInfo, Path
Most(All except some people like you) of the programmers call them as overloaded functions.
Now, where is the question/problem?
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Ok - what do you want? I see no question here.
Never underestimate the power of human stupidity
RAH
|
|
|
|