|
See this:
http://msdn2.microsoft.com/en-us/library/f591a55w.aspx
|
|
|
|
|
i tried but when i set a link as http://microsoft.com the text display should be only microsoft.com , but the text displayed is http://microsoft.com
please suggest Any other way to solve this.
Thanks,
Pramod
|
|
|
|
|
For example, if you want to open Directory c:\ then use
file:\\c:\
or if you want to open d:\temp then use
file:\\d:\temp
|
|
|
|
|
Hi,
How do i control access to a directory or file in a network programatically .Im using .Net Framework 1.1
(I have to restrict access to network for a particular user programatically)
Thanks in advance,
Luck is Opportunity with hardwork
|
|
|
|
|
Anything you do programmatically is in the context of the user that is running your program. If you want to kill access for a user, you cannot change a directory access while 'being' that user.
The only way is with network security setting the access rights on the folder. That's why we have network administrators in the world.
|
|
|
|
|
Thanks for your comments..
But is it possible to watch a directory for any changes,like we have FileSystemWatcher for files.
(or)
Is it possible to raise an Event if a shared directory is being accessed in windows.
I am using .Net Framework 1.1
Thanks in advance..
Luck is Opportunity with hardwork
|
|
|
|
|
Hi,
I need to develop a .NET application in C# that will run in a client machine.
This application should connect to a sharepoint server running in another machine, authenticate using username and password, and copy specified files from the sharepoint portal server.
I tried to use Microsoft.Sharepoint dll in the client side code, but the following error was occurring "But when I run the Application it says that the COM component is not registered or unavailable" . i feel the dll should be used only in the sharepoint server machine only.
Could someone help me in how to go about doing this.. if possible, some code snippetts will be of great help.
Thanks
Nishanth
|
|
|
|
|
Hi
I want to print a batch of invoices using crystal report. Now I am doing this using selection formula so it will send report by report to the printer.
There is an option call Group selection formula but I don’t know how to use this, is it a another way to get it done???
Shone
|
|
|
|
|
We use follwing code to create .avi file
IBaseFilter mux;
IFileSinkFilter sink;
int hr = capGraph.SetOutputFileName(MediaSubType.Avi, fileName, out mux, out sink);
DsError.ThrowExceptionForHR(hr);
hr = capGraph.RenderStream(PinCategory.Capture, MediaType.Video, theDeviceCapture, theCompressor, mux);
DsError.ThrowExceptionForHR(hr);
WE want to change fileName ,but, when we make this, the second part of code give following error
System.Runtime.InteropServices.COMException was unhandled
Message="One or more arguments are invalid"
Source="DirectShowLib"
ErrorCode=-2147024809
How can create .avi files which have different names from capture card in C#
Murat Coşkun
Design Engineer
VESTEK Elektronik Arastima Gelistirme A.S.
E-Mail : murat.coskun@vestel.com.tr
|
|
|
|
|
Hello all,
i want to show millseconds along with longtime.
how to do this
regards
GV Ramana
|
|
|
|
|
Is this what you want ?
DateTime now = DateTime.Now;
Console.WriteLine(now.Millisecond);
Console.WriteLine(now.Ticks);
|
|
|
|
|
I haven't tried this, but I think that you can combine a standard format with a custom format in a format string: "D.fff".
---
b { font-weight: normal; }
|
|
|
|
|
hi all,
how can i process date info and insert into database (into a date/time field) without any difficulty ?
i mean there are some differences between date format in different countries. (for example: english > MM/dd/yyyy or turkish > dd/MM/yyy)
how can i first check the language info used by the computer then process date according to that with c# ?
help please ...
|
|
|
|
|
You could use a CultureInfo instance for formatting as shown below:
DateTime dt = DateTime.Parse("08/01/2006");
// Use the machines current culture.
Console.WriteLine("Current Culture: {0}.", dt.ToString(CultureInfo.CurrentCulture));
// If you want to use another culture without switching your current culture you could try.
Console.WriteLine("English (US) Formatted Date: {0}.", dt.ToString(new CultureInfo("en-US")));
Console.WriteLine("English (GB) Formatted Date: {0}.", dt.ToString(new CultureInfo("en-GB")));
// Output
English (US) Formatted Date: 8/1/2006 12:00:00 AM.
English (GB) Formatted Date: 01/08/2006 00:00:00.
|
|
|
|
|
Message Closed
modified 27-Apr-15 11:20am.
|
|
|
|
|
This should do the trick:
Console.WriteLine("English (US) Formatted Date: {0}.", dt.ToString("d", new CultureInfo("en-US")));
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hello!
I just wonder how can this small code fragment work when I have Main method as
private. How can the runtime part(CLR) access main method when it is private.
public class myApp
{
private static void Main()
{
System.Console.WriteLine("Main is now private ");
}
}
//Tony
|
|
|
|
|
You can also use Reflection to call private method in a class.
|
|
|
|
|
stancrm is totally right. With Reflection you can call private members and that is probably what the .NEt runtime does.
Visibility modifiers are mostly relevant for the compiler. With Reflection you can access everything no matter what visibility it has. This not only includes calling methods, but also accessing and changing fields which are hidden privately within external classes.
|
|
|
|
|
How do i add a link to a folder in a richtext box.
When the user click on that link the specified folder should be opened.
Thanks & Regards,
Pramod
|
|
|
|
|
You can add links using the file protocol: file://c:/windows/someFile.txt
You can also add arbitrary links to your rich text box (search CodeProject for "rich text box arbitrary link") and then use Process.Start("c:\\windows\\someFile.txt") when the arbitrary link is clicked.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Messianic Instrumentals (with audio)
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Thanks for the reply,
I tried that but the Richtextbox displays the text as it is
i mean file://c:/...
whereas it should just display the file path.
And i want to set a link to a folder and not to a file.
Thanks & Regards,
Pramod
|
|
|
|
|
Yadav Pramod wrote: I tried that but the Richtextbox displays the text as it is
i mean file://c:/...
whereas it should just display the file path.
Look up the RichTextBox arbitrary links article on this site, it will allow you to do that.
Yadav Pramod wrote: And i want to set a link to a folder and not to a file
You should be able to link to a folder using the file:// protocol.
|
|
|
|
|
I have an app which defines several custom configuration classes derived from ConfigurationSection and ConfigurationSectionGroup .
In a dll I do this:
string exePath = Application.ExecutablePath;
Configuration config = ConfigurationManager.OpenExeConfiguration(exePath);
It works. Later I do:
foreach (ConfigurationSectionGroup childGroup in config.SectionGroups)
{
...
}
That works until childGroup is one of the ConfigurationSectionGroup s defined in the application. Then I get a TypeLoadException: "Could not load type '[the_section_group]' from assembly '[the_dll]'."
Is there some way I can make it load the custom types from the parent app?
Thanks in advance for any pointers.
Regards,
Phil
|
|
|
|
|
In the App.config file there is a section named configSections
The "type" member is used to specify where the type that implements the configurationSection lives e.g.
<code>
<configSections>
<section name="DataSourceProviders" type="Data_Models.Configuration.DataSourceProviderCustomConfigurationSection, Data Models, Version=1.0.2337.18582, Culture=neutral, PublicKeyToken=null" />
</configSections>
</code>
|
|
|
|