|
I want that the user can edit a date with the keyboard. I want that the user can write and delete a date in this control DateTimePicker without use the calendar. It would be similar to a simple textbox editable.
|
|
|
|
|
felixdisc wrote: I want that the user can...
I understand what you want. I asked what behavior you are getting now. The control should already support keyboard use.
only two letters away from being an asset
|
|
|
|
|
Sorry, already it works good.
Thanks
|
|
|
|
|
You shouldn't need to code anything as the keyboard interface is built into the control. I've just looked at a simple alarm clock I wrote and the datetime picker has the standard property values assigned by the VS designer. When running it can be edited with keyboard or mouse.
Alan.
modified on Wednesday, February 4, 2009 7:39 AM
|
|
|
|
|
Hello,
I am trying to create a browse control that will let the user select a file from his computer.
The easy way is with a OpenFileDialog but when i insert "using System.Windows.Forms;" - it says "The type or namesspace "windows" doesn't exist in "system"...". I am using vs 2008.
Can anyone tell my why? or how can i do this in another way?
|
|
|
|
|
Do you have it in your reference list?
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
Hi,
what kind of project did you created? Maybe you are missing the reference to the assembly.
Regards
Sebastian
|
|
|
|
|
Let me guess, you're trying to do this from a web application?
|
|
|
|
|
"Let me guess, you're trying to do this from a web application?"
) yeah.. 10x for the answer
one more question: can i post this questions like this one on this forum or is it only for pros? - i am new
|
|
|
|
|
radupopescu777 wrote: can i post this questions like this one on this forum or is it only for pros?
The forums on CodeProject are for everyone, from beginners to experts,
so feel free to use them as much as you want.
If you haven't done so already, you should read the rules[^]
Welcome to CodeProject.
Kristian Sixhoej
"You can't undo the past... but you can certainly not repeat it." - Bruce Willis
|
|
|
|
|
Ah my powers of mind reading are good today. It would help us if you posted ASP.NET questions in the ASP.NET forum and general web development questions in the web development forum.
Back to your question, you cant use the OpenFileDialog from a web app, if you did get it to work it would be browsing the server's filesystem, not the user's.
If you are trying to allow a user to upload a file, what you are looking for is the FileUpload control: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.aspx[^]
|
|
|
|
|
I'm trying to make the user show me where the file that he wants to upload is, and insert it in my db using linq.
Here i am just trying to find the path to the file with the OpenFileDialog.
Can i do this in a better way?
|
|
|
|
|
Yes, you can, and if you read my answer above I tell you how to do it!
|
|
|
|
|
10x for the welcome
this is my code:
protected void Button3_Click(object sender, EventArgs e)
{
Stream myStream = null;
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "c:\\";
openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
openFileDialog1.FilterIndex = 2;
openFileDialog1.RestoreDirectory = true;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
try
{
if ((myStream = openFileDialog1.OpenFile()) != null)
{
using (myStream)
{
}
}
}
catch (Exception ex)
{
MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
}
}
}
when it gets to openFileDialog1.ShowDialog() the browser stops working, it doesn't open the filedialog and says "waiting for localhost". Any ideeas?
has it got something to do with vista or what is the problem?
|
|
|
|
|
i was refering the code USB detection code done in Windows Form application
there WndProc()is the overridden method used for checking the windows Message
but i m not able to use wndproc() in windows service
instead of this is there any other method suitable for windows service?
pls help me out
thanks in advance
|
|
|
|
|
hai all,
we created one folder in remote server , we want to disable copy and cut and rename and delete options on this folder ,how can we do this and can we Create UserId and passwords on this folder .
|
|
|
|
|
You may need a file system filter driver for this requirement.
«_Superman_»
|
|
|
|
|
hai ,
how can we create a Password on a folder to prevent from others to access
|
|
|
|
|
Hooking winapi IO function might help.
|
|
|
|
|
hai,
we created(windows application) a folder in server->shared folder ,there we created some .Xml Files in this shared Folder->My folder ->.xml files,but we want to stop the server "user" or "admin" or any user to that server to prevent delete this "My folder " from that server machine.
How can we do this
|
|
|
|
|
I made a web service and when I went to make the tet client I noticed that the Order Class was exposed which was fine with me except that the Order class comes from the BookStoreBLL reference which I guess is making me wonder if the Order class is exposed then why isn't all of the BookStoreBLL class exposed? And how could I expose at least one more item? And why is the Order class showing up? The following is my main code page for my Web Service.
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using BookStoreBLL;
namespace WebService1
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
OrderedBooksCollection coll;
BooksBLL bll;
UsersBLL userBll;
OrdersBLL orderBll;
[WebMethod]
public Book[] AllBooks()
{
bll = new BooksBLL("C");
return bll.allBooks();
}
[WebMethod]
public ReturnedOrderInfo ExecuteOrder(User u, Order o)
{
ReturnedOrderInfo info = new ReturnedOrderInfo();
info.OrderNumber = 0;
userBll = new UsersBLL("C");
UserRoles role = userBll.verifyUser(u.UserName, u.PW);
if (role == UserRoles.BadPass || role == UserRoles.None || role == UserRoles.NoUsers)
{
info.Status = orderStatus.UnauthorizedUser;
return info;
}
info = orderBll.ProcessOrder(o);
return info;
}
}
}
|
|
|
|
|
Hi,
I think this has something to do with the arguments the method ExecuteOrder is expecting. Since the method needs an object from type "order" your client has to pass it. So Order is exposed. Also the ReturnedOrderInfo, Book and User classes should be exposed. These are not really the classes you have in your BooksBLL. The service does nothing else than mapping the XML to objects from the expected type. The client only has stubs that generate these XML. You will see that your Order-object at the client doesn't expose the methods you declared in the class on your server.
Regards
Sebastian
|
|
|
|
|
I am using Web browser control in C#, in which we are loading FCK editor (a third-party HTML Editor tool). There are some JavaScript function in the FCK editor tool, which we are using to intialize, set and get data from the editor. While running our application in Windows XP /IE 6.0 & IE 7.0 it works fine but we are getting security block while running in Windows Vista machine with IE 7.0. We searched solution for the problem in web, we found a solution to change setting in Internet options, that is, by checking the option "Allow active content to run in files on My Computer" under Advanced tab. We tried this setting changes but still we cannot able to resolve the issue. Can anybody throw light on my issue?
The security block message that we are getting is as follows...
"To help protect your security, your web browser has restricted this file from showing active content that could access your computer."
I'm using:
Visual Studio 2005
.NET Framework 2.0
Syed
Zoniac Software P Ltd
Chennai
|
|
|
|
|
Hello everybody.
My project is C# project and I want to make an array of function.Is this possible and how to make it?
Thanks in advance
|
|
|
|
|
Using Delegates and the DynamicInvoke method...
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|