|
I can't remember if there is such property but if there is not, you can handle ColumnWidthChanging event of the listview class and cancel the event
|
|
|
|
|
Hi,
I would like to customize the display i receive from datetime time picker into a message box.
That is my motive is to display the date in a message box in 0131 format ie mmdd.
But right now it is displaying as 01/31.
Am working in C#.
Is there any way to do this and how.
I have treid these but its no good.
string str1 = string.Format("{0:mmddyy}",dateTimePicker1);//string.Format("{0: mm}",str);
//MessageBox.Show("The Name of the Database is CustList_PGE_" + dateTimePicker1.Text);
//MessageBox.Show("The Name of the Database Table is CustList_PGE" + dateTimePicker1.Text+08);
Thanking you
|
|
|
|
|
use the following:
YourDateTimePicker.Format = DateTimePickerFormat.Custom;
YourDateTimePicker.CustomFormat = "MMdd";
SkyWalker
|
|
|
|
|
Awesome.i got it.
Thanks a lot
|
|
|
|
|
Hi, I was wondering if anyone could explain how to implement this in c# ,could point me towards any tutorials or tell me if its even possible.
Is it possible to play sounds through my microphone input not recorded through the microphone but from a pc sound source.
e.g. play an mp3 on my computer so it plays to my pcs microphone input on say msn messenger . (please dont reply with just put ure speaker by the microphone )
thanks for any help.
|
|
|
|
|
I don't believe you can make this happen without connecting the two via a cable ( the output and the input )
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Does anybody have sample code for creating transparent textbox?
I got some sample code in this site (AlphaBlendedTextBox) but it has some problems related to memory leaks and invalidating controls.
Thanks
|
|
|
|
|
Your best bet is probably to write your own. The textbox control wraps the C++ textbox, which is the nastiest control of them all, especially for custom painting.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
It is 0448hrs and I have just written the following...
public class LifePanel
{
public LifePanel(string UserID , string CssClass)
:this(UserID , CssClass , false)
{
}
public LifePanel(string UserID, string CssClass, bool forceImage)
:this(UserID, CssClass)
{
}
}
G'nite....
so you answer don't be scared of failure
The only failure is never to try
Things You've Never Done - Passenger -2008
|
|
|
|
|
This should really be in the Coding horrors forum. Go on - you know you want to.
|
|
|
|
|
My Web App want to access a share folder //IP/share/detail. The folder "detail" was shared to everyone.
in Web.Config
identity impersonate="true"
was added.
in machine.config
processModel userName="SYSTEM" password="AutoGenerate"
userName was changed.
In code
File.Exists("//IP/share/detail/"+fileName)
It return false although the file exist in the folder. Do you have any idea why the file cannot be access?
|
|
|
|
|
Are you sure the process is using impersonation and not the built in ASP.NET account? Change your IIS settings to force Windows Authentication and try again, if it works then you know it is an impersonation failure of some sorts.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
My goal is to make a web service that does NOT need to be restarted anytime an enumeration (and therefore, a dll) changes. Enumerations are changed from my code periodically using System.Reflection.Emit to make them match a database where a second application may update those values at some unknown interval. Therefore, I am dynamically updating a referenced dll using System.Reflection.Emit from within my web service, and I would like to reload the dll reference after the update so my application can use the latest version of the enumerations. Is there a way to do such a thing? Any help is greatly appreciated,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Yes, you can reload the page, but that will make IIS restart the appication to recompile, just the nature of the beast.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I am trying to load a Korean string resource from a DLL.
I use LoadStringW, after setting Thread.CurrentThread.CurrentCulture to Korean, using PInvoke from C#.
The string I'm trying to receive should be comprised of the following 5 characters:
0xc6a9 0xc9c0 0x002f 0xd488 0xc9c8
however what I get is:
0x00a9 0x00c6 0x00c0 0x00c9 0x002f
Note the relationship between what I expected and what I received.
Anyone have ideas on what I'm doing wrong?
(I hope this is the most appropriate forum, I checked and did not find one API or Internationalization specific)
Thanks,
Don
donrau@hotmail.com
|
|
|
|
|
What does your PInvoke signiture look like? I would declare that method as follows:
[DllImport("user32.dll", CharSet = CharSet.Unicode, EntryPoint = "LoadStringW", SetLastError = true]
public static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax); Does this match your declaration? Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Thank you so much! It works now. You've made my week!
I've burnt many hours on this. I did not have the CharSet attribute. None of my research mentioned it and PInvoke.Com did not include it in any of the declarations found there. I'm not sure why the compiler needs the clarification of this attribute to do the correct thing, or what it was doing in it's absence.
Thanks again, your a life saver.
Don Rau
|
|
|
|
|
I have a C# windows services installer that creates a service based on command line input, e.g.:
Enter the numeric ID from the available inspection types to install or 'q' to quit:
1: Structural Areas
2: Electrical Inspection Areas
3. Roof Inspection Areas
4. ...and so on
=> user chooses #3 "Roof Inspection Areas" and the service is created with service name of: RoofInspectionAreas. (hypothetical).
(Assume that my installer was used to create three services altogether: StructuralAreas, ElectricalInspectionAreas, and RoofInspectionAreas. Also assume that none of these services have been started.)
Now when RoofInspectionAreas service is selected to be started from the Windows Services Management Tool, the OnStart() method will perform a lookup in the custom config area of the app.config file to initialize some vars based the current service, e.g.:
<RoofInspectionAreas>
<add key="SweepFolderTime" value="600000"/>
<add key="Recurrence" value="5"/>
...and so on
</RoofInspectionAreas>
My question is: How do I get the current service name, i.e.: RoofInspectionAreas, of the service that is starting (so I can get the right custom config section) without knowing what service was selected to be started? All the examples I have found so far only show how to get a "listing" of services on the current machine.
|
|
|
|
|
Personally, I write the constructors for my Windows Services to take a parameter for its name (and other information). And I do very little in the OnStart handler.
|
|
|
|
|
Hi.
can anyone help me with a small application (I'm thniking a C# console application) that has to:
- Read a .txt file, where a lot (4-500) host names a listed
- ping all the hosts and return the result with:
Hostname, IP_Address, OS Version/Type and Date (The date is the time where the host was "pinged".
This information must be inserted into a database, and the datetime must be overwritten unless if the host does not answer - then the host and the date where it did not answer must be inserted into another table.
I havent done any programmeing with networking so if any one could help me out I'll be very happy.
Also, if there is any questions you just let me know.
Thanks in advance.
\Jan.
|
|
|
|
|
That's not a big deal, I do a couple of things that are similar, one in a Windows Services.
Reading a text file is easy enough, but I prefer XML, or (prefereably) read from the database.
To ping you can use:
System.Net.NetworkInformation.PingReply result = (new System.Net.NetworkInformation.Ping()).Send ( HostName , 1000 )
Then write to the database.
|
|
|
|
|
OK, I'll try that.
Thanks for your answer, but is it possible that you have an example that I can see?
\Jan.
|
|
|
|
|
There is not MeasureItem event for Listview so how can i draw a blank row or keep a distance between each item on DrawItem. Thanks
|
|
|
|
|
From what I can see on google, the only way to change the height of a listviewitem is to create a bitmap that's the right height and make it show in the listviewitem in question.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Is there any simple example
|
|
|
|