|
hey tnx!
I was looking in that direction, because I noticed idd the format was different.
The second strange thing I saw was the following:
When I press my button, my value gets set, but today's date stays shown
When I than manually choose another date and than press the button, it works!
[EDIT]Damn, the solution that microsoft proposes will not work. The user is not allowed to change regional settings, but multilanguage support is still required . I'm now searching for the short version (=property of dtp) or a masked textbox.[/EDIT]
Coulda, woulda, shoulda doesn't matter if you don't.
<marquee>
-- modified at 2:31 Friday 5th May, 2006
|
|
|
|
|
V. wrote: When I press my button, my value gets set, but today's date stays shown
When I than manually choose another date and than press the button, it works!
i tried to test it but it works fine with me... perhaps i just misunderstood what you're trying to say?
V. wrote: EDIT]Damn, the solution that microsoft proposes will not work. The user is not allowed to change regional settings, but multilanguage support is still required . I'm now searching for the short version (=property of dtp) or a masked textbox.[/EDIT]
actually, this was also my problem before so what i did to solve this was to create a custom control like the datetimepicker but not inheriting to it.
this[^] gave me an idea to create that control.
hope this also helps you!
microsoc
|
|
|
|
|
|
Hello
I want to get all Workgroup,Domain name on our network with their computers name.
I have below code for gathering workgroups and their computers name, but that can't show some workgroups.
<br />
using System.DirectoryEntry;<br />
<br />
DirectoryEntry root = new DirectoryEntry("WinNT:");<br />
foreach(System.DirectoryServices.DirectoryEntry dWorkGroup in root.Children)<br />
{<br />
foreach(System.DirectoryServices.DirectoryEntry dPC in dWorkGroup.Children)<br />
{<br />
listbox1.Items.Add(dWorkGroup.Name+"\\"+dPC.Name) ;<br />
}<br />
}<br />
Tank you.
-- modified at 5:20 Thursday 4th May, 2006
|
|
|
|
|
hi all,
i am trying to get the active window asw a bitmap, an earlier post directed me to the GetForegroundWindow() function in user32.dll
this however (with the code below) is returning both my desktops as the bitmap not the active window.
can any please help?
internal static Bitmap GetForegroundWindowBitmap()
{
IntPtr handle = GetForegroundWindow();
IntPtr windowDC = GetWindowDC(handle);
Bitmap windowImage = GetBitmap(windowDC);
ReleaseDC(windowDC);
return windowImage;
}
internal static Bitmap GetBitmap(IntPtr imagePtr)
{
IntPtr hwnd = GetCurrentObject(imagePtr, 7);
Bitmap desktopImage = Image.FromHbitmap(hwnd);
return desktopImage;
}
the above code (GetBitmap) works fine to get 'a' desktop or all desktops if i pass in GetDC(GetDesktopWindow())
kind regards,
g00fy
|
|
|
|
|
The below mentioned code which came in a posting in code project is working with win 2k3 box but when i try to execute the same in a winxp sp2 box it is throwing a Generic Failure error. can some one help me in fixing this problem
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("Select Name from Win32_CDROMDrive");
foreach(ManagementObject cdrom in searcher.Get())
{
Console.WriteLine("Name: {0}\n",
cdrom.GetPropertyValue("Name"));
}
Thanks
Vinu
|
|
|
|
|
I have application i want get Event when click Control + Enter
how will i do ???
|
|
|
|
|
Hello
first set your forms KeyPreview property to "true",
then on controls KeyPress event do your job like below code :
<br />
private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)<br />
{<br />
if (e.KeyChar == Keys.Enter)<br />
{<br />
....<br />
}<br />
}<br />
if this can not help you mail me please.
Bye Bye.
|
|
|
|
|
freshonlineMax wrote: if this can not help you mail me please.
Public forum, public answer. Follow up questions & Answers should be posted here for everyone's benefit.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
thanks but i want
Event when click Control after continue click Enter
(Example when u open IE u write name some web site(xxx) after u click Control + Enter---> xxx.com )
|
|
|
|
|
hi AnhTin!
so what you mean is when the user PRESS Control + Enter?
if your subclassing a control just override the OnKeyDown event
protected override void OnKeyDown(KeyEventArgs e)
{
if (e.KeyData == (Keys.Control | Keys.Enter))
{
}
}
or if your just using the control... attach an event handler on the KeyDown event then do the same condition that i added in the onkeydown event.
hope that helps!
microsoc
|
|
|
|
|
|
No problemo dude!
microsoc
|
|
|
|
|
Hi
how i can take data for every visitor of my web for example ip address name of computer or something else???
please hepl
best regard\s
|
|
|
|
|
|
thank's a lot brather.:->
|
|
|
|
|
hi
my access db include password and i want connect to it in vs.net and when i drag oledbdataadapter to my form and configurate parameters (select provider,enter password) and click on test connection , the following message show me :
Server Explorer
---------------------------
Unable to connect to database.
Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
---------------------------
OK
Access db was closed.
how to solve my problem ?
|
|
|
|
|
Sounds like a lock file exists in the folder, which indicates that the database is already open.
And you should stick to adding data code as code, not using the design view. Database code never belongs in the UI layer, therefore should never be added with the designer.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I need to export the data of a datagrid to csv.
-- modified at 3:18 Thursday 4th May, 2006
|
|
|
|
|
|
Hi,
I have a producer, and each producer has a number of different facilities. I can manage to get the producer to select his different facilities and writing this to a database. But when retrieving the producer facilities and setting the items he selected to true is what I'm struggling to do. The SelectionMode is set to Multiple.
Can someone please share some advice. I have searched Google yesterday and today, but can't find anything.
If there any good articles, please let me know.
Regards,
ma se
|
|
|
|
|
hi friend i building application by C# to webBrowser
i want edit proxy and some attribute (process bar when load web site to computer) of internet Explore
i hope someone help me
AnhTin
-- modified at 1:58 Thursday 4th May, 2006
|
|
|
|
|
hi all,
how can i use win api to get the active program on the system please.
if am trolling through alot of sites and not finding anything. I can get the window from it text and activate it and a hand full of other things but not able to find the active window.
does anyone know a function to achieve this?
kind regards,
g00fy
|
|
|
|
|
Try this:
[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();
DigitalKing
|
|
|
|
|
thanx DigitalKing,
the reference i was looking at said that took and IntPtr as param, apparently not cause it works perfect.
thanx again
g00fy
|
|
|
|