|
Anonymous wrote:
you sell to must have installed a .NET environment. Is this in fact true?
Yes, even if you pre-JIT your code, at run-time the metadata referenced by your assemblies load all code from the "linked" .NET assemblies. So you need the .NET run-time (dotnetfx.exe in your cd-rom, or simply put a link to the MSDN download entrypoint).
But there is even more to that. Now that .NET 1.1 is soon out, you've got to make sure the user has the right run-time, since actually when he starts your app, by default the app is going to load 1.1 assemblies (hard-coded in the metadata). The only way to get around it is to provide a .config file to route to an "older" .NET run-time. You can use the .NET applet in the control panel to build it.
|
|
|
|
|
Ahhh, I understand! Another versioning problem! It's getting tough to support the marketplace! Thanks for the info - very helpful.
|
|
|
|
|
Java has the same problem with newer apps that require a specific runtime, older apps not working on newer runtimes, heck, runtimes in general -- and J2EE apps behave differently on differing app servers...
...CORBA has problems in ORB implementations...
...and the Mono .NET open source project should also add some gas to the version fire
|
|
|
|
|
Hi,
Anyone knows how to detect the type of a font?
Because in my font combo I want to put the right icon for true type or open type
Tnx in advance
Gogou
|
|
|
|
|
Has anyone managed to do this? I wish to add a control (other than check/radio) to a menu item so that when I mouseover a top level/sublevel menu item, a sub menu will open with the control on.
"Where would you rather be today?"
|
|
|
|
|
I can't say I've ever seen a derived menu item that could host a control, but it would be very easy to implement - simply position your control using the bounds property of a derived MenuItem, something like this:
myControl.Bounds = this.Bounds;
myControl.Visible = true;
myControl.BringToFront();
myControl.Focus();
use mouse events to show/hide the control as necessary..
That said, controls in menus would certainly not be considered acceptable UI design around my office
|
|
|
|
|
The MenuItem Class has no Bounds property. The only thing I can think of is the OnDrawItem() override. I've used this to draw stuff to the menuitem. HOwever setting the control to use the System.Windows.Forms.DrawItemEventArgs.Bounds property doesn't seem to cut it.
<br />
public class ControlMenu : System.Windows.Forms.MenuItem<br />
{<br />
<br />
public TrackBar track;<br />
<br />
<br />
public ControlMenu()<br />
{<br />
<br />
track = new TrackBar();<br />
this.track.Name = "trackBar1";<br />
<br />
this.track.Orientation = System.Windows.Forms.Orientation.Vertical;<br />
this.track.Size = new System.Drawing.Size(42, 144);<br />
this.track.TabIndex = 13;<br />
this.track.Value = 10; <br />
<br />
} <br />
protected override void OnDrawItem(System.Windows.Forms.DrawItemEventArgs e)<br />
{<br />
base.OnDrawItem(e);<br />
<br />
track.Bounds = e.Bounds;<br />
track.Visible = true;<br />
track.BringToFront();<br />
track.Focus();<br />
}<br />
I've tried having base.OnDrawItem(e); before and after the bounds setting code, without any luck.
Any Ideas?
"Where would you rather be today?"
|
|
|
|
|
You may need to have the trackbar as a child to the hosting form rather than your menu item, and reference it with public properties.
I'll have a play with it later if you like.
|
|
|
|
|
Furty wrote:
You may need to have the trackbar as a child to the hosting form rather than your menu item, and reference it with public properties.
Eventually its gonna be used on the Notify Icon context menu for an app i'm working on, but for now i'm just having it as a form menu item. Thus, the Trackbar will need to be independant of the form as the NotifyIcon is not related to the form.
I'm leaving it for today and going to watch some TV like the couch potatoe I am. If you find anything out in the mean time I'll be glad to hear
"Where would you rather be today?"
|
|
|
|
|
OK, I've done a little testing and the major problem seems to be the fact that Menu and MenuItem do not derive from System.Windows.Forms.Control. Form what I can see, the only way to acheive your goal would be to override the OnDrawItem and OnMeasureItem methods, and paint the control yourself. Naturally you would also need to handle mouse events etc for user interaction.
The bottom line is that it's a big task, you might be better off using one of notify icon ballon implementations here on CP, as they derive from forms, and therefore can host controls no problem.
Hope this has helped..
|
|
|
|
|
possibly (maybe) the magiclibrary may have what you are looking for ?
The Code Project Is Your Friend...
|
|
|
|
|
Dear Sirs,
Please guide me how I can send Mails in .NET via an SMTP Server which requires SMTP Authentication.
Regards,
Sassan Komeili Zadeh
|
|
|
|
|
Hmm...
There have been umpteen articles on this topic in C#.
MailMessage msg = new MailMessage();
msg.From = "crawler@deepak.portland.co.uk";
msg.To = "crawler@deepak.portland.co.uk";
msg.Subject = "Test";
msg.Body = "Hi! Hello" +"\nSent Via MailMessage and SmtpMail Class";
SmtpMail.SmtpServer = "smtp.yourmailserver.yourisp.com";
SmtpMail.Send(msg);
SmtpMail.Send("crawler@deepak.portland.co.uk","crawler@deepak.portland.co.uk","Test","Hi! Hello\nSent Via SmtpMail class");
Include System.Web.Mail namespace for the above methods to be visible to the compiler.
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Deepak Kumar Vasudevan wrote:
There have been umpteen articles on this topic in C#.
But he was asking about SMTP with authentication....;P
MyDUMeter: a .NET DUMeter clone
|
|
|
|
|
Try adding the username and password to the front of the URl of the SMTP server. eg
user:pass@smtp.isp.net
Not sure if it will work though.
MyDUMeter: a .NET DUMeter clone
|
|
|
|
|
Thanks.
My Mail Server POP3 account username is: info@xyz.com
and when I try what you suggested, I get no answer.
Would you suggest another solution?
Regards,
Sassan
|
|
|
|
|
You may use this class and add the following code to authenticate, just after sending the HELO command:
<br />
buf.Append("HELO ");<br />
buf.Append(host);<br />
con.SendCommand(buf.ToString());<br />
con.GetReply(out response, out code);<br />
buf.Length = 0;<br />
<br />
if(!AuthLoginPlain(con, user, password)) {<br />
con.Close();<br />
throw ....
}<br />
<br />
...<br />
<br />
<br />
private bool AuthLoginPlain(SmtpConnection con, string user, string pass)<br />
{<br />
StringBuilder buf = new StringBuilder();<br />
byte [] b_user = System.Text.Encoding.ASCII.GetBytes(user);<br />
byte [] b_pass = System.Text.Encoding.ASCII.GetBytes(pass);<br />
string response;<br />
string res;<br />
string data;<br />
int code;<br />
buf.Append("AUTH LOGIN");<br />
con.SendCommand(buf.ToString());<br />
con.GetReply(out response, out code);<br />
buf.Length = 0;<br />
if(code == 334) <br />
{<br />
response = response.Substring(4);<br />
res = System.Text.Encoding.ASCII.GetString(Convert.FromBase64String(response));<br />
if(res == "Username:") <br />
{<br />
data = Convert.ToBase64String(b_user);<br />
buf.Append(data);<br />
con.SendCommand(buf.ToString());<br />
con.GetReply(out response, out code);<br />
buf.Length = 0;<br />
}<br />
if(code != 334) <br />
{<br />
return false;<br />
}<br />
response = response.Substring(4);<br />
res = System.Text.Encoding.ASCII.GetString(Convert.FromBase64String(response));<br />
if(res == "Password:") <br />
{<br />
data = Convert.ToBase64String(b_pass);<br />
buf.Append(data);<br />
con.SendCommand(buf.ToString());<br />
con.GetReply(out response, out code);<br />
if(code != 235) <br />
{<br />
return false;<br />
}<br />
return true;<br />
}<br />
}<br />
return false;<br />
}<br />
Cheers,
John
|
|
|
|
|
Hello all,
Can someone suggest components for the following:
1. PDF generation
2. Spell checker
Smitha
Whenever I see an old lady slip and fall on a wet sidewalk, my first instinct is to laugh. But then I think, what if I was an ant, and she fell on me. Then it wouldn't seem quite so funny.
|
|
|
|
|
i have a spell checker program that uses the internet i didnt write it.. but i have used it and it works. i can email it too you if you like. im trying to find the site i downloaded it from. but i cant remeber where.
The Code Project Is Your Friend...
|
|
|
|
|
|
Guys,
How can create a C# file splitter program to slice large files to multiple pieces?
Jassim Rahma
|
|
|
|
|
|
can someone direct me to some good coding style guides..other then whats at msdn... thank you.
jesse M
The Code Project Is Your Friend...
|
|
|
|
|
|