|
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.
|
|
|
|
|
I have a listview control on a windows form, that is populated with data from the database. How do I ensure that the scrollbars of the listview are always visible, even when the contents are smaller than the control size. If any code could be provided, this would be appreciated.
Thanks in advanced.
listview scrollbar
|
|
|
|
|
I want to use a .vb file in my c# project. Is that allowed? I added one and it does compile, but I don't know how to access the methods in the .vb file.
Can someone tell me if what I'm trying to do is even possible?
Thanks
Joe
|
|
|
|
|
Put the vb files in a seperate project in your solution and compile them as a seperate dll. Add a reference in your c# project to the vb project and you should be able to use all the classes in the vb project.
|
|
|
|