|
hi all,
i need to know wht input will satisfy this condition
DateTime tm=DateTime.ParseExact(sar[1],new String [] {"t","T"},CultureInfo.CurrentCulture,DateTimeStyles.AllowWhiteSpaces|DateTimeStyles.NoCurrentDateDefault);
in this above sar[] wht should i pass in
this below is my method which accepts DayofweekandTime as input.
String [] sar=delay.Split(new char [] {' '});
if(sar.Length<2) return DateTime.MinValue;
sar[0]=sar[0].Trim().ToUpper();
DateTime tm=DateTime.ParseExact(sar[1],new String [] {"t","T"},CultureInfo.CurrentCulture,DateTimeStyles.AllowWhiteSpaces|DateTimeStyles.NoCurrentDateDefault);
tm=new DateTime(2003,1,6)+new TimeSpan(0,tm.Hour,tm.Minute,tm.Second,tm.Millisecond);
for(int i=0; i<7; i++) { if(tm.ToString("ddd").ToUpper()==sar[0]) return tm; tm+=new TimeSpan(1,0,0,0); }
return DateTime.MinValue;
thanks in advance....
-- modified at 2:48 Friday 25th August, 2006
|
|
|
|
|
You can input anything that matches the ShortTimePattern or LongTimePattern of the current culture.
---
b { font-weight: normal; }
|
|
|
|
|
Hi Dear Respected Programmers
Kindly give me the solution that, How may I get Form1.textBox1.Value into my crystalReport1 ==>> Text1
Thank you very much in Advance
and
Have a nice day
|
|
|
|
|
Hi.
you can use parameter property of Crystal report.
add the parameter in the crystal report and then set its value from your code.
hope this works.
Nitin...
|
|
|
|
|
Hello in keypress event for a text box i want to convert the e.KeyChar into the actual character how do i make it do this?
|
|
|
|
|
Hello Tyrus,
I think two things are possible here.
Inside your keypress event:
1)
if(e.KeyChar == ??)
{
e.Handled = true;
SendKeys.Send("{???}");
}
2)
if(e.KeyChar == ??)
{
e.Handled = true;
textbox.Text.Insert....
}
All the best,
Martin
|
|
|
|
|
no im actualy an idiot apparently KeyChar is already a char :P not an enumeration.
|
|
|
|
|
Ohhh,
then I didn't got youre question!
All the best,
Martin
|
|
|
|
|
Hi,
I am Developing an application for Windows Mobile,Using VS2005 c# and SQLite Database.
I cannot bind the data to the List View as Columns, I can bind only one column.
Please,Anybody help me
|
|
|
|
|
hi id like to prevent people from pasting in my text box what is the best way to trap the keyboard commands and stop the paste menu from poping up on right click?
|
|
|
|
|
Hello Tyrus,
In this case you should use the KeyDown Event.
this.textbox.KeyDown += new KeyEventHandler(CheckKeys);<br />
<br />
<br />
private void CheckKeys(object sender, KeyEventArgs e)<br />
{<br />
if (e.Control && e.KeyCode == Keys.V)<br />
e.Handled = true;<br />
}
All the best,
Martin
|
|
|
|
|
any idea how i can disable the context menu that pops up with i right click?
|
|
|
|
|
Hello Tyrus,
Maybe for your project it would be helpfull if you use a MYTextBox class which inherits from windowsd Textbox.
There you can override the MouseUp Event.
protected override void OnMouseUp(MouseEventArgs e)<br />
{<br />
if(e.Button != MouseButtons.Right)<br />
{<br />
base.OnMouseUp (e);<br />
}<br />
}
Hope it works for you!
All the best,
Martin
|
|
|
|
|
On the body tag just write the following code. It will disable the right Click in a page.
<body oncontextmenu="return false">
Vipin
|
|
|
|
|
Hi,
I doing windows mobile application using c#.
Facing two problems:
1)I am using SQLLite database, but every time refreshing and creating.
How to clear the problem?.Is it correct database in windows mobile?
2)How to make listview.items.add();
Anybode help me?
|
|
|
|
|
Hi everyone.
I have a question!
There are some programs like Desktop Plant, that the application windows are behind the desktop icons and in front of the background window! You can move the plants and put them everywhere!
You can download it here, it's free to try and just 873 KB:
http://www.desksoft.com/DesktopPlant_Download.htm
Does anyone know how to do that?
I really like to learn it.
Sojaner
|
|
|
|
|
Hello Sojaner,
I m not sure.
But I think that this application it self working as an Icon.
Becoz when I m tring to hide desktop Icons this plant also hide.
regards,
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
Hi Divyang Mithaiwala,
Thanx for attention, but as I know, the plants are window, cause they have their own process and if you find and download the TaskManagerEx program in the articles, you will see that the process has a window, and I'm almost sure that it is the plant window.
I know that there are some windows that make the main shape of the windows UI, and they have names like "Desktop" that makes the desktop window containing the task bar man desktop icons and a window named "Program manager" that contains the desktop icons and desktop elements, and when you hide this window, the whole wdesktop elements will become hidden!
So I wrote a program that maks a window form and makes it the child of the "Program Manager" window and It became one of the thesktop elements, but the problem is that even when I try to set the "Z Order" to the lowest window, my window will stay in front of the Icons and the plants even!
Sojaner
|
|
|
|
|
I am trying to pass an Excel.Application object from c# to c++ DLL via PInvoke.
The c++ code expects an IDispatch.
The Pinvoke Wizard paulyao.com suggests:
[DllImport("myDLL.dll")]<br />
public static extern short Initialise(ref LPDISPATCH pExcel);
so I have tried this code c#:
[DllImport("myDLL.dll")]<br />
public static extern short Initialise([MarshalAs(UnmanagedType.IDispatch)]ref object pExcel);
and
[DllImport("myDLL.dll")]<br />
public static extern short Initialise([MarshalAs(UnmanagedType.IUnknown)]ref object pExcel);
And this is the code that calls the routine.
Excel.Application excelApp= (Excel.Application)application;
object o=(object)excelApp;<br />
Initialise(ref o);
When the c++ code is called it throws a COleDispatchException error. m_wCode is 00000000 and 80020005 respectively.
Any ideas on how I should pass the Excel Application object?
Regards
Alias47
|
|
|
|
|
Hi,
Using VS2005;
Somehow or another I lost my "view" of a bindingNavigator. I located it in the Properties window and changed it's Visible option to true and "recovered" it. This has happened before when I have copied an item from the toolstrip(bindingNavigator) to another toolstrip. I also had to reconnect the on-click events for each item in the affected bindingNavigator.
The RenderMode on the bindingNavigator was set to ManageRenderMode which was in fact the XP style format however using either ManageRenderMode OR Professional option gives me the XP button style BUT NOT the blue colour.
Does anyone know how I can get the blue colour back keeping the XP Style?
As a matter of interest, I have another bindingNavigator in the same project and it's working fine.
Glen Harvy
|
|
|
|
|
I am trying to right an if statement for a project that pulls data from a table.
like for instancte I have
int Mem = 0;
if (Mem ==1)//for true
{
lbMember.text = applicant.getfname() +" "+ applicant.getlname();
lbAdd.Text = address.getAddress();
}
else
lbMember.text = "not selected";
}
when I use int Mem = 0; I will get the else statement
when I use int Mem = 1; then I get the if selection
how do I get it to make the selection of choice from where the data is put in.
Thanks in advance
|
|
|
|
|
Please rephrase as I can't understand what it is you want. I would be glad to help, otherwise.
TWatson47 wrote: when I use int Mem = 0; I will get the else statement
when I use int Mem = 1; then I get the if selection
how do I get it to make the selection of choice from where the data is put in.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
when I set the values to 0 or 1, it is like I am forcing the statement to be true or false. Like if there is no joint member, I would like it to be false and use the else statement. If there is a joint member I would like it to be true and use the if statement. How should write the code to allow the selection to come from when they input the criteria.
Thanks so much for your help and speedy response
|
|
|
|
|
I still have no idea what you are asking.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
ok, I will try to explain a little better. I have created some forms that say for instance a new member comes into a bank and want a loan. When the Agent puts there info into a build it is then saved to a server(database). The Idea is to have there info pull up with the selected loan form that they are wanting. Say for instance a auto loan. I have been able to pull the form with there info on it fine. However, I wanted to add some logic in place that looks to see if there is a joint member. If there is then hit all the tables requesting the joint information and load to the form. My problem is that when I set the variable, say for instance Jmem = 0, even if there is a joint member it comes up as false, and gives the else statement. My question is what do I need to add to the previous if statement that will except the joint member as true. The same if for beneficiary also.
I hope this helps in understanding
Thanks
|
|
|
|