|
Well it "runs" over UDP right, so I guess you could just use an UDP socket?
I've never used SNMP though so maybe I'm completely missing the point..
|
|
|
|
|
Does anyone know if there is a way of getting the default image of a file to show in a file browser.
ie .txt image will be notepad etc.
Is there a way of finding this from "System.io.DirectoryInfo" or is there some other way i could retrieve this name.
I can then display the correct type of image for the file in my browser
)
UI.Entry(Image.FromFile("FolderFull_125x125.png"
Thanx George
|
|
|
|
|
|
hi,
try to extract the icon from the file with
System.Drawing.Icon.ExtractAssociatedIcon("log.txt").ToBitmap()
you can save the image to file with bitmap.Save("log.txt.png")..
hope i could help
|
|
|
|
|
I don't think so, the OP wants the icon associated with a file, not an icon from within the file.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
bm = System.Drawing.Icon.ExtractAssociatedIcon("@C:\WINDOWS\system32\notepad.exe").ToBitmap();
This line does get the correct image thank you just dont know how to find all the others as the focused file is changed.
|
|
|
|
|
|
Hi,
i have a c# application that connects to a remote MySql database.
The application is meant for a windows 2003 server.
I have a refference to mySql.Data in my app.
What do i need in order to get the application to connect to the database?
Thanks!
|
|
|
|
|
|
I don't know why, but copying the dll (MySql.Data.dll) to the location of the application did the trick.
I'll apreciate an explaination...
Thanks again.
|
|
|
|
|
If you just want to use MySql.Data.dll, you can set "CopyLocal = true" in reference property. Then the MySql.Data.dll will be copied automatically to Debug or Release directory. You can distribute it. To connect to remote DB, then what you need is connectionstrings.
|
|
|
|
|
hw can i suspend and resume thread.
|
|
|
|
|
From MSDN : "Thread.Suspend has been deprecated. Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources. http://go.microsoft.com/fwlink/?linkid=14202"
http://msdn.microsoft.com/en-us/library/ms173179.aspx[^]
|
|
|
|
|
Hi
I have a client requirement that we need to implement paging in sharepoint document library.
For instance in some cases document library contain 100 or more files in such cases we need to implement paging.
Can any one suggest any solution that can be implemented easily using jquery or server side code.
Any help in this case will be appreciated.
|
|
|
|
|
Don't spam the forums looking for an answer. This is clearly a SharePoint related question that should not have been asked here.
only two letters away from being an asset
|
|
|
|
|
Hi All,
I have an application (Win Forms) that amongst other things downloads files from a server. This is done with the use of a mapped network drive.
The problem is sometimes the network drive will have a red cross (vista) to show it is not connected, it simply takes the user to double-click the desired path in order for it to connect. But if I try to access it through code while it is 'not connected' then it fails. All it takes is the user to double-click the drive and then the application will work again fine. But I don't want users to have to do this.
Basically, I want to know if there is a way I can check the connection status, and if need be, attempt to connect the drive before accessing the files. I don't want to un-map/re-map the drive each time either.
Thanks for any suggestions
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Could you not:
if (!File.Exists("DriveLetter:\PathToSomeFileOnMappedDrive"))
{
Refresh the mapping here
}
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks for your reply,
I get how to test is I can access it but I do not know how to ask it to try to connect.
I don't want to have to un-map the drive and re-map because that seems messy and will probably result in user-rights issues for some of my users
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
This[^] has a zRestoreDrive method that would appear to do what you require.
It is a more recent version of Map Network Drive (API)[^] from here on Code Project.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks, I'll take a look
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Not supported in vista and later[^]
But it's given me something to search for, was getting no where before so thanks for that. I'll post if I get an answer
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
isn't MSDN great? they tell you the function is gone, but don't point you to a solution...
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
I know, I really was expected to get somewhere from that. Well maybe I can use this as an excuse to stop my users having Vista!
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
musefan wrote: Well maybe I can use this as an excuse to stop my users having Vista!
One needs an excuse?
|
|
|
|
|
hi,
i doing one stanalone application in that i am crearing a login control in this i am checking the name and pssw which stored in the data base if the name and passw present in data base then user get login else error mssg
i tried some here but when i run my prog. it shows runtime exception that connection not open need help
here is my code
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private OleDbCommand cmd;
private void Form1_Load(object sender, EventArgs e)
{
String connectionString = "Provider= Microsoft.Jet.OLEDB.4.0; Data Source= C:\\Login1.mdb; username=xxx;password=xxx;database=login1";
OleDbConnection connection = new OleDbConnection(connectionString);
connection.Open();
string selectString =
"SELECT Name, Password " +
"FROM login1 " +
"WHERE Name = '" + login.Text + "' AND Password = '" + psw.Text + "'";
cmd = new OleDbCommand(selectString, connection);
connection.Open();
String strResult = String.Empty;
if (strResult.Length > 0)
{
label5.Text = "YOU ARE LOGGED IN!";
}
else
{
label5.Text = "INCORRECT USER/PASS!";
}
connection.Close();
|
|
|
|