|
Has anyone used embedded user controls (http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=187&printer=t) in a real application. I didn't even know this was possible until today.
I am building an app where the client wants drag-and-drop upload of multiple files. There is a Java tool out there, but I was considering creating an embeded user control.
Any suggestions? (No need to mention basic platform compatability issues).
|
|
|
|
|
I would see no real issues except that you will need to install .NET Framwork on the all of the machines that need this functionality.
Best of Luck
Forever Developing
|
|
|
|
|
hi all,
i created a windows service and build a controller to that service, just as the SQL Server Service Manager if any saw it. Anyway the problem is i want to control the startup mode of the windows service (Automatic, Manual, Disabled), in .Net you can specify this in the Service Installer but after that i didn't find a way to change it.
Does anyone know a way to change the startup mode of the Windows Service in .Net? i think that i foud a way to do it in win32, but i need it in .Net...
thanks for help
|
|
|
|
|
The Service startup mode can be changed in C# using System.Management namespace. a sample method is given below.
public bool ServiceStartModeUpdate(string serviceName, string startMode, out string errorMsg)
{
uint success = 1;
errorMsg = string.Empty;
string filter =
String.Format("SELECT * FROM Win32_Service WHERE Name = '{0}'", serviceName);
System.Management.ManagementObjectSearcher query = new ManagementObjectSearcher(filter);
if (query == null) return false;
try
{
ManagementObjectCollection services = query.Get();
foreach (ManagementObject service in services)
{
ManagementBaseObject inParams =
service.GetMethodParameters("ChangeStartMode");
inParams["startmode"] = startMode;
ManagementBaseObject outParams =
service.InvokeMethod("ChangeStartMode", inParams, null);
success = Convert.ToUInt16(outParams.Properties["ReturnValue"].Value);
errorMsg = GetErrorMsg(success) + "\n Try \"Run as Administrator\" ";
}
}
catch (Exception ex)
{
errorMsg = ex.Message;
throw;
}
return (success == 0);
}
|
|
|
|
|
hellow to all
i had download some projects from this site but when i try to run them a get error and it is
the applecation for project (C:\.....THE PATH)
make sure the applecation for project type (.csproj) is installed
thank u for the help \!
|
|
|
|
|
|
Hello Gurus,
Happy Friday to Gurus. I appreciate for your looking into this and any tips or tricks.
Thanks & Happy Coding
Roughly what I am trying to do is:
1. Get a video frame from a webcam ExternalSource.
2. Some modifications to the bitmap of the current frame.
2. Save this frame to a Image.bmp file.
3. Display the image from Image.bmp on an ImageBox
4. Repeat from Step 1, to achieve a video-like show.
The Problem: can't delete or overide Image.bmp file with new images.
string sFileName = "C:\Temp\Image.bmp";
Image img;
// ExternalSOurce = an image frame extracted from a video stream from a webcam
ExternalSource.SaveFile(sFileName);
img = Image.FromFile(sFileName);
picControl.Image = img;
img.Dispose(); // won't help
img = null; // won't help
While (!DONE)
{
// Can't delete because file is locked until img is destroyed!
File.Delete(sFileName);
ExternalSource.SaveFile(sFileName);
img = Image.FromFile(sFileName);
picControl.Image = img;
img.Dispose(); // won't help
img = null; // won't help
}
|
|
|
|
|
I think you're looking for this[^] little workaround for that problem.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave, thanks so much for the great tip, Guru! You're always great and know so much.
Have a great weekend
Khang
|
|
|
|
|
You should pass a FileStream using FileMode.Open and FileAccess.Read to the File.Delete method. Something along the lines of using a FileStream should do the trick. Hope this works for you...
/\ |_ E X E GG
|
|
|
|
|
Thanks Eggie5 for the tip. Dave also gave me the tip on this FileStream in the prev. mesg. and I got it working.
Have a beautiful weekend!
Khang
|
|
|
|
|
Hi
whene i want to upload a file with 3.54 MB size to webserver i get an error : Maximum request length exceeded.
but with small files i have no problem.
What should i do ?
Note: i dont save file on database and save it as a file on the server.
Thanks.
|
|
|
|
|
Update maxRequestLength parameter in the <httpRuntime> section of the Machine.config or Web.config. The default is 4MB.
Alex Korchemniy
|
|
|
|
|
Hi, can anyone suggest a good input API for C#?
It have to have support for mice and keyboards, and it must not be DirectInput.
|
|
|
|
|
RATC wrote:
It have to have support for mice and keyboards,
Uhhhh.... Windows?
What are you talking about, "a good input API"? What are you trying to accomplish and with what hardware?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I don't know what you mean by: "Uhhhh.... Windows?" If it was because all input APIs support mice and keyboards or what.
I'm trying to write a little library to handle input, I have already implented the basefiles which are API independent. Currently, I have added DirectInput support in the library, but I also wan't to add another implentation to show how easy it is.
So actually, I just need to know an input API, like DirectInput. I don't target any specific hardware.
I have heard about something called OpenIL some time ago in C++, but searching for it it seams to be an "Open Image Library" instead of "Open Input Library".
|
|
|
|
|
|
No, I only thought SDL was for graphics, sound and networking. I'll look at it in a couple of hours(need to do some homework).
|
|
|
|
|
Hi
I have this WORD document with some text, formatting and images. Now, I want to save the content of that document into an xml. If it were a simple text document then I know how to approach it. Since, image is also involved in it, I am not sure how to go about.
How can I read the entire content of WORD document (including text, formatting and image) and savee into an xml file? Please advise.
Thanks in advance.
Pankaj
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
In not an expert in Word but... The newest version of Word actually has an option to save in XML format. Images are probably encoded base64. Google for Word 2003 XML.
Alex Korchemniy
|
|
|
|
|
Word 2003 has the option to save as wordprocessingML, and they have the schema published in the msdn office section, along with some tools to generate xsl files to use templates. Googling on wordprocessingML returns a number of results as well. Images are embedded as base64 chunks or SVG format.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
Smartphones - kind of like a PPC but smaller andmore of a phone most are currently running windows mobile 2003 (soon they'll be running "magneto" Oooh!)
Okay here are a few simple questions...
1)Can i use C# to program for a smartphone?
If no you may as well just stop here (i dont see any reason why it would be 'no' though)
2)Is it exactly the same as programming for a PC? Can i use the same code i would for a windows form for example? (set to the right size of course - 176*200).
3) What can i use to compile the code, and is it free?
(If it isnt free what is?)
Thanks for any help at all
|
|
|
|
|
1) Yes. From Visual Studio, File->New->Project->Smart Device Projects->Smartphone Application.
2) No. Instead of using the .NET framework, you must use the .NET Compact framework. It's a slimmed down version of what you normally code with. Your Windows Forms code won't work; you have to use the Compact Framework's version of Windows Forms.
3) I'd recommend MS Visual Studio, which isn't free, SharpDevelop (free & open source), or any of Borland's .NET offerings.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: He has a funny face. And he's my son.
Judah Himango
|
|
|
|
|
Dear everyone,
I am creating IE Toolbar and I want to make it show up as default like Yahoo toolbar. I am encounting problem for this setting. Now I have created the toolbar, but after installation the user will have to config it as "display" manually by clicking mouse and selecting it.
To create IE toolbar, see Pavel Zolnikov 's article http://www.codeproject.com/csharp/dotnetbandobjects.asp
and vadaa's article
http://www.codeproject.com/useritems/IE_Advanced_Toolbar.asp
They are great codes.
Smile, positive, thinking double win
|
|
|
|
|
I am on the network with two computers,i want to send messagebox message to another computer..how it will occurs.
waiting for reply
|
|
|
|