|
Thank you all for your reply
DateTime lastTime = DateTime.ParseExact(dt.Rows[lastRow]["date"].ToString(),"dd-MM-yyyy HH:mm:ss", CultureInfo.InvariantCulture);
did the trick
Once again, thank you
kind regards,
|
|
|
|
|
Like I said, if dt.Rows[lastRow]["date"] is already a DateTime, you just have to assign it to lastTime. If it's not, remove the extra ToString().
You are welcome Also, if you think somebody helped you, please vote them a 5. It's a small pleasure
Cheers,
Vıkram.
I don't suffer from insanity, I enjoy every moment of it.
|
|
|
|
|
Hey,
I need to write to a virtual com port......
I'm totally new to this field and do not have any idea what virtual com port is all about?
Can anybody please enlighten me on this ?
Also let me know, in the first place, if it is possible to read/write to a virtual com port ?
Thanking you in anticipation
Regards......
|
|
|
|
|
you need to do device driver for virtual com port , also it is possible to read and write to virtual com port , writing and reading from a virtual com port would be same as reading and writing on a physical com port , but making a virtual com port will take some efforts , you need to learn Device drivers
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
Bharat Jain wrote: you need to do device driver for virtual com port , also it is possible to read and write to virtual com port , writing and reading from a virtual com port would be same as reading and writing on a physical com port , but making a virtual com port will take some efforts , you need to learn Device drivers
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
Thanks Bharat for a quick reply......
I will definitely go through device drivers......
But in the time being if you can give some more valuable input, then it would be a great help
Kindly suggest what I need to do programatically ?
May be you can tell me the procedure and give some sample C# code if at all possible
Looking forward to your help......
Thank you
|
|
|
|
|
Drivers are written in C or occasionally C++. Managed code (eg C#) need not apply.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
dan neely wrote: Drivers are written in C or occasionally C++. Managed code (eg C#) need not apply
Does this mean, writing to a virtual com port is not possible in C# ?
Can you please elaborate ?
|
|
|
|
|
0 YOU CANNOT WRITE DRIVERS IN MANAGED CODE.
1 C# IS MANAGED CODE
2 IF YOU HAVE TO ASK QUESTIONS THIS BASIC YOU'RE NEVER GOING TO BE ABLE TO WRITE A WORKING DRIVER BECAUSE DRIVER BUGS CRASH THE OS AND FORCE A REBOOT EACH TIME SOMETHING GOES BOOM.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
dan neely wrote: 0 YOU CANNOT WRITE DRIVERS IN MANAGED CODE.
1 C# IS MANAGED CODE
2 IF YOU HAVE TO ASK QUESTIONS THIS BASIC YOU'RE NEVER GOING TO BE ABLE TO WRITE A WORKING DRIVER BECAUSE DRIVER BUGS CRASH THE OS AND FORCE A REBOOT EACH TIME SOMETHING GOES BOOM.
Hey Dan,
Thanks for the reply......
I just needed to confirm whether the drivers can be written in C# somehow. I never had a question whether C# is managed or not......
I understand the complications involved in writing drivers, and so I wish you help me through......
Thanks for confirming that writing drivers in C# is not possible......
Can you please guide me in writing device drivers, may be, in C++ ?
Regards......
|
|
|
|
|
queries365 wrote: I need to write to a virtual com port
why? can you provide more contextual information?
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).
modified on Friday, June 10, 2011 12:13 PM
|
|
|
|
|
Luc Pattyn wrote: why? can you provide more contextual information?
Hey Luc,
I have a device connected in the USB port. I want to write data received from it to virtual com port. I want to do this in C#.
Is it possible and if yes can you please guide me through ?
Regards......
|
|
|
|
|
Hi,
you still did not clarify the situation. What is on the other side of the virtual port? Why do
you (think you) need a virtual port? Which virtual port are you referring to (i.e. who wrote
that driver, or how is it called)?
Anyway using a virtual COM port is identical to using a real serial port.
|
|
|
|
|
Hey,
I am a novice in this field. So I've no clue about virtual com port and the technicalities associated with it.
I have 2 questions that don't need any contextual information I suppose:
1. Can a virtual com port be created in C# ? If yes, how is it done ? And if no, then what is the alternate way to do it ?
2. If I have a virtual com port and all I need to do is write to it, then in that case is it possible to write to it using C#? How is it done ?
Please help me on this......
Regards......
|
|
|
|
|
I could not understand your comments.
For example:
I designed the interface in VS.NET 2008 with C # language include:
1 WebBrowser, 1 combobox control box to select ( ... appear in the WebBrowser control when I run the program.
But I do not know what events to use the box to combobox Select the object (HTML) in WebBrowser will be under control
I used events: Onchange but not successful
|
|
|
|
|
what are you going on about? makes little sense.
you want to know how to fire event when combo box value changes?
|
|
|
|
|
Yes!
Do you help me?Thanks
|
|
|
|
|
there are many events you can use for this.
but i think on selectedIndexChanged is the best for you.
you could also just create a 'Go' button to open pages, and that way you can free type url's in the combo box
|
|
|
|
|
No, you're mistaken. This guy has been asking this for days. He has a web browser control, inside that he has a drop list, in HTML, but he wants to catch the event in C#. Pretty bizarre if you ask me, but I'm sure he has a good reason for doing it this way. you gotta hope, at least.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I see...
Sounds a bit dodgey. Must mean they are not his webpages else he could code them to do the work, surely.
you plan on having this on other peoples machines?
|
|
|
|
|
See how he goes quiet ? he'll ask this again in a few days, I am sure.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Sounds like you're responding to an old question and that you're sufficiently lost that you think that the people doing your work for you, all talk to one another. Try either responding to the original answers, or reiterating the question, with what you've since tried.
I believe your core issue is that you are trying to catch events in a web form. This is not trivial, you can't just write event code because you can't hook C# to an event in a web browser.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Their design interface a Windows Form in which a dialog Combox and an object WebBrower.
You through dialog combobox on Windows Form to control the dialog box select the HTML on the WebBrowser to how?
Thank you
|
|
|
|
|
Hi,
hmm, sorry but I don't get your question... Do you want to select sth. in a combobox (URL etc.) that will change the URL of the WebBrowser?
If yes then add a SelectedIndexChanged-event to your combobox (double click in edit mode VS2008) and set the URL property of the webbroweser-control to the selected one in the generated event handler.
If this is not the solution, please rewrite your question in simple words (using e.g. numbers 1. click combox, 2. select url from combobox, 3. set url in webbrowser).
Regards
Sebastian
|
|
|
|
|
I could not understand your comments.
For example:
I designed the interface in VS.NET 2008 with C # language include:
1 WebBrowser, 1 combobox control box to select ( ... appear in the WebBrowser control when I run the program.
But I do not know what events to use the box to combobox Select the object (HTML) in WebBrowser will be under control
I used events: Onchange but not successful
|
|
|
|
|
Hi
iam trying to implement a calendar control.i want to design like this.
i have 3 drop down list(for day,month,year) at the top followed by a calendar control.
and 3 link buttons(prev,today,next) at the bottom.
if i select the particular day,month and year the calendar has to display accordingly,the same
should happen with the link buttons also.
can anyone tell me how to do this.iam not using any ajax controls.iam using
asp .net calendar control.
the code goes like this....
cal.aspx...
<table id="table1" width="100%">
<tr></tr>
<tr>
<td align="center">
<asp:DropDownList ID="cboDay" runat="server" AutoPostBack="True">
<asp:ListItem Value="1"></asp:ListItem>
<asp:ListItem Value="2"></asp:ListItem>
<asp:ListItem Value="3"></asp:ListItem>
<asp:ListItem Value="4"></asp:ListItem>
<asp:ListItem Value="5"></asp:ListItem>
<asp:ListItem Value="6"></asp:ListItem>
<asp:ListItem Value="7"></asp:ListItem>
<asp:ListItem Value="8"></asp:ListItem>
<asp:ListItem Value="9"></asp:ListItem>
<asp:ListItem Value="10"></asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="cboMonth" runat="server" AutoPostBack="True">
<asp:ListItem Value="January"></asp:ListItem>
<asp:ListItem Value="Febraury"></asp:ListItem>
<asp:ListItem Value="March"></asp:ListItem>
<asp:ListItem Value="April"></asp:ListItem>
<asp:ListItem Value="May"></asp:ListItem>
<asp:ListItem Value="June"></asp:ListItem>
<asp:ListItem Value="July"></asp:ListItem>
<asp:ListItem Value="August"></asp:ListItem>
<asp:ListItem Value="September"></asp:ListItem>
<asp:ListItem Value="October"></asp:ListItem>
<asp:ListItem Value="November"></asp:ListItem>
<asp:ListItem Value="December"></asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="cboYear" runat="server" AutoPostBack="True">
<asp:ListItem Value="2000"></asp:ListItem>
<asp:ListItem Value="2001"></asp:ListItem>
<asp:ListItem Value="2002"></asp:ListItem>
<asp:ListItem Value="2003"></asp:ListItem>
<asp:ListItem Value="2004"></asp:ListItem>
<asp:ListItem Value="2005"></asp:ListItem>
<asp:ListItem Value="2006"></asp:ListItem>
<asp:ListItem Value="2007"></asp:ListItem>
<asp:ListItem Value="2008"></asp:ListItem>
<asp:ListItem Value="2009"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<table id = "table2" width="100%">
<tr></tr>
<tr>
<td align="center">
<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" Width="200px" OnSelectionChanged="Calendar1_SelectionChanged">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="#808080" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</td>
</tr>
</table>
<table id = "table3" width="100%">
<tr></tr>
<tr>
<td align="center">
<asp:LinkButton ID="lnkPrev" runat="server" OnClick="lnkPrev_Click">< Prev</asp:LinkButton>
<asp:LinkButton ID="lnkToday" runat="server" OnClick="lnkToday_Click">Today</asp:LinkButton>
<asp:LinkButton ID="lnkNext" runat="server" OnClick="lnkNext_Click">Next ></asp:LinkButton>
<%--<asp:Label ID="lblshow" runat="server" Text="Label"></asp:Label>--%>
</td>
</tr>
</table>
</td>
</tr>
</table>
cal.aspx.cs file...
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
cboDay.SelectedValue = Calendar1.SelectedDate.Date.ToString();
cboMonth.SelectedValue = Calendar1.SelectedDate.Month.ToString();
cboYear.SelectedValue = Calendar1.SelectedDate.Year.ToString();
}
and i want the calendar to change according to the selected date,month,year in the drop down.plz help me out...
pintoo
|
|
|
|