|
Hi,
Please tell me whether all dates except all mondays can be disabled in Date Time Picker control or not. If yes then how?
Thanks in Advance.
Manoj
|
|
|
|
|
No simple way of doing this unless you subclasses the control. Even then I haven't looked into it but I know that its going to be messy.
You can try to solve your problem by validating the input and ignoring the dates that you want to throw out. If that doesn't work it will be much easier to find an alternative control.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
hi, i've got this window form. i need to pass this value string d into another class to do some dbconnection..
<br />
public class Form1 : System.Windows.Forms.Form<br />
{<br />
<br />
public string d = "20"; <br />
.<br />
.<br />
.<br />
.<br />
<br />
private void testing()<br />
{<br />
<br />
dbConnection dbcon = new dbConnection();<br />
dbcon.Connection()<br />
<br />
}<br />
}
<br />
public class dbConnection <br />
{<br />
public OleDbConnection conn;<br />
public string SQL ; <br />
public OleDbCommand cmd;<br />
public OleDbDataAdapter adpt; <br />
public DataSet ds; <br />
<br />
public dbConnection()<br />
{<br />
<br />
conn = new System.Data.OleDb.OleDbConnection();<br />
conn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;" +<br />
"Data source = "+Application.StartupPath +@"\db.mdb";<br />
<br />
}<br />
<br />
public void Connection()<br />
{<br />
<br />
Form1 ccF = new Form1();<br />
<br />
SQL = "SELECT * FROM Table WHERE ID <='" + (ccF.d) + "'"; <br />
cmd = new System.Data.OleDb.OleDbCommand (SQL, conn);<br />
adpt = new System.Data.OleDb.OleDbDataAdapter(cmd); <br />
ds = new System.Data.DataSet(); <br />
adpt.Fill(ds,"Table ");<br />
<br />
}<br />
<br />
}
my problem is that it can't read ccF.d.. sorry im kinda bad in using class..
Chris
|
|
|
|
|
What do you mean exactly by "read ccF"? What do you want to read and where?
www.troschuetz.de
|
|
|
|
|
First check that u have called ur testing function at some point in ur Form1.
Second I tried ur code and it works for me as far as reading ccF.d is concerned.
So i guess there is come problem in the way ur accessing it.
My working code of Form 1 is as under
public class Form1 : System.Windows.Forms.Form
{
public string d = "HI";
private void Form1_Load(object sender, System.EventArgs e)
{
testing();
}
private void testing()
{
dbConnection dbcon = new dbConnection();
MessageBox.Show(dbcon.Connection());
}
}
public class dbConnection
{
public string SQl;
public string Connection()
{
Form1 ccF = new Form1();
return SQl = ccF.d;
}
}
Ketty
|
|
|
|
|
How can i send my new exe file to other client machine's from the
Server.(without go and copy individualy).
I would like to develop a application in c#.can any one help me to start
this application.
Thanks
Amal
|
|
|
|
|
Assuming that you own all the client computers, and assuming that your computers are >= windows 2k (less problems)...
- Create an MSI install package.
- Use Group Policies to deploy the package.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
When the UpdateCommand or DeleteCommand method of the SqlDataAdapter object uses a SQL Server stored procedure that raises an error,the ADO.NET client
application may not trap the error raised by SQL Server.
Microsoft Says use SqlDataReader in KB Q811482. Why they will not fixed this problem ?
|
|
|
|
|
.... Ask Microsoft! ....
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How to add an item programmatically?
e.g If I want to add an existing .resx file to the current project how can it be done?
|
|
|
|
|
you want to know for windows forms or ASPX pages. Plz Specify.
Ketty
|
|
|
|
|
Does anyone know how to make use of a c# variable in html.
In my C# code i have a variable EmbedTextBox.Text = this.OpenFileDialog;
I want to use that same variable's contents in my HTML code e.g.
<html><value=mms://server/EmbedTextBox.Text></html>
which does not work.
is there an easy of doing this?
|
|
|
|
|
That makes no sense. What are you trying to achieve? (at a higher level than putting a variable on an HTML page)
Do you want to know more?
|
|
|
|
|
I'm not very nowledgeable about ASP.NET, but maybe the following can help you or at least get you on the right way.
You can use the Page.Response property to influence the HTTP response data that will be send back to the client. The returned object provides for example a Write method that allows you to write information to the HTTP output content stream.
www.troschuetz.de
|
|
|
|
|
were can i find a recorded note(s) like a b c d e f or g. i can't seem to find it any where thx :P
IM PROUD TO BE A GMAIL;
|
|
|
|
|
It's called "sheet music" and you find it at music stores...
What does this have to do with the C# language?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
no im not talking about music, im talking about a single note like the note a, just a like a sec. playing of it... Im doing a project on neural network composition in c#(I'm pretty new to it since i use c++ all the time but now im hooked, mostly since it's alot more easier :P)
IM PROUD TO BE A GMAIL;
|
|
|
|
|
lets say i have 2 computers socketed together with tcp/ip
these two computers both have a file called file.bin
both computers can add to the file as they want... all new information will be stored at the end.
at the end of the day, i want the files to be merged, with the end of one file, being the start of the 2nd, and then this new merged file gets placed on both computer harddrives replacing the exisiting file.bin with the new merged file.bin.
is there a utility out there that does this? (kinda like CVS?)
is there a function that would let me merge two serialized binary files of the same type? (meaning same serialization class)
|
|
|
|
|
I've now gone bald trying to figure out what is wrong with this simple code. Please help if you can.
The C# application has:
Managed oManaged = new Managed();
string myString = "My string";
oManaged.SetStringValue(myString);
The MC++ DLL has class Managed, where Managed::Managed() consists of:
m_pUnmanaged = new CUnmanaged();
and Managed::SetStringValue(String* strValue) consists of:
m_pUnmanaged->SetStringValue(strValue);
The C++ extension DLL has class CUnmanaged,
where CUnmanaged::SetStringValue(CString strValue) consists of
m_strValue = strValue; // m_strValue is declared as a CString
When I run it, one of two things happens. Either I get an error in CUnmanaged::SetStringValue() saying that object reference is not set to an instance of an object, even though in the debugger I can see in Managed::SetStringValue() that the value of the string passed in is perfectly good. Or, if I get past that (depends on how many times I recompile whether I get past it or not ;{), I get a debug assertion in the C# program of type BLOCK_TYPE_IS_VALID, presumably indicating that the heap is screwed up.
|
|
|
|
|
what are you trying to accomplish???
IM PROUD TO BE A GMAIL;
|
|
|
|
|
I'm trying to wrap an unmanaged C++ class in an extension DLL with a managed C++ class in its own DLL so that I can use the managed class in a C# program. All of this is very easy to do IF the unmanaged class does not use any MFC classes. But if it has arguments or return values that are, for example, CStrings, then I have been unable to get it to work, nor have I seen a single example of such posted anywhere on the internet.
|
|
|
|
|
aren't cstrings the same thing as strings in the .net platform?
IM PROUD TO BE A GMAIL;
|
|
|
|
|
no, they aren't the same. You can marshal a .net string into other types, like a character array, which can be put into a CString, but that doesn't make them the same. Since you don't know the answer, thanks anyway. Can someone else shed any light?
|
|
|
|
|
I figured out how to do it, in case anyone is interested.
I wrote:
> The MC++ DLL has class Managed, where Managed::Managed() consists of:
> m_pUnmanaged = new CUnmanaged();
> and Managed::SetStringValue(String* strValue) consists of:
> m_pUnmanaged->SetStringValue(strValue);
That line "m_pUnmanaged->SetStringValue(strValue);" has to be replaced with:
IntPtr stringPointer = Marshal::StringToHGlobalAnsi(strValue);
m_pUnmanaged->SetStringValue(static_cast<char *="">(stringPointer.ToPointer()));
Marshal::FreeHGlobal(stringPointer);
That gets rid of the error about "object reference is not set to an instance of an object".
But it still leaves the C# program asserting when it closes. That is solved by changing the MC++ DLL to link statically with MFC, not dynamically. Why that would be required, I have no idea.
Finally, although I already knew this before I made my original post, it is required to change the MC++ DLL from its default settings to those outlined in http://support.microsoft.com/default.aspx?scid=kb;en-us;814472
(PRB: Linker Warnings When You Build Managed Extensions for C++ DLL Projects)
|
|
|
|
|
Hello,
I have developed a Smart Device Application for a PocketPc, now I want to add a kind of instrumentation mechanism to my mobile application to save information like when (time), which method with which parameters from which class is called, in a file directly on the PocketPc. Has anybody good ideas how I can realize that in a good way? - means not much code changing and not much negative impacts on the performance of the mobile application.
thx
ma
|
|
|
|