|
I'm trying to change all text entries in a ComboBox to upper case. However, the first time I make a change to the text, the application does not register the changed text. The next time I make a change to the text, it works as specified. In other words, when the textchanged event is called, it converts the actual text to upper case letters.
Is there a reason for this and how do I circumvent this problem? Thanks.
|
|
|
|
|
My question to you is, do you want to convert everything to upper case after or during the user is entering text?
If after, listen for the Validated or Validating event, you can convert to upper then.
If during, listen for the KeyDown event and modify the text accordingly.
|
|
|
|
|
I am working on a form that will get hosted inside a COM app. For some of the stuff that I am trying to do (adding managed controls to the COM form, etc), it requires that I have an instance to the COM form that is hosting my form. I've tried Control.FromHandle but that seems to only work for Controls that have been created from the managed side of things (verified using Reflector). Does anyone have any other suggestions? I'd really appreciate any help I could get.
|
|
|
|
|
I was able to establish call using TAPI, and how can I send or recieve fax after that? I want to create an faxing aplication, which will not launch "windows fax console"(such as most examples i saw(faxcom.dll)).
Thanks
SAns
|
|
|
|
|
Hi, I am looking for some advice or direction on best practice with the following. I am working on a mature ASP application written in Delphi. We want to move to c# but don;t want to re-write the whole app.
We've looked at using the 'project/add references' method to import the dll and also looked at creating wrapper classes that use the [import dll] type attributes. We expose methods etc. that we need from the dll through interfaces fefinde in its type library.
are there any pitfalls to this ? performance issues ? or even a better way of doing this ?
any ideas much appreciated
thks
bren
|
|
|
|
|
There will always be performance issues when working between .NET and COM. My suggestion would be to create a wrapper assembly. As you port functionality from the Delphi app to C#, change the wrapper to point to the correct one. That will be your single integration point. Whether the wrapper assembly turns into your .NET assembly or you create a separate one doesn't really matter too much, but you should also take into consideration what should happen when you get rid of the Delphi app and all you have left is the wrapper and business assemblies. There are pros and cons for choosing either way, of course.
Michael Flanakin
Web Log
|
|
|
|
|
Hi Michael,
thanks for the reply - very helpful as I was solely focused on ways of using the dll - the idea of a specific assembly to do this that we could gradually re-write the business logic in hadn't oocured to me. With that approach we could 'cherry pick ' the parts we have the resources to re-do in .Net...
thks again
bren
|
|
|
|
|
No problem. Glad I could help. You know what they say, "100 billion heads are better than one!"
Michael Flanakin
Web Log
|
|
|
|
|
How can I add values to Columns in a ListBox in Windows Forms Application?
and How to select the whole row as one?
Thanks,
Sandeep
+919891027854
|
|
|
|
|
when i click on a button i start a Process that open a file with its default program as for txt the notepad.
I want to understand when the user close the default program.
i thought when he did it the process ended, so i've tried to do that:
myProcess.Disposed += new System.EventHandler( this.ProcessDisposed );
myProcess.Exited += new System.EventHandler( this.ProcessExited );
but it doesn't works.
So how can i establish it?
|
|
|
|
|
Set the Process.EnableRaisingEvents property to true.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
|
while running an email application iam bounded with the following error
Error Because : Could not access 'CDO.Message' object.
|
|
|
|
|
http://www.systemwebmail.com/faq/4.2.10.aspx#4.2.10
|
|
|
|
|
This happens generally due to the mail server authentivcation problem. Try providing valid credentials for the mail server you are using.
MailMessage sms = new MailMessage();
sms.To = smsTo;
sms.From = from;
sms.Subject = smsSubject;
sms.Body = smsBody;
sms.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
sms.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",username);
sms.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",password);
|
|
|
|
|
Can I Exporti Excell Sheet into database.
I need to enter all the data in an Excel sheet.when i select and submit the sheet it should store in database according to the cells
|
|
|
|
|
check this
http://www.c-sharpcorner.com/winforms/ExcelReadMG.asp
|
|
|
|
|
Who can give me some articles about Alpha blend, i'm beginner of C#,and i wanna some simple articles and info. about it. Thanks!
in addition,i'm chinese and not very good at english,so maybe i don't explain my meaning clearly,sorry!For your more help in english.....Thx
|
|
|
|
|
are you looking for this
http://www.codeproject.com/cs/media/perpxalpha_sharp.asp
|
|
|
|
|
thank U!
i‘ve downloaded this code already,but it's a little hard to me,art there any simple articles else?
|
|
|
|
|
Hi, i am using Log4Net followed the article on the same site, I dont know why, the log it writing in this format.
here, if you notice that the [Header] is on the same line and \r\n is also not working properly, where as the [Footer] is missing,yes the footer tag will appear but when I will write any entry again, can anybody tell me why it is happening.
[Header]\r\n2006-01-04 12:50:39,281 [2832] INFO ChangeMobile.Confirm 1 for each Loop
2006-01-04 12:50:39,281 [2832] INFO ChangeMobile.Confirm 1 for each Loop
2006-01-04 12:50:39,281 [2832] INFO ChangeMobile.Confirm 2. IsOldDate = True
I am expecting the log in this format.
[Header]
2006-01-04 12:50:39,281 [2832] INFO ChangeMobile.Confirm 1 for each Loop
2006-01-04 12:50:39,281 [2832] INFO ChangeMobile.Confirm 1 for each Loop
2006-01-04 12:50:39,281 [2832] INFO ChangeMobile.Confirm 2. IsOldDate = True
[Footer]
Can anybody help me out.
Thanks and best regards
|
|
|
|
|
in C#, I call an API func CreateWindow to create a new window, and I have its handler which the type is IntPtr. Although I created it with WS_CHILD property and set it parent to a Form (get a handler by property System.Window.Forms.Form.Handler) but my window is still seperate from it parent form.
So how can I convert my window to a control in order to add it to my form?
Thanks for your attention
|
|
|
|
|
This has worked for me in some cases but in others it is kind of flaky.
IntPtr hWnd = //your handle from CreateWindow
Control control = new Control();
Type type = typeof(Control);
MethodInfo method = type.GetMethod("WindowAssignHandle", BindingFlags.Instance | BindingFlags.NonPublic);
method.Invoke(control, new object[] {hWnd, false});
{parent form/control}.Controls.Add(control);
|
|
|
|
|
what version of .NET framework do you use? I listed all the NonPublic methods of type Control to find the function named "WindowAssignHandle" but it doesnt exist , whats wrong with me????
|
|
|
|
|
I am using 2.0. If you are using 1.1, try the following although I have not tried this:
IntPtr hWnd = //your handle from CreateWindow
Control control = new Control();
Type type = typeof(Control);
FieldInfo field = type.GetField("window", BindingFlags.Instance | BindingFlags.NonPublic);
Type windowType = typeof(NativeWindow);
NativeWindow window = (NativeWindow)field.GetValue(control);
MethodInfo method = windowType.GetMethod("AssignHandle", BindingFlags.Instance | BindingFlags.NonPublic);
method.Invoke(window, new object[] {hWnd, false});
{parent form/control}.Controls.Add(control);
|
|
|
|