|
The standard menu just does not work with embedded child controls. I tried this myself, and the menu class won't budge to display an embedded control --I guess this could be, at least in Windows XP, because the Windows is Layered and thus possible painted on a memory buffer. It's not even possible to spy on the Window menu because is protected by the system. Just setting up the hook for getting the handle to menu window is a task in itself too.
Most custom menu controls don't have support for this either. And yes, you need to write your own custom control and deal with alll the painting and handling of the keyboard to make the menu behave like a standard menu. If you have the time the it is a good learning excercise.
If you don't you can always check the SharpLibrary popup menu control which does offer that feature.
Regards,
Carlos
http://www.sharplibrary.com
|
|
|
|
|
Thanks for the advice. I guess I'll live without for the time being
|
|
|
|
|
The Fluid UI Toolkit[^] menu/commandbar will have this, but it does not exist yet. We are making progress on Fluid, and the commandbar system is high on our list. So bookmark our site, and check back periodically for downloads.
We will also be posting articles on CodeProject about each of our controls as they are completed.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I'll keep an eye on it. Thanks.
|
|
|
|
|
|
Hey Nish,
Sure, I love CodeProject. I just did not appreciate the geeks fighting me over my own code.
Regards,
Carlos.
|
|
|
|
|
|
To me, it's just a matter of having an implied license. Basically, you thought the license was one thing, we thought it was another, and it happens we were correct. But the best thing to do is to have the license be stated beforehand, which is what Chris is working on doing for future CP articles/code.
Good luck with your commercial product!
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I'm trying to access functions of a C# interface from an extened SP written in C++ (Unmanaged) and I'm having problems retrieving the complete string upon reception in the interface.
I am using the MarshalAs attrib but for some reason, I cannot get this to work correctly...
Here is waht I'm doing...
Extended stored proc C++
__int64 nReturnCode;
char Text[20] = ".Net Rules";
pInterface->raw_Command((BSTR)Text, &nReturnCode);
C# interface...
public interface IMyInterface
{
long Command([In, MarshalAs(UnmanagedType.LPWStr)] string strText)
//could be the type that I'm using, but I have tried many and stil cannot get this to work...
};
public clase MyClass : IMyInterface
{
public long Command(string strText)
{
MessageBox.Show(strText);
return 0;
}
};
Messagebox: "????????s"
Please help me out with this one
Cheers
Ribs
Andre Cote
Software Development Manager
Position Technology Inc.
780 Industrial Blvd.
St-Eustache, Quebec, Canada J7R 5V3
Phone: (450) 491-7444
Fax: (450) 491-2509
mailto:acote@postech.ca
http://www.postech.ca
|
|
|
|
|
First, I know nothing about ASP coding or anything like that. What I do know, I need a better way to organize my photos. I have tried many programs, all cumbersome and not friendly to use.
So with that, I am looking at installing this program for my photo album pages.
What I need, is to hire someone to set it all up. I can do 50% up front (upon ref.), another 25% when you show me it works. The last 25% paid when done.
You will need to show/instruct me on how to upload the photos and how the program works.
My site is desertdrifter.com. It is hosted by hostsave.com. If need be, I will change host providers to get this up and running.
Serious inquires only.
I can be reached at jbriggs@desertdrifter.com.
Joel Briggs
www.desertdrifter.com
|
|
|
|
|
hmmm... what if I help you wid out getting payment?
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
I prepare my application for L10N and use System.Resources.ResourceManager.GetString() to retrieve string resources.
Works great, but does not include any compile-time checking: The argument to GetString() is an alphanumeric string identifier. A typo in this ID, and the application will still compile. Only when the string is needed (probably to display crucial details of that critical error), if cannot be found and GetString() returns null.
This is not good. Does anybody know of any tools or preferences that validate the presence of required string resources at compile-time?
TIA,
Bernd
|
|
|
|
|
I have a parent form that I have set the IsMdiContainer property to true. I have 2 other forms that I want to show up inside of the parent form. The first form called frmAnchor will be docked to the top of the parent form. The second form called frmCollect I want to fill the remaining area of the parent form, so I set the DockStyle to fill. When I run the program it looks OK, however once I click on the top form (frmAnchor) it shifts the bottom form (frmCollect) up to fill the entire area (even the area under frmAnchor). So, it is almost like using DockStyle.Fill on the bottom form doesn't know about the top form and fills underneath it.
Here is the code I use to show the child forms. This code is inside the parent form. Any ideas on how to keep the bottom form from shifting up when clicking on the top form?
frmAnchor newMDIChild = new frmAnchor();
// Set the Parent Form of the Child window.
newMDIChild.MdiParent = this;
newMDIChild.Dock = DockStyle.Top;
newMDIChild.Show();
frmCollect newMDIChild2 = new frmCollect();
// Set the Parent Form of the Child window.
newMDIChild2.MdiParent = this;
newMDIChild2.Dock = DockStyle.Fill;
newMDIChild2.Show();
|
|
|
|
|
I want to create a windows application like the project property page of CSharp project in a solution
(right click project in a solution, you will get project property pages).
when you click "common properties" you will get list bot control on the right panel,
when you click "Configuration properties" you will get data grid control on the right panel.
I want to do the similar things. My question is how to create different controls on the same positions?
thanks a lot!
|
|
|
|
|
|
I am writing a C# application that uses an SMTP server to send out emails. I have it sending correctly now I am ready to take the next step. I want to be able to read the global address list into a structure such as an array and parse the array and send email to the corresponding email address in that array location. I am new at C#, and I would really appreciate it if someone could write me up a small example app or equivalent item. Thanks so much you guys are lifesavers!
My Code so far:
using System;
using System.Windows.Forms;
using System.Data;
using System.Web;
using System.Drawing;
using System.ComponentModel;
using System.Web.Mail;
class E_Mail
{
public static void SendEmail(string To, string From, string
Subject, string Body, System.Web.Mail.MailFormat Format)
{
System.Web.Mail.MailMessage Mailer = new
System.Web.Mail.MailMessage();
Mailer.From = From;
Mailer.To = To;
Mailer.Subject = Subject;
Mailer.Body = Body;
Mailer.BodyFormat = Format;
Console.Write(". ");
System.Web.Mail.SmtpMail.SmtpServer= "xxx@xxx.com";
Console.Write(". ");
System.Web.Mail.SmtpMail.Send(Mailer);
MessageBox.Show("Message sent successfully!","Message Delivered",
MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
}
public static void Main()
{
Console.Write("Working ");
try
{
SendEmail("xxx@xxx.com", "Frank","Test E-Mail",
"Hello to all...",System.Web.Mail.MailFormat.Text);
} // end try
catch (HttpException)
{
MessageBox.Show("Could not connect to server!","Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
} // end catch
Console.Write("\n");
}
}
|
|
|
|
|
Hi All,
Am new to the c# world.I have been trying to find an example or some reference which would help me bind an object directly to a DataGrid, but i havent come across one. All the examples bind DataSets which have data from databases. Is it possible to directly bind an object to a DataGrid, without me having to make an intermediate DataSet and write the read/write funtionality myself.
Any help appreciated.
Thanks
|
|
|
|
|
kalla123 wrote:
Is it possible to directly bind an object to a DataGrid, without me having to make an intermediate DataSet and write the read/write funtionality myself.
Nope,You need DataSet when you work with DataGrid.
Mazy
No sig. available now.
|
|
|
|
|
You can also bind a datagrid to a Collection or any object that implements the IList or IListSource Interface.
|
|
|
|
|
Hi,
Thanks.But my obeject is more of a graph and i have arays everywhere. Does that mean that i will have to change everything into collections, and implement all their methods. that will surely suck.
I have a stupid doubt. Could i just serialize the whole obejct into an xml strem( SoapFormatter) and then deserialize it into a Dataset, and bind that to a DataGrid.
Thanks
|
|
|
|
|
I have to port a MFC app to .NET. The main window is dialog with a big tabcontrol and many tab pages. In C++ every tab page was a dialog, so it has a default push button, in C# only the main form has an accept button. How could I "press" different buttons depending on the active tab page on Enter pressed? The only way I could see is to handle the key(up|down) event, verify if it is Enter (how?) and do something further, but must be something easier
The other problem: I want to set the focus on one tab page component when the page is shown, and keep the current focus no matter how the pages are changed (I mean when switch back). The control.Focus() in the Load method does not work, when should I call Focus?
Thanks
|
|
|
|
|
First problem:
What I have done is, I have put a button "OK" or "Apply" on a form, not on a Tabcontrol but just below the tabcontrol. and made it the acccept button. i was checking that what is the selected control on the tab thru my program. but i had only 2 tabs and was easy to track down.
|
|
|
|
|
I end up with something similar: I put an accept button on the main form and "hide" it (size 1x1, flat, *color = main background) and this "invisible" button will route the Enter according to the active tab page. I can not use a single, normal button for all pages because the actions are quite different (enter, delete, view, load, ...) so the button's name would be a real problem.
This thing works but MUST be some other way
|
|
|
|
|
Hi there,
Having got fed up of constantly picking track lists from large mp3 collections or using crummy auto playlist selectors I was wondering if I could write something better, the only problem is I don't know how to go about getting an mp3's characteristics like it's tempo or pitch etc.
Does anyone have any samples/info on this type of thing?
a million fang-queues in advance for any titbits you can offer
monkey say monkey doo
Uncle Monkey
|
|
|
|
|
If I have this kind of question, I use Google and do a little searching. After a couple of minutes I found this on CodeProject itself
http://www.codeproject.com/useritems/mp3fileinfo.asp
Cheers, Julian
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|