|
Well, thank you Corinna. Just one more question. How can I stop service programically inside the service.I know I can do it with ServiceController but is it the way you do inside service too or not?
Thanks
Mazy
No sig. available now.
|
|
|
|
|
You couldt throw an exception in OnStart, but this is not a very clean way.
I haven't tried yet, but
ServiceController sc = new ServiceController(serviceName);
sc.Stop(); sc.Close();
shouldt work from inside the service.
|
|
|
|
|
I'm trying to figure out how to read in an excel file then put some extra values in the spreadsheet. The problem I have (I looked up in the msdn and they gave me "Driver={Microsoft Excel Driver (*.xls)};DBQ=Excel test.xls" for a connect string. The problem is when I run it it tells me I need to put a Provider= in it. That would be great if I could find the string for the provider. I'm working with Office 2000 and office xp.
another question is would Crystal Reports be better to use? I'm not doing any major manipulation of the spreedsheets I'm just reading them in to find where to put the data so I don't overwrite anything and then inserting some rows and colums.
Thanks for the help.
|
|
|
|
|
Is it possible to insert a WinForm in a WebForm?
I'd like for example to insert a managed directx viewer in a webform,
that would display 3d graphics on the form?
Is this possible?
Regards,
Z.
|
|
|
|
|
|
leppie wrote:
hosting the Runtime in IE
I thought IE already does that .. ?
Is this the same as the gotdotnet workspace source control(it looks / behaves similar to an embedded activex control), another doubt is how does this differ from href exes (like chris sells Wahoo! which pops as a separate app)
thanks,
Kannan
|
|
|
|
|
Kannan Kalyanaraman wrote:
I thought IE already does that .. ?
Not without intervention. There is a huge section in MSDN.
leppie::AllocCPArticle("Zee blog");
|
|
|
|
|
I have program like this:
private void pictureBox1_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
pictureBox2 = new PictureBox();
Bitmap img = (Bitmap)Bitmap.FromStream(this.GetType
().Assembly.GetManifestResourceStream("Program.kolko.bmp" ) );
this.Controls.AddRange(new System.Windows.Forms.Control[] {this.pictureBox2});
pictureBox2.Image = img;
pictureBox2.Location = new System.Drawing.Point(e.X, e.Y);
pictureBox2.Size = new System.Drawing.Size(28, 28);
pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
pictureBox2.TabIndex = 1;
pictureBox2.TabStop = false;
}
I want to add a button to my Form, that OnClick will delete all instances of PictureBox2 from Form (will clear my form from Pictureboxes). I don't know how do it.
|
|
|
|
|
1. Search this.Controls for PictureBoxes objects (on types, names, images etc. properties) in for loop and delete them.
2. Create ArrayList (like Controls) and store PictureBoxes into it while creating them and next delete all (without searching) in button OnClick().
Zdrufko,
AW
|
|
|
|
|
Dziekuje bardzo za pomoc panu
|
|
|
|
|
|
|
Hey Leppie,
How are you going with that MSIL addin for #D?
Cheers,
Erick
|
|
|
|
|
Erick Sgarbi wrote:
How are you going with that MSIL addin for #D?
I'm thinking of doing a generic Babel Service instead, when I get around to it. Unfortunately the street lites dim when starting #dev.
Have a look on my blog for a screenie of a heavily modified #dev text control for IL.
CHeers
leppie::AllocCPArticle("Zee blog");
|
|
|
|
|
Quite a bit has been fixed, and quite a bit has been added. I'm going through my bug list and removing just about everything there.
New Features:
* Menu designer
* Custom and "user" control support
* C# to VB Converter (not much use for this, though)
* Greatly improved parser (means less 'code-chewing')
* Enhanced Find-And-Replace
* Improved properties window (control dropdown, ability to choose from existing methods for an event
* Improved Assembly Scout
* Improved Project Scout
* Faster loading
* Before and After Build scripts added
* Tooltips in task pane
* File reload (Ctrl+U) prompts for reload
* Sidebar configuration dialog
* Property grid context menu
* Other minor things like Word Count
* uses less resources. (I use Windows 98, and believe me, if something starts using less resources, I notice.)
Now what they need to do is stop using the Crownwood Magic Library for their controls. That's the slowest, most buggy library invented. They are wanting to do this, and they'll go with the FLUID toolbar if we can get that done on time.
"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
|
|
|
|
|
The texteditor component is by far the biggest hog. And are IMHO very alpha still. There are hundreds of improvements needed there. I had to do quite a bit when I played with it for my "attempted" IL editor (VSIP seems the better choice now though). Have a look here http://leppie.blogspot.com[^]
leppie::AllocCPArticle("Zee blog");
|
|
|
|
|
leppie wrote:
The texteditor component is by far the biggest hog.
I'd have to agree. It's both a memory- and resource-hog. Incidentally, in Windows 98, if you have less than about 45% GDI resources, it doesn't repaint - it gives an error because the bitmap can't be created.
If you manage to do major improvements, you might want to help to get them integrated back into SharpDevelop.
"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 have to say that the the codebase was well designed, but not well coded. Basically someone needs to get in there and clean up the mess.
jdunlap wrote:
If you manage to do major improvements
I have suggested things but neither of them appear to be implemented. Actually one is a coding error with respect to font quality. They override it with there own setting (instead of leaving it to Default), and as you can see the text looks @#$@ especially using Lucinda Console. Also they are creating too many GDI resources instead of reusing existing resources. Line quality is also not very good.
leppie::AllocCPArticle("Zee blog");
|
|
|
|
|
leppie wrote:
I have suggested things but neither of them appear to be implemented.
Me too!!! I actually suggested back when i was reviewing their book however still the same approach. I got to give to them #D is a really good iniciative including with some clever design with the Adding tree and all that however as you stated "Line quality is also not very good".
Yep, it is very hard to get open source up and running
Furthermore, I was really interrested in an Babel service as well for IL... ...I dont really have the time to code an entire Unmanaged by myself.
When I find a Babel service then we will be able to grow old together....;P
Cheers,
Erick
PS: Great blog!
|
|
|
|
|
Erick Sgarbi wrote:
Furthermore, I was really interrested in an Babel service as well for IL... ...I dont really have the time to code an entire Unmanaged by myself.
When I find a Babel service then we will be able to grow old together....
The templated Babel service is rather good. It took all of a few minute to make a code highlighter, mind you I never did figure out the yacc bit. But not to fear.
I'm busy writng a lexer/parser in C for uni (that will be ported of course) that is quite dynamic. It handles context free scanning as well grammer based parsing, and I have a nice idea to make a nice compiler interface for it. Also it uses a simplified flex/yacc notation. This will fit nicely in with the babel service.
Erick Sgarbi wrote:
PS: Great blog!
leppie::AllocCPArticle("Zee blog");
|
|
|
|
|
Do you have any idea on how i could write a program which could search for any unwanted and unused entries in the registry?Target platform is Win XP. I just need an overview or strategy about how to design a program which could clean the registry.
Thanks.
|
|
|
|
|
hi, got a very straight forward question about Hashtable. Here's my C# code:
Hashtable users = new Hashtable(57);
users.Add("admin", "adminpwd");
users.Add("custofficer", "cust");
users.Add("branchmanager", "manager");
Console.WriteLine("passwd: {0}", users["admin"]);
I just want to do the same in C++:
Hashtable *users = new Hashtable(57);
users->Add(S"admin", S"adminpwd");
users->Add(S"custofficer", S"cust");
users->Add(S"branchmanager", S"manager");
//Error here: "...error C2143: syntax error : missing ';' before '.'"
String * passwd = users[S"admin"];
//"...error C2143: syntax error : missing ';' before '.'
Console.WriteLine("passwd: {0}", users["admin"]);
Any idea?
norm
|
|
|
|
|
|
thanks for the feedback. but, it didn't work for some reason:
Hashtable* users;
users = new Hashtable(53);
users->Add(S"admin", S"admin");
users->Add(S"custofficer", S"custofficer");
users->Add(S"branchmanager", S"branchmanager");
//Compiler error here.
if(sPasswd==(String*) users->[sUser])
return "account number: 90210";
else
return "invalid password";
norm
|
|
|
|
|
norm wrote:
//Compiler error here.
if(sPasswd==(String*) users->[sUser])
return "account number: 90210";
else
return "invalid password";
(String*) not allowed, use the proper casting technique.
users->[sUser] what happened to S"User"?
norm wrote:
return "account number: 90210";
else
return "invalid password";
Now you are return unmanaged strings....
And lastly, try this: users->get_Item(S"User")
leppie::AllocCPArticle("Zee blog");
|
|
|
|