|
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 ?!
|
|
|
|
|
I'm going to do a very very small painting program where I will load a picture on some kind of panel (I already managed that with a PictureBox). Then I will also let the user do a very trivial lines on the pictures. I have also managed that with:
Graphics g = pictureBox1.CreateGraphics();
My problem comes when I want to save the picture with the users paintings…
I manage to save the picture like this:
Image image = pictureBox1.Image;<br />
image.Save("C:\\bitmap.bmp", Imaging.ImageFormat.Bmp);
But I do not get the users painting saved…?
All tips are welcomed!!
_____________________________
...and justice for all
APe
|
|
|
|
|
Drawing onto a control via a Graphics object does not affect the image object displayed by that control. You will need to get a Graphics object for the Bitmap (via the Graphics.FromImage method) and draw whatever lines the user creates onto the in-memory image. Then, and only then, will the actual bitmap object be modified.
Josh
|
|
|
|
|
Can anybody tell what are the important and frequently used design patterns in C# solutions (projects or products)
santosh
|
|
|
|
|
|
sorry the message heading should be "Important design partterns in C# solutions". I just want to know, what are the regularly used Design patterns in C#, so that i can upgrade knowledge related to those patterns
santosh
|
|
|
|
|
kumar.bs wrote: sorry the message heading should be "Important design partterns in C# solutions"
Microsoft patterns & practices are Microsoft's recommendations for how to
design, develop, deploy, and operate architecturally sound applications for
the Microsoft application platform.
Sounds pretty important to me, but what do i know right?
Getting Started[^]
I know for me two of the most important patterns are:
1) Using Web Search Technology
2) Reading
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
mike, thanks for you replies. Thing is that, i don't know for what type of classes or situation what type pattern need to be implemented. So, when you ask me "what classes are you using?" for this i don't have right answer, i mean, i am not doing any hi-fi coding. But trying to explore what type of class needs what type of pattern.
santosh
|
|
|
|
|
That is why I sent you there. It seemed like you could use some bootstrapping on the subject. Sometimes the answers one is looking for cannot be supplied as simply as Do (A) then do (B). Rather they require a contextual understanding before focusing in on a detailed level.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
The textbox controll doesn't get Paint event, so how can i draw over it?
|
|
|
|
|
Add this string to TextBox constructor:
<br />
this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);<br />
Best regards, Alexey.
|
|
|
|
|
yes but where is the textbox Paint event?
|
|
|
|
|
In TextBoxBase class.
Best regards, Alexey.
|
|
|
|