|
Thanks. Too bad it does not support 32-bit icons. It pops up a warning when 32-bit icons are opened.
|
|
|
|
|
how to protect usb disc by password ?
|
|
|
|
|
Is there any Win32 API can change windows logon password?
|
|
|
|
|
|
|
i'm using console.. i've a big problem in "sorting" a text file (contents inside the file) and save as another file.. SOmeone help me to solve my problem or give me a sample codes for that... tnx... ((
regards,
JayR
|
|
|
|
|
What's the problem?
Are you sorting it numerically or alphabetically?
Line by line?
Please be more specific.
|
|
|
|
|
Here is an example from MSDN on how to use a SortedList object:
using System;
using System.Collections.Generic;
public class Example
{
public static void Main()
{
SortedList<string, string> openWith =
new SortedList<string, string>();
openWith.Add("txt", "notepad.exe");
openWith.Add("bmp", "paint.exe");
openWith.Add("dib", "paint.exe");
openWith.Add("rtf", "wordpad.exe");
try
{
openWith.Add("txt", "winword.exe");
}
catch (ArgumentException)
{
Console.WriteLine("An element with Key = \"txt\" already exists.");
}
Console.WriteLine("For key = \"rtf\", value = {0}.",
openWith["rtf"]);
openWith["rtf"] = "winword.exe";
Console.WriteLine("For key = \"rtf\", value = {0}.",
openWith["rtf"]);
openWith["doc"] = "winword.exe";
try
{
Console.WriteLine("For key = \"tif\", value = {0}.",
openWith["tif"]);
}
catch (KeyNotFoundException)
{
Console.WriteLine("Key = \"tif\" is not found.");
}
string value = "";
if (openWith.TryGetValue("tif", out value))
{
Console.WriteLine("For key = \"tif\", value = {0}.", value);
}
else
{
Console.WriteLine("Key = \"tif\" is not found.");
}
if (!openWith.ContainsKey("ht"))
{
openWith.Add("ht", "hypertrm.exe");
Console.WriteLine("Value added for key = \"ht\": {0}",
openWith["ht"]);
}
Console.WriteLine();
foreach( KeyValuePair<string, string> kvp in openWith )
{
Console.WriteLine("Key = {0}, Value = {1}",
kvp.Key, kvp.Value);
}
IList<string> ilistValues = openWith.Values;
Console.WriteLine();
foreach( string s in ilistValues )
{
Console.WriteLine("Value = {0}", s);
}
Console.WriteLine("\nIndexed retrieval using the Values " +
"property: Values[2] = {0}", openWith.Values[2]);
IList<string> ilistKeys = openWith.Keys;
Console.WriteLine();
foreach( string s in ilistKeys )
{
Console.WriteLine("Key = {0}", s);
}
Console.WriteLine("\nIndexed retrieval using the Keys " +
"property: Keys[2] = {0}", openWith.Keys[2]);
Console.WriteLine("\nRemove(\"doc\")");
openWith.Remove("doc");
if (!openWith.ContainsKey("doc"))
{
Console.WriteLine("Key \"doc\" is not found.");
}
}
}
---
b { font-weight: normal; }
|
|
|
|
|
Take a look at regular expressions.
|
|
|
|
|
tnx for the info...
regards,
JayR
|
|
|
|
|
Hello,
I have an application with a server part that I host in IIS. It was working fine, until earlier today when I updated the .dll files and it started throwing a SerializaionException on the client. Last time what I did was to remove the web site from IIS and add everything again. Now I have done it several times, and I can't get it to work.
I haven't changed anything in code or in my .config files.
The steps I use to set up the server in IIS are:
1. Create a web site with the wizard, allowing anonymous access.
2. Create an application for each of two subfolders (one is a web app, the other the remoting server).
3. For the web app, add default document Default.aspx .
The web app runs fine, but when it tries to create a remote object, I get an exception, which is the same I get from my Windows Forms client application: a SerializationException with this message:
The input stream is not a valid binary format. The starting contents (in bytes) are: 3C-68-74-6D-6C-3E-0D-0A-20-20-20-20-3C-68-65-61-64 ...
The bytes are simply the HTML/HEAD tags of a web page, so there's a configuration/permissions problem.
I've tried giving full access to both ASPNET and machine_IUSRmachine users, and nothing has worked. I have deleted the web site and recreated it, restarted IIS, and nothing works!
I know this might not be enough information, but that's everything I can't think of. The worst thing is that it was working before.
So, any ideas? I am really desperate!
Thanks in advance!
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
-- modified at 21:34 Wednesday 10th May, 2006
|
|
|
|
|
Somehow the IIS application got reset to the default process, and the remoting sever needs to run in its own process.
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
|
|
|
|
|
Hi,
After I finished my Win Application (with SQL Server 2005), I wanted to ship my application with the .mdf database file. But the version of the software I am using in my PC, I have my personal data in the .mdf. I want to ship the empty .mdf file but At the same time I dont want to delete those data in my version of the .mdf which is installed in my PC. I am really having difficulties with that. Because, All instanced of the .mdf file is being synchornized everytime. So Do I need to take a copy of this .mdf file to another computer and delete all data and then make the installer to ship ? Inst there any other easy way to do that ?
Thanks
Emran
|
|
|
|
|
i only have sql server 2000, so i dont know if this reply will completely answer your question.
try creating a new database then importing the data into it.
if that doesnt work, then try copying your .mdf and .mdl to a different name, then attaching them in sql server as a different database name.
if neither of those work, then i would wait for someone else who might have a better idea or (perhaps quicker) would be what you suggested.
|
|
|
|
|
I have Win XP and when I run my program all my menu items look white as if all of them has got focus. Can someone please help and tell me how to make my menu item the same grey as the menu bar at run time? Thank you.
|
|
|
|
|
Have you tried changing the BackColor property for the individual menu items?
Paul
|
|
|
|
|
There is no BackColor or even Color property available for menu items. I am using Visual Studio.net and .Net framework 1.1.
|
|
|
|
|
I'll admit that I wasn't aware of .Net 1.1 not those properties available. My previous post was from using .Net 2.0. Are you required to use .Net 1.1?
Paul
|
|
|
|
|
Yes I am required to usr .NET 1.1. Would appreciate any help. Thank you.
|
|
|
|
|
irumamir wrote: Yes I am required to usr .NET 1.1.
That is a bummer because .Net 2.0 takes care of it.
PJC
|
|
|
|
|
I'm using the webbrowser control to login. How can I programmatically click on the login button if I don't know the name of the button.
<br />
<br />
HTMLDocument myDoc = new HTMLDocumentClass();<br />
myDoc = (mshtml.HTMLDocumentClass)wBrowser.Document;<br />
<br />
HTMLInputElement txtUser = (HTMLInputElement) myDoc.all.item("username", 0);<br />
HTMLInputElement txtPass = (HTMLInputElement) myDoc.all.item("password", 0); <br />
txtUser.value = "ausername";<br />
txtPass.value = "apassword"; <br />
<br />
The login button has no name, so I don't know how to access it. Any idea?
|
|
|
|
|
I need to create a property for my custom control visible in visual studio property grid.
But if i click on in it open a openfiledialog to serch a path as BackgroundImage for a picturebox.
How can i do?
I've tryed with [Browsable(true)] but it doesn't work.
|
|
|
|
|
Use a filtered UI Type Editor:
...
using System.Drawing.Design;
using System.Windows.Forms.Design;
...
internal class MyFileNameEditor : FileNameEditor
{
protected override void InitializeDialog(OpenFileDialog openFileDialog)
{
base.InitializeDialog (openFileDialog);
openFileDialog.Filter = "JPEG Files (*.jpg)|*.jpg|All Files (*.*)|*.*";
}
}
...
[EditorAttribute(typeof(MyFileNameEditor), typeof(UITypeEditor))]
public string PictureBoxBackgroundImage
{
get { return m_bgImagePath; }
set
{
m_bgImagePath = value;
Image bgImage = Image.FromFile(m_bgImagePath);
this.thePictureBox.BackgroundImage = bgImage;
}
}
--
I've killed again, haven't I?
|
|
|
|
|
very very tnx! sorry if i've not answer you before.
|
|
|
|
|
Hi..
I want to use the CmdLoadFromResource() method of ths speech SDK 5.1 to make the xml file that includes the Grammar embeded but i dont know how to use this method in C#.
This code shows how i used this method:
[System.Runtime.InteropServices.DllImport("kernel32")]
private static extern long LoadLibrary(string lpLibFileName);
private void button2_Click(object sender, System.EventArgs e)
{
this.objRecoContext = new SpSharedRecoContext();
this.objRecoContext.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(RecoContext_Recognition);
this.objRecoContext.State=SpeechRecoContextState.SRCS_Enabled;
grammar = objRecoContext.CreateGrammar(0);
int hModule=Convert.ToInt32(LoadLibrary("ReviewWinApp.dll"));
int langID=409;
grammar.CmdLoadFromResource(hModule,"tryRecog.xml","CFGGRAMMAR",langID,SpeechLoadOption.SLODynamic);
grammar.State=SpeechGrammarState.SGSEnabled;
grammar.CmdSetRuleIdState(1,SpeechRuleState.SGDSActive);
}
When i click this button i got the error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ReviewWinApp.exe
Additional information: The specified resource type cannot be found in the image file.
Could any one give me a C# code sample for using this method?
For along time no one answered my question in several forums in several websites !
I thought that a lot of people have used Speech sdk5.1 ?!
|
|
|
|