|
|
CP MVP again? If I didn't know any better, I'd swear you were
amassing outstanding achievements...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
You as well! However since you are a VC MVP it's almost required right?
Have a great year Mark
led mike
|
|
|
|
|
How can I learn a computer's machine name and user name by using IP adress?
Can you help me please?
Thanks in advance.
|
|
|
|
|
An IP Address won't reveal that information unless your application is on the target machine. If it is, you wouldn't use the IP address either way.
Why do you keep changing your forum name?
|
|
|
|
|
I don't know first I used my real name then I decided not to use my real name.
Thanks for the answer
|
|
|
|
|
I have to go I have a roll call.
|
|
|
|
|
you can lookup the host name of a computer on a network like this:
System.Net.Dns.GetHostEntry("127.0.0.1").HostName
|
|
|
|
|
That will give you the DNS hostname, not necessarily the Windows Computer Name.
|
|
|
|
|
ok, hopefully that's better than nothing
|
|
|
|
|
I just hope the OP knows the difference.
|
|
|
|
|
The code works for my computer's IP address but when I try an another IP address it gives the IP address of the target computer.
|
|
|
|
|
Here is the code
It works.
Thank you.
System.Net.Dns.GetHostByAddress(IPaddress).HostName.ToString();
|
|
|
|
|
But I have an another problem. I can't send ping every computers. Can you help me with it?
|
|
|
|
|
My.Computer.Network.Ping[^].
BTW, pinging a machine only tells you in the network stack of the target computer is working, up to a certain point, and that's only IF it doesn't have a firewall blocking ICMP traffic. It will NOT tell you if the target server you're trying to connect to is actually listening.
|
|
|
|
|
|
I want to update values of combobox in HTML pages by combobox in Windows Form by language C#
Thanks
|
|
|
|
|
how to clear this graphic? if i draw graphic to screen
example: public static void DrawToScreen(int pointX, int pointY)
{
IntPtr deskDC = UnmanagedMethods.GetDC(IntPtr.Zero);
Graphics g = Graphics.FromHdc(deskDC);
GraphicsContainer cont = g.BeginContainer();
g.SmoothingMode = SmoothingMode.AntiAlias;
g.SmoothingMode = SmoothingMode.HighQuality;
g.FillRectangle(new SolidBrush(Color.FromArgb(255, Color.Blue)), pointX, pointY, 2, 2);
g.EndContainer(cont);
g.Dispose();
UnmanagedMethods.ReleaseDC(deskDC);
}
this fucntion fill rectangle to screen.
if i need to clear screen(clear desktop), how i do?
please give some tips or hints for me
thanks a lot....
|
|
|
|
|
Why do you need to paint to the Desktop? Have you considered using a full-screen application instead?
|
|
|
|
|
Maybe it is a hoax.
Tan Li
I Love KongFu~
|
|
|
|
|
i can't using fullscreen
because i need to draw to screen when i drag mouse
now i can draw when drag but can't clear that screen
if draw on form, can use invalidate()
if not on form, how can i do?
please give some hints or tips to me
thanks a lot....
|
|
|
|
|
I'm really guessing now, but have you tried using Invalidate? It may force Windows to redraw the desktop (it is, after all, just a different kind of window). If not, I'm afraid I'm stumped, sorry.
|
|
|
|
|
how to use invalidate?
please advice me...
i read invalidaterect from dllimport user32.dll but don't understand
if have another function or other as same as invalidate.
please advice me.
thanks a lot...
|
|
|
|
|
hello
How not to hardcode conn string username/pwd in plaintext for log4net ADO.NET appender?
<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
<bufferSize value="0" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<!-- How not to have username/pwd in plaintext? -->
<connectionString value="data source=LAPPC2;initial catalog=SomeDB;integrated security=false;persist security info=True;User ID=dev;Password=somepwd" />
...
</appender>
See above, username "dev" and password are in plaintext.
Same question for nhibernate - see example below:
<configuration>
<configSections>
<section
name="nhibernate_SomeDB"
type="System.Configuration.NameValueSectionHandler, System,Version=1.0.5000.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" />
<section
name="nhibernate_AuditTrail"
type="System.Configuration.NameValueSectionHandler, System,Version=1.0.5000.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" />
</configSections>
<nhibernate_SomeDB>
<add
key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvider" />
<add
key="hibernate.dialect"
value="NHibernate.Dialect.MsSql2000Dialect" />
<add
key="hibernate.connection.driver_class"
value="NHibernate.Driver.SqlClientDriver" />
<add
key="hibernate.connection.connection_string"
value="Server=localhost;initial catalog=SomeDB;User Id=dev;Password=somepwd;Min Pool Size=2" />
</nhibernate_SomeDB>
<nhibernate_AuditTrail>
<add
key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvider" />
<add
key="hibernate.dialect"
value="NHibernate.Dialect.MsSql2000Dialect" />
<add
key="hibernate.connection.driver_class"
value="NHibernate.Driver.SqlClientDriver" />
<add
key="hibernate.connection.connection_string"
value="Server=localhost;initial catalog=SomeOtherDB;User Id=dev;Password=somepwd;Min Pool Size=2" />
</nhibernate_AuditTrail>
</configuration>
dev
|
|
|
|
|
You can put the connection string in your app and set the connection string before attempting to use the database.
Or, you can encrypt it in the app.config file.
Google is your friend.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|