|
Replication will help you out. But i am not sure about how to configure Replication in SQL Server.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
|
Unfortunately, there is no .NET way of launching the .NET app. Your still dealing with a COM based app that knows nothing of the .NET Framework. So, the .NET application and Framework must be adapted to work in the COM world. That's why you need all the configuration on the client side. You can't get around it...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi
how can i make the tap key when pressed go to specific columns
thx
|
|
|
|
|
Override ProcessCmdKey and change the CurrentCell property when ever Tab Key is being pressed. Refer the below code for details.
public class myGrid: System.Windows.Forms.DataGrid
{
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if(keyData == Keys.Tab)
{
this.CurrentCell = new DataGridCell
(this.CurrentCell.RowNumber,1);
}
return base.ProcessCmdKey (ref msg, keyData);
}
}
Do revert back whether it could solve your purpose or not?
|
|
|
|
|
hi
i make the Right to left Property of DataGrid to "true"
but thier is a problem that the cells when i write Numbers in it ... it displays this numbers in "arabic"
i want the numbers to be in "English"
what can i do !!?
Help !?
|
|
|
|
|
First tell me what the Localizble property value of your parent control. I mean if your datagrid contained in a form. Then what is the Localizble property value of that form. If it is True . Set it back to False .Why cause the RightToLeft property is an ambient property. An ambient property is a property on a control that, if not set, is retrieved from the parent control.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Hello all
I have this problem with managing resources. I am writing a cataloging application in which i need to compute a MD5 hash value for each file in the tree structure given a directory. This is done recursively. Now until I have added a function to compute the hash everything was working smoothely however now the application freezes.
This could be because i do not have enough free resources. I tried calling a Dispose method of the MD5CryptoServiceProvier but it is protected therefore not allowed to be accessed.
IS Garbage Collector an option? If so where should it be applied.
To give you an idea. The function ComputeHash looks the following:
private string ComputeDigest(FileInfo file)<br />
{ <br />
MD5CryptoServiceProvider csp = new MD5CryptoServiceProvider();<br />
FileStream fstream;<br />
try<br />
{<br />
fstream = File.OpenRead(file.FullName);<br />
}<br />
catch(Exception e)<br />
{<br />
MessageBox.Show("Error Occured: " + e.Message);<br />
return null;<br />
}<br />
byte [] hash = csp.ComputeHash(fstream);<br />
fstream.Close();<br />
string hash_string = String.Copy(BitConverter.ToString(hash));<br />
csp.Clear();<br />
return hash_string;<br />
}
Izabela
|
|
|
|
|
Im building a C# wrapper for an unmanaged dll (BladeEnc.dll) and im not an expert in this, anyways.
I need to pass the following struct in:
BE_ERR beInitStream( PBE_CONFIG pbeConfig, PDWORD dwSamples, PDWORD dwBufferSize, PHBE_STREAM phbeStream )
typedef struct {
DWORD dwConfig;
union {
struct {
DWORD dwSampleRate;
BYTE byMode;
WORD wBitrate;
BOOL bPrivate;
BOOL bCRC;
BOOL bCopyright;
BOOL bOriginal;
} mp3;
struct {
DWORD dwSampleRate;
BYTE byMode;
WORD wBitrate;
BYTE byEncodingMethod;
} aac;
} format;
} BE_CONFIG, *PBE_CONFIG;
Now i got this in C#:
[StructLayout(LayoutKind.Sequential, Pack = 1)]
internal struct BE_CONFIG
{
public Int32 dwConfig;
public sFormat format;
}
[StructLayout(LayoutKind.Sequential)]
public struct sFormat
{
public sMP3 mp3;
public sAAC aac;
}
[StructLayout(LayoutKind.Sequential)]
public struct sMP3
{
public Int32 dwSampleRate;
public byte byMode;
public Int16 wBitrate;
public bool bPrivate;
public bool bCRC;
public bool bCopyright;
public bool bOriginal;
}
[StructLayout(LayoutKind.Sequential)]
public struct sAAC
{
public Int32 dwSampleRate;
public byte byMode;
public Int16 wBitrate;
public byte byEncodingMethod;
}
Now im testing this function (beInitStream) with the following code:
BE_CONFIG config;
Int32 dwSamples = 0;
Int32 dwBufferSize = 0;
int output;
IntPtr pConfig = IntPtr.Zero;
FileStream fs = new FileStream("C:\\test.mp3", FileMode.Create, FileAccess.Write);
config.dwConfig = BE_CONFIG_MP3;
config.format.mp3.dwSampleRate = 44100;
config.format.mp3.byMode = BE_MP3_MODE_STEREO;
config.format.mp3.bPrivate = false;
config.format.mp3.bCRC = false;
config.format.mp3.bCopyright = false;
config.format.mp3.bOriginal = false;
Marshal.StructureToPtr(Marshal.SizeOf(config), Marshal.AllocHGlobal(pConfig), false);
output = beInitStream(ref pConfig, ref dwSamples, ref dwBufferSize, fs.Handle);
Marshal.FreeHGlobal(pConfig);
fs.Close();
I keep getting the error BE_ERR_INVALID_FORMAT_PARAMETERS, so im assuming that there is something wrong with the structure.
Could anyone confirm and/or help me with this?
|
|
|
|
|
hi
i want to draw lines and pictures in datagrid headers
does any one can help me ..?
|
|
|
|
|
I am not sure about drawing picture in Datagrid Header. But i wrote an article on Datagrid Formatting which will do text formattings. Please refer that article for more information.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
How do I send a string to the printer when I click on a specific button? And how do I add a CR (carriage return) into a string?
Mike
|
|
|
|
|
Michael Williams wrote:
How do I send a string to the printer when I click on a specific button?
Printing is a complex topic (simplified by Windows Forms and .NET, but still complex). Even to print a single string, you need to create a PrintDocument object, and install handlers for various events. See MSDN documentation.
Michael Williams wrote:
And how do I add a CR (carriage return) into a string?
That's easier. Just concatenate a "\n". That should work, but in some cases, you'll need the full CRLF: "\n\r".
strLines = strLine1 + "\n" + strLine2; -- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Printing in .NET is not that much tough as i know. Please refer this article to get to know about more.
Printing in C#
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I need to read up on the implication of server farm AND database clustering on COM+ transaction. Any reference? Preferably URL's so I don't need to rush off to the bookstore.
Thanks in advance.
Norman Fung
|
|
|
|
|
I'n new to programming and I'm writing a simple app where I generate a 2 digit random number in one textbox. When I click a button, I want the value of that textbox to appear inside another textbox.
After playing with this for hours (and learning along the way), I'm getting nowhere.... The closest I've come is this;
textBox1a.Text = (textBox1.ToString());
The text is entered into the text box as follows:
System.Windows.Forms.TextBox, Text: xx (where xx is the random #)
I don't want this - I just want the random number in place and not the whole string.
Any suggestions?
Thanks,
Mike
|
|
|
|
|
I recommand you to study or refer few C# programming books. MSDN is a nice guide for newbee like you. Better don't get into Visual Studio.NET IDE untile and unless you know little about how to use .NET laguages.
Here is the solution for your issue.
textBox1a.Text = (textBox1.Text.ToString());
Sreejith Nair
[ My Articles ]
|
|
|
|
|
sreejith ss nair wrote:
MSDN is a nice guide for newbee like you.
MSDN has a lot of useful information for anyone programming with Microsoft technologies. (I'll assume the condescending tone was unintentional.)
sreejith ss nair wrote:
Better don't get into Visual Studio.NET IDE untile and unless you know little about how to use .NET laguages.
I think that is bad advice. Read all you can, yes, but do it in addition to coding, not instead of it.
Charlie
if(!curlies){ return; }
|
|
|
|
|
sreejith ss nair wrote:
textBox1a.Text = (textBox1.Text.ToString());
Why, again, are you using .ToString() on a string???
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
There are no default properties in C#, so you'll need to specifically state what property of textBox1 you're trying to get at, which, in this case, is the Text property.
textBox1a.Text = textBox1.Text; The compiler can't infer what you meant because you could have just as easily wanted to display textBox1 's Name , BackColor , or PasswordChar , etc., in textBox1a .
Charlie
if(!curlies){ return; }
|
|
|
|
|
Thanks for the help. The first reply solved my problem. I agree that I should be reading AND doing to learn the mosr efficient way. Thanks Charlie!
I have another ? that I'll post in a new thread.
Mike
|
|
|
|
|
Any suggested reading on Class's, Inheritance and class accessbility with C#?.. I'm getting my feet wet with ClassLibraries and been finding nothing but too abstract examples from .NET's help.. want to protect what can be instantiated w/out nesting class's.. trying to funnel creation thru single class. I'm sure its the bee's and not the bears in this neck of the woods but if anybody's found any good examples plz let me know..
aspiringCodeMonkey says ...
|
|
|
|
|
You Wrote : Any suggested reading on Class's, Inheritance and class accessbility with C#?
In .NET we have different class types. Say Abstract class, Selaled class , Concreate Class , Singleton class etc.
In .NET we have classical(is a) inheritance and containmnet(has a).
In .NET we have different type of access modifiers. Say Public,private,Protected,Internal,Internal Protected.
So it is very tough to explain entire concept in a small paragraph. And also it is very tough to see your requirement in one article (consolidated). So what i suggest you is search and find few article related to above mentioned keywords.
This will also help you to learn about Class Libraries
Getting Started With Class Lib
Sreejith Nair
[ My Articles ]
|
|
|
|
|
The immediate answer to your problem is to specify any classes that you only want visible within the class library as 'internal', and have one 'public' class, which is accessible to anything referencing your library. However, internal classes are completely invisible outside the class library.
Another trick is to make a class public, but make all its constructors internal, so it can only be created by other classes in the same library, but can then used by any code anywhere.
Hope that helps,
Andrew
|
|
|
|
|
How can I divide Application to FRAMES so that I can display Forms to these Frames ?
Who know please help me.
Thanks alot
change global
|
|
|
|