|
The flags of the member doesn't fit the flags that you have specified.
---
b { font-weight: normal; }
|
|
|
|
|
the member "test_mdi_Init" is a public method. also if use 'BindingFlags.Public' it throws an exception "Attemp to access a missing member". so what do you suggest?
|
|
|
|
|
BindingFlags.Default is 0, so you can remove that. I think you need BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance .
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
thank you for your reply. BindingFlags.InvokeMethod works fine. i didn't make my method 'ststic', that's why i was having exception. Sorry, my mistake
|
|
|
|
|
thank you for your reply. BindingFlags.InvokeMethod works fine. i didn't make my method 'static', that's why i was having exception. Sorry, my mistake
|
|
|
|
|
Hello evryone
i am able to make the text in a file be read out on the click of a button.But to pause and resume, im not able to. I tried using the Pause() method of SpVoice...but not fruitfull... How do i resume speaking too?
Kindly help
Cheers
Annie
-- modified at 8:05 Sunday 19th March, 2006
|
|
|
|
|
Could you please rewrite your post (in English if possible) so that someone will be able to help you...
Provide more information etc...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I have to read out the contents in a file on a buton click. I cam make it speak.But not able to pause and resume. I tried using the Pause() method of SpVoice...but not fruitfull...
I have to code this in C#. Already done code is in VB.
I already posted in english only.
Kindly help.
Cheers
Annie
|
|
|
|
|
Hello everyone..I am able to do so...The pause() and resume() fns work jus fine..
|
|
|
|
|
I created a DataView, the associated DataTable has some calculated columns which is from other DataTable (Table B). Whenever I changed something in Table B, the DataView won't reflect the latest changes in the calculated column.
How do I refresh the DataView, so that it reevaluate the calculated columns? I tried to purposely change the RowFilter but to no avail.
Thanks.
|
|
|
|
|
I have assigned a string[] object to a property grid and I am able to view and edit the elements. I have turned off the default editor (i.e. the ellipsis is no longer shown), by implementing an extension of the UITypeEditor class and overriding the GetEditStyle method and setting UITypeEditorEditStyle to None. I have called this class NoEditor.
However next to the string[] object in the property grid there appears "String[] Array". I do not want to show this. So I wrote this class:
internal class HeadingListConverter : ExpandableObjectConverter
{
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
{
if (destType == typeof(string) && value is string[])
{
return "";
}
return base.ConvertTo(context, culture, value, destType);
}
}
These two lines are added to the property,
[EditorAttribute(typeof(NoEditor),typeof(UITypeEditor)),
TypeConverter(typeof(HeadingListConverter))]
However, although now the object displays the text I require next to it, the result is that the string[] object is displayed as a System.String[]. So it displays the properties of the System.String[] object like rank and length rather than the elements which I require.
What am I doing wrong? I hope I have explained the problem clearly - any help is appreciated.
|
|
|
|
|
Got it now!!! FYI, extend from ArrayConverter instead of ExpandableObjectConverter.
|
|
|
|
|
Is it possible to get floating panes for windows applications in C# .... just like the 'properties' and 'solution explorer' panes in the Visual Studio .NET IDE
-- modified at 3:48 Sunday 19th March, 2006
|
|
|
|
|
For VS2005, you need to install VSIP sdk, its an extensible sdk. Using VSIP you can create floating pane like properties, solution explorer etc. Also you can implement functionality similar to floating pane.
Regards,
Shiby
|
|
|
|
|
I want to create a button on the Visual Studio standard toolbar (an addin basically) which will give me the path of the currently opened project (solution file) in the IDE. I created a an addin with the following code - 'Application.StartupPath'. However all that this button does is give me the path of the IDE (i.e. devenv.exe). I want the path of the currently opened project. Any suggestions guys.
|
|
|
|
|
If what you are trying to retive is the path of your application when it is running,
//you can use the following function that will return the oath string
Directory.GetCurrentDirectory()
Adn Dont forget to include
using System.IO;
|
|
|
|
|
You'll need to get a reference to an instance of the DTE interface (I can't remember how you do this), from there on you go through something like this:
DTE.Solution.Projects, I don't know how to get the currently opened project but once you have then then each Project class contained inside Projects has a FileName property which is what you want.
Sorry I don't know how to get the active project but this I think is the correct way to go about it.
Ed
|
|
|
|
|
I would like to capture the specific events of running instances of IE. I am using the ShellWindows to get all the running instances of IE. I can get the some of the events to fire, such as OnTitleChange. But, I cannot get the WindowSetLeft event to fire. I am trying to use this event so that I know when the user is moving one of the IE windows on the screen. I need to know the position of each IE window when it changes. Thanks for the help in advance.
using System;
using System.IO;
using SHDocVw;
using System.Text;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.ComponentModel;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace JTCG.JWS.Browse.BrowseTOC
{
public class ActivityMonitor
{
[DllImport("User32.Dll")]
public static extern void GetWindowText(int h, StringBuilder s, int nMaxCount);
//variable declaration
private SHDocVw.InternetExplorer browser;
private SHDocVw.ShellWindows shellWindows;
private ArrayList Current_IE_Handles;
#region Constructor
public ActivityMonitor()
{
Current_IE_Handles = new ArrayList();
shellWindows = new SHDocVw.ShellWindowsClass();
shellWindows.WindowRegistered += new SHDocVw.DShellWindowsEvents_WindowRegisteredEventHandler(shellWindows_WindowRegistered);
shellWindows.WindowRevoked += new SHDocVw.DShellWindowsEvents_WindowRevokedEventHandler(shellWindows_WindowRevoked);
}
#endregion
// THIS EVENT IS FIRED WHEN THE A NEW BROWSER IS CLOSED
private void shellWindows_WindowRevoked(int z)
{
//variable declaration
string filnam;
ArrayList Closed_IE;
StringBuilder sb;
//variable initialization
Closed_IE = new ArrayList();
sb = new StringBuilder(1024);
foreach (SHDocVw.InternetExplorer ie in shellWindows)
{
filnam = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();
if (filnam.Equals("iexplore"))
{
Closed_IE.Add(ie.HWND.ToString());
}
}
for (int i=0; (i< this.Current_IE_Handles.Count); i++)
{
bool check = false;
for (int j=0; (j<Closed_IE.Count); j++)
{
if (Convert.ToInt32(this.Current_IE_Handles[i]) == Convert.ToInt32(Closed_IE[j]))
check = true;
}
//IE handle not in ArrayList
if (check == false)
{
this.Current_IE_Handles.RemoveAt(i);
break;
}
}
}
// THIS EVENT IS FIRED WHEN THE A NEW BROWSER IS OPEN
private void shellWindows_WindowRegistered(int z)
{
//variable declaration
string filnam;
StringBuilder sb;
//variable initialization
sb = new StringBuilder(1024);
//loop through all windows in shell
foreach (SHDocVw.InternetExplorer ie in shellWindows)
{
filnam = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();
if (filnam.Equals("iexplore"))
{
browser = ie;
bool check = true;
for (int i=0; (i<Current_IE_Handles.Count); i++)
{
if (Current_IE_Handles[i].ToString() == browser.HWND.ToString())
{
check = false;
break;
}
}
if (check == true)
{
Current_IE_Handles.Add(browser.HWND.ToString());
//-----------------------------------------------------------------
//-------------------My code below---------------------------------
IWebBrowserApp m_WebBrowserApp = (IWebBrowserApp)browser;
//set up events may want to make below code a method
if (m_WebBrowserApp != null)
{
//Application.DoEvents();
DWebBrowserEvents2_WindowSetLeftEventHandler DSetLeft = new DWebBrowserEvents2_WindowSetLeftEventHandler(WindowSetLeft);
browser.WindowSetLeft += DSetLeft;
DWebBrowserEvents2_TitleChangeEventHandler DTitleChangeE = new DWebBrowserEvents2_TitleChangeEventHandler(OnTitleChange);
browser.TitleChange += DTitleChangeE;
}
//-----------------------END of my code----------------------------
}
}
}
}
static void OnTitleChange(String Text)
{
MessageBox.Show("Title changes to " + Text);
}
static void WindowSetLeft(int Left)
{
MessageBox.Show("set left : " + Left.ToString());
}
}
}
Mario Williams
Systems Analyst (DoD)
Eglin Air Force Base, FL
|
|
|
|
|
Say I have put some standard Button in a form.
Then I created a ButtonEx control inherited from Button.
How do I quickly replace all Button in the form with ButtonEx, and copying the properties of Button to ButtonEx automatically?
Thanks.
|
|
|
|
|
Open the code view, and use a simple search and replace.
|
|
|
|
|
Thanks a lot
|
|
|
|
|
Hello,
Thanks for your visit.this is my first message.
i am very love the Menu and toolbar in VS2005,but i am a new person in C#,
can some one give me a think about how to write it?
or give me some source code about it.
thanks to everyone,with best wishes.
PS:My english is pool,if have some mistake in this message,don't laugh me.
very good
|
|
|
|
|
|
Hi,
I am learning C# gui, I was wondering how to match GUI similar to RealPlayer, MusicMatch, iTune or Windows Media Player.
Mainly - Nom Rectangular GUI, rounded buttons, Goodlooking scrollbar etc???
Any help is appreciated.
Thanks in advance.
|
|
|
|
|