|
How to print 1000 line in one page.
i use POS printer.
C.Kumarasinghe
|
|
|
|
|
Make the text really small I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Just set your page size to 1000 / lines per inch - calculated from font height. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
C.Kumarasinghe wrote: i use POS printer.
Go buy a good one then."WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I don't know how many times you're going to ask the same question, but I'm only going to answer it once.
See if this article[^] can help.
|
|
|
|
|
if i install sql express edition and visual studio 2005 in my system which shd i first install? and my another question is, Is there any free version of visual studio 2005 available to download?.
thanks and regards
Suni
|
|
|
|
|
sunyjose wrote: if i install sql express edition and visual studio 2005 in my system which shd i first install?
It doesn't really matter.
sunyjose wrote: and my another question is, Is there any free version of visual studio 2005 available to download?.
Yes, Visual Studio 2005 Express Edition. A little Google goes a long way. You may want to scrap the 2005 version and go for 2008 instead.
|
|
|
|
|
If you install Visual C++ 2008 Express Edition[^] you can get the SQL Edition automatically included. [edit]Not sure this last is still true, website has changed[/edit]. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Well... I load from database some tables in comboboxes. I want to display only a part of data (i work with adress (state, region, street, cp etc.)) so i use local datasets and load all of it in combobox with arraylist (datasource, displaymember etc.). But i can't just register every street in the country, so for a special place i register all of it, and for all other i want to make possible to register it if it's not registered. So i need to check if i write in combobox some text and then want to insert it in the database if this text is already in the combobox displaymember. So how can i search for an item in combobox by displaymember text?
|
|
|
|
|
Your question is rather confusing, I don't understand what you mean by "register" in the above context. Perhaps you could try to clarify what it is that you are trying to do. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Well.. It's simple. Imagine that you have 2 combobox. One for city, other for street. You live in some especial city, so that's why the mayor part of your customers gonna be from that special city. So you store all street info for that city in the database, but someday you can be visited by customer from another city and you don't have information about that city. So you have 2 options: register every city in the world, with every street in your database (and you would have to get all that information every time from your database) or just permit to register new cities and streets (if they are not) in your database (method INSERT). So to do that i want to write in city combobox for example Boston, then i would like to check if Boston is already in the combobox, so i don't have to register it anymore or not. Because of structure of my application i created some arrayList for my combobox and assigned datasource, displaymember and valuemember. So i want to do a search only by displaymember of combobox (because i don't know valuemember) and if there is some item with same displaymember i want to get the valuemember of that item. Simple.
|
|
|
|
|
Why not use your database to store the new cities, then you don't need to worry about trying to search a combobox. If it's a new city then add to the database and refresh your combos through data binding. You also then have that city for the future. Same process with new streets should allow you to gradually build up the information that you need. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Well... there is more troubles.. But doesn't matter. I already found good answer.
|
|
|
|
|
you've got a good answer; whether what you found is any good we will not know unless you tell us about it, what would be the decent way to end a thread anyway.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
Well.. It's more complicated, because i cann't just bind data to my combo. I need to do some operationes before, so i create an arrayList of combobox items and bind it. So before register customers data i make some check. 1st i check if combo.selectedValue is Nothing (=null) and if it is i call database procedure that give me id of my street (if it exists it gives me a real id, if it doesn't procedure inserts data and returns @@IDENTITY) than i check my DataSet if it has already that id and if it doesn't i add a row and get datasource of the combo (dim array as arraylist = combo.DataSource) and then add data to arraylist and than i have to reset datasource of my combo (combo.datasource = nothing combo.datasource = array). And then change combo.SelectedValue = sqlcmd.Parametres("id").Value.ToString() (i used it before and it didn't worked.. I spended some time searching and didn't found an answer. The problem was ToString() i didn't put it and it didn't worked that way).
By the way i found method i asked before FindExactString - searches for displayMember in a comboBox and FindString - searches for valueMember.
So.. It all works.. Simple but took some time. Tnx for trying to help =)
|
|
|
|
|
Hi
I've got a kind of complex windows application written in c#.
I want to save the whole application state to a file and reload it after a restart.
With application state i mean all objects of the application, text entered in forms, items in tree view etc.
Kind of method that saves the hole memory of the application.
How can i do that in an easy way?
Thanks
Adrian
|
|
|
|
|
There's no standard approach for that... It's very complex and sometimes impossible task. You will have to implement it by yourself.
Best wishes!Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
|
|
|
|
|
adoerig wrote: How can i do that in an easy way?
There is no easy way.
The data must be persisted some how, must likely in adatabase. The application state itself, like window positions, sizes, etc. can be done with user settings but it will be up to you to set the cotnrols appropraitely on startup. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
There is nothing that will do this.
All of the data you want to persist should be stored in data classes you've written for the purpose of holding this data so you do NOT have to rely on TextBox's and such to hold the data. Once you've rewritten your app to hold your app's data in proper storage classes, it's a simple matter of serializing those objects out to files and deserializing them back into those data objects when your app loads them the next time.
|
|
|
|
|
adoerig wrote: With application state i mean all objects of the application, text entered in forms, items in tree view etc.
Be carefull there; you'd reload the text in the form on the next application-start, as opposed to the data as present in the persistence-store. If that store is a multi-user database, chances are that someone alters the data and it would be different from what was "on screen" the last time.
adoerig wrote: How can i do that in an easy way?
Sounds like you want two things; caching data and saving state, am I right? It might make sense for form-positions, but I wouldn't serialize the contents of a memento.
An "easy" way would be to have a single class that represents the state of the form and it's contents. That would at least be easier than looping all controls and asking them for their internal state. Alternatively, you could mark classes or properties with custom attributes to identify them as 'having an internal state that needs to be persisted' and serialize the lot.I are Troll
|
|
|
|
|
I had the same problem a couple of years ago. It is really quite easy to do. Three steps:
1. Make sure that everything in your app is in a serializable hierarchy. This typically IS the case - your application is at the top of the hierarchy.
2. Make all handle-based references (files, streams, etc.) weak references. They should always check before they are used to see if they are null, then reopen if so.
3. Write that top element (the application) out to an Object stream. Then you can read that object stream back in to restore the session.
Number 1 above introduces a few twists. There are always certain values that you do not want to red back in. For instance: the aforementioned file handles/streams, current time, is something in an error state? For those values, make sure they are initialized and set them to non serializable.
It works well and it's fairly easy
|
|
|
|
|
i have a modem. vb.net 2008. I want to send sms to a mobile phone. Please can you assist?
|
|
|
|
|
This[^] may provide some assistance.Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Hi to send SMS Using a modem you need to use AT Commands , AT Commands are the command that you need to send to the modem (GSM Modem ) and it will send the message to the required number , You can do a google search on "How to send SMS using AT commands"
Let me know if you need further help
Happy Coding-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
Hello,
I would like to ask if how will I edit existing database records
like the edit mode.
Any suggestion or comments are kindly appreciated.
Thanks,
dfan23
|
|
|
|