|
ahaaaa i got what u meant
but ...!
i think of this way because i want to display my tv satellite channels in my form.... so i think i could call the exe of the sattelite application ( DVB viewer TE ) to apanel in my form >>
i dont know how to do that ....i guess that idea was the easiest
could u give a better ,simple idea ..
i had read article here about capturing tv
but i dont think that what i need
i want just to view tv and move channels up and down
thanx i lot for ur answer
waiting for clues
|
|
|
|
|
Hi,
I have WinForm application.
I am trying to display a value from MySQL. The field type is time and it's NOT null.
I am using this code:
lblStartTime.Text = Convert.ToDateTime(sql_reader["start_time"]).ToString("HH:mm");
but getting this error message:
Unable to cast object of type 'System.TimeSpan' to type 'System.IConvertible'.
Please Help..
Technology News @ www.JassimRahma.com
|
|
|
|
|
Maybe this[^] could help you.
|
|
|
|
|
lblStartTime.Text = Convert.ToDateTime(sql_reader["start_time"]).ToString("HH:mm");
OK, let's break this down into its constituent parts:
sql_reader["start_time"] returns a Time value.
.ToString("HH:mm"); converts that to a string in the form HH:mm.
Convert.ToDateTime converts that string into a DateTime value.
lblStartTime.Text = which you than try to assign to a Text field.
Veni, vidi, abiit domum
|
|
|
|
|
I tried this:
lblStartTime.Text = sql_reader["start_time"].ToString("HH:mm");
but got:
Error 28 No overload for method 'ToString' takes 1 arguments
Technology News @ www.JassimRahma.com
|
|
|
|
|
this is my database structure for your info:
CREATE TABLE `job_orders` (
`job_order_id` int(11) NOT NULL AUTO_INCREMENT,
`customer_id` int(11) DEFAULT NULL,
`cleaner_id` int(11) DEFAULT NULL,
`job_order_status` int(255) DEFAULT '1' COMMENT 'New, Cancelled, Completed, Payment',
`is_cancelled` bit(1) DEFAULT b'0',
`job_order_date` date DEFAULT NULL,
`start_time` time DEFAULT NULL,
`end_time` time DEFAULT NULL,
`job_order_note` text,
`created_date` datetime DEFAULT NULL,
`created_user` int(11) DEFAULT NULL,
PRIMARY KEY (`job_order_id`),
UNIQUE KEY `idx_job_orders_job_order_id` (`job_order_id`),
KEY `idx_job_orders_customer_id` (`customer_id`),
KEY `idx_job_orders_cleaner_id` (`cleaner_id`),
KEY `idx_job_orders_job_order_status` (`job_order_status`),
KEY `idx_job_orders_is_cancelled` (`is_cancelled`),
KEY `idx_job_orders_job_order_date` (`job_order_date`),
KEY `idx_job_orders_start_time` (`start_time`),
KEY `idx_job_orders_end_time` (`end_time`),
KEY `idx_job_orders_created_date` (`created_date`),
KEY `idx_job_orders_created_user` (`created_user`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
Technology News @ www.JassimRahma.com
|
|
|
|
|
What class type is returned from the sql_reader["start_time"] property? Check the documentation to see if it has a ToString method, and if so what is the syntax? You cannot write code like this and just assume it will work, you need to ensure you are using valid properties and methods.
Veni, vidi, abiit domum
|
|
|
|
|
Jassim Rahma wrote: Unable to cast object of type 'System.TimeSpan' to type 'System.IConvertible'.
sql_reader["start_time"] is returning a TimeSpan[^]. You cannot convert a TimeSpan to a DateTime , which is why the call to Convert.ToDateTime is failing.
If your time value is always less than 24 hours, you could use:
lblStartTime.Text = ((TimeSpan)sql_reader["start_time"]).ToString("hh\\:mm");
However, note that the hh format specifier only includes "the number of whole hours in the time interval that is not counted as part of its day component":
http://msdn.microsoft.com/en-us/library/ee372287.aspx[^]
If your time values could exceed 24 hours, you would need to format the value yourself:
private static string FormatTime(TimeSpan time)
{
return string.Format("{0:##00}.{1:00}", time.TotalHours, time.Minutes);
}
lblStartTime.Text = FormatTime((TimeSpan)sql_reader["start_time"]);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Everybody,
i need to implement something that I need to know which url a current user is acessing. I already have a IE, Chrome and Firefox implementation, but I need to find shomething that works fine in Safari and Opera.
Somebody can help me to solve this?
Cheers,
Túlio Cruz.
|
|
|
|
|
Why write a bunch of code when any off-the-shelf proxy server will do this for you, and without having to write speerate support for every possible browser.
|
|
|
|
|
One reason not to use a proxy server is that the browser must be configured to work with it, and that's a hassle for the user.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Compared to the hassle of individually supporting many browsers, it's a very small one.
We also don't know anything of the environment to which this app is being targeted.
|
|
|
|
|
I am a beginner to C# while reading i came a cross Cesign Patterns So Can anyone please tell what is this Design Pattern ?
- factory
- Singleton
- Chain of Responsibility
How they help in development of Applications ?
|
|
|
|
|
It's impossible to provide sufficient detail to your question in a forum like this. There are plenty of references on the internet that will explain, the purpose of design patterns, and the different types that may be used. There are also books that cover the subject in full detail.
Veni, vidi, abiit domum
|
|
|
|
|
|
You can buy a book on design patterns and go through them.
|
|
|
|
|
Capturing a wealth of experience about the design of object-oriented software, four top-notch designers present a catalog of simple and succinct solutions to commonly occurring design problems. dofactoy[^] shows C# and VB.NET sample code of any GoF (Gang of Four: Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides) pattern.
Cheers,
Jani Giannoudis
Meerazo.com - Resource Sharing Made Easy | Co-founder
|
|
|
|
|
Design patterns are a dime a dozen. Since you are a "beginner", then I would focus on the fundamentals first, and worry about patterns later.
Good luck.
|
|
|
|
|
|
The code for that sample is available. Why not just look there?
|
|
|
|
|
Hi
Thanks. I am not experinced in programming, was just told that it was a silverlight code that was hard to reuse as an ordinary VS code. But when looking into the details you are right.
Kind regards
Espen
|
|
|
|
|
Excellent. I'm glad that has got you started.
|
|
|
|
|
I am developing a web application using asp .net 2010 where I need to generate barcodes plus qrcodes dynamically and need to print it on different platform with different sizes.
How to achieve it? Which dll is useful for this? Whether microsoft have in build functionality for this or not? If yes then which DLL?
Winners don't do different thing they do things differently.
|
|
|
|
|
|
There is no built in DLL in Windows or .Net - but there are several api's that can be downloaded (both free and paid) that will do this to varying levels and for various bar code types.
|
|
|
|