|
Hi Graus ,
Thanks for responding.This is for the end user.
I am creating a custom ComboBox which doesnt accept the caret , text and doesn't show the list .
Now i required is how to hide the focus when the cursor is on the combobox button to show as disable.
1 ) how to hide the focus when the cursor is on the combobox button at runtime ?
Any ideas ?
Any views regarding this ?
Regards,
VB 8.0
|
|
|
|
|
VB 8.0 wrote: a custom ComboBox which doesnt accept the caret , text and doesn't show the list .
You mean a 'Label'???
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
Why on earth would you want to design a combobox with no dropdown?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I hate it when people respond with "WHY DO YOU WANT TO DO THAT?"
The OP asked HOW, not WHY!!! Regardless of your reasoning!
|
|
|
|
|
I've heard of being a dollar short and a day late but you're 14 months late and I'm definitely a dollar short.
Not that it matters now but the reason that I asked why was so that I could get a better handle on what the OP was really trying to do, the better to formulate a sensible reply.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hello everybody
First sorry my english but i need som help.
I have a website where i sal computer and other stof, every day i get i xls. file from one company with price list model number, description and other thing.
Every product in my website has parnumber: thats unik.
So i want to make a function in c# to update the price in mysql database because the price changes every day.
How can i make a function like update table_name from c:\test.xls (take just price and partnumber from xls file ) where partnumber=(partnumber from xls) ?
I hope really much you can help me.
|
|
|
|
|
You will need to write code to parse the Excel file ( either export as csv, or use the Office interop stuff ), then write your SQL.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks
but do you have som code in c# i can use ?
|
|
|
|
|
Not really, no. Connecting to a db is trivial, and widely documented. Parsing a CSV is trivial, use File.ReadAllLines and the Split method on the string class to break each line into discreet items. Controlling Excel is also well documented.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Burim,
I had written an app to import excel files. That was some 3 years ago, so I no longer have the code.
I did a google search for "C# import excel file into sql" and I found the same link I had used to write the code some 3 years ago. The link:
http://davidhayden.com/blog/dave/archive/2006/05/31/2976.aspx[^]
I recommend you use this link to do the following:
1) SQLBulkImport the Excel file into an import table (a table in the same database but that is only used for this purpose)
2) Call stored procedure that grabs the needed data from the import table and updates whatever table(s) you need to update.
In my case, I had a Unique partNumber, too, so I would
A) Mark records in my primary table as "inactive" (I use a tinyint with 1=inactive and 2=active) that were no longer in the import table
B) Add new records from the import table into the primary table.
C) Update records in the primary table with changed values in the import table (usually the description and price).
Hope this helps.
ASP ~ Apple Simply Performs
|
|
|
|
|
Dear users
I want to know how to make real time progress bar in winform, using thread or without thread.
Regrads
Azad yadav
|
|
|
|
|
You'll have to use a separate thread, otherwise you wont see the progress bar being redrawn and updated.
Have a look at this[^] article
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
you dont 'need' another thread, you can just call Update() whenever you want, but you should use another thread else you will lose UI of your form
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
I would suggest using multi-threads with custom event handlers. Look into 'Custom Events' and 'custom Event Handlers'. That should get you started.
|
|
|
|
|
hi...
I am trying to write acode that builds circuits and simulates their work
how can this be done ???
drag and drpo the chosen components and then draw a line that connects them together (the wire !)
and when one presses ok button the circuit works ....
how should I start writing this code ?
any help ???
|
|
|
|
|
Honestly, if you need to ask a stupid question like that, then a project like the one your describing is WAY beyond your abilities.
Try to write "Hello World" first
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
Start by writing the class diagram for individual elements in electrical circuits like register,inductor, capacitor , they may have properties like inputCurrent , inputVoltage , outPutCurrent, outputVoltage (outputCurrent and outPutVoltage should be read only) , stuff like this
in this class you need to incorporate the logic so that outputVoltage and current are set accordingly .
Let us take an example of a resister
Will have property like
Resistance
InputCurrent
OutputCurrent(read only)
InputVoltage
OutputVoltage (read only)
of as soon as InputVoltage and InputCurrent are set than (using Resistance property ) we can calculate the voltage drop across it hence the outputVoltage and current
I am not very good electrical , right now this is what i can think of .......
After this you need to have a class which has behavior like circuit board , know how to handel parallel and serial connection .........all those stuff
Not a easy task .........Will require a lot of knowledge and time
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
hi evryone
is it posible to run my WebService in IIS on UNIX ?
if no, so what can i do ?
thank's for any help
|
|
|
|
|
E_Gold wrote: is it posible to run my WebService in IIS on UNIX ?
You want to run IIS on Unix , that is not possible .
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
Hi,
as already said is it not possible to run IIS on UNIX.
But there is a port of the .NET framework for UNIX called MONO. AFAIK it is possible to run .NET webservices with MONO.
Have a look here:
http://www.mono-project.com/Main_Page[^]
Regards
Sebastian
|
|
|
|
|
Firstly, how does this relate to C#?
Secondly, ISS is a WINDOWS based web server, if you want to run a web server on a unix system go for apache[^]
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
I have a function that very often are called. Any tip on how to optimize this code:
private static double CalculateDifferance(object from, object to)
{
if (typeof(int) == from.GetType())
{
return (int)to - (int)from;
}
else if (typeof(DateTime) == from.GetType())
{
return ((DateTime)to - (DateTime)from).TotalSeconds;
}
else if(typeof(double) == from.GetType())
{
return (double)to - (double)from;
}
return double.NaN;
}
_____________________________
...and justice for all
|
|
|
|
|
well, this code totally sucks, not sure how you could hope to improve it apart from scrapping it. You could write a generic version, but I don't think generics in .NET support specialisation. How about abandoning it ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Also, what happens when from is an int and to is a DateTime?
Cheers,
Vıkram.
I've never ever worked anywhere where there has not been someone who given the choice I would not work with again. It's a job, you do your work, put up with the people you don't like, accept there are probably people there that don't like you a lot, and look forward to the weekends.
- Josh Gray.
|
|
|
|
|
Use Convert.ToDouble and Convert.ToDateTime
|
|
|
|