|
been there
see windows genereted code has the required proprieties!!!
i have a picture box and i load small and big pictures, when they are small i center them, when they are big i place a scroll.
you want that right?
place picturebox inside a panel and allow scroll, now because i don´t remember the code (don´t worry it´s simply) check like i said windows genereted code and the proprieties windows.
make them same size(panel and picture), when get picture ask the size that way you know if is small you center if bigger you scroll.
(place other post if you became stuck, i don´t have code memorized in my head)
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
i made a textbox and a combo box(combo box contain all available font sizes) ..
now i want that when user enters the data in it..
he can also increase the size of the written text in textbox by selecting the size from the combo box....
hghghgh
|
|
|
|
|
Try this.,
textBox1.Font = new Font(textBox1.Font.Name,
float.Parse(cboFontSizes.Items[cboFontSizes.SelectedIndex].ToString()));
Handle the above statement in SelectedIndexChanged event of cboFontSizes
where textBox1 is the TextBox used and
cboFontSizes is the ComboBox having TextSizes;
|
|
|
|
|
i am not sure about the terminoly but it would be great if anyone could just point me to the correct term for the technique so I can research it. It's when partially displaying a set of information coming from an sql query in a c# application. A next (and preferably also a back) button is provided to navigate say every batch of 20 items. Also, doing this, which is best for the technique, to query everything from sql and have it cached within the application and next just fetches from this 'collection' OR actually caching in the sql server, if it is at all possible. if the former, i think its disadvantage is the application would require large amount of ram for a large result set. for the latter, this means an sql command is sent to the server to fetch the next batch of the result set, while not really sending another select statement or using a where clause. i hope i am making sense as i'm only really guessing here what i think is happening.
thanks for any reply!
----------------------------------------------------------
"unzip; strip; touch; finger; mount; fsck; more; yes; unmount; sleep" - my daily unix command list
|
|
|
|
|
|
i found somewhere of sql statement like LIMIT in MySQL that compatible with sql2000
SELECT TOP(@LIMIT) * FROM TABLE WHERE KEY NOT IN (SELECT TOP(@OFFSET) KEY FROM TABLE)
just fill LIMIT and OFFSET parameter for paging
hope it helps
dhaim
programming is a hobby that make some money as side effect
modified on Thursday, September 18, 2008 11:11 AM
|
|
|
|
|
i'll have a look at the links as it's pretty late (past midnight) and i'm really tired...
but re: select top 10 *
i reckon this will not work (?) because how i envision it, is the next button is mapped to the 'paging' select... the above code does not guarantee that rows resulting from the first batch will not be in the second batch and so forth... in fact it will result in the same set of rows... unless i create a stored procedure that includes a multiplier along the following code:
select
top (10 * multiplier) *
from
transactionsTable
...then again, i would probably need to put an order by some column at the end of the clause.
----------------------------------------------------------
"unzip; strip; touch; finger; mount; fsck; more; yes; unmount; sleep" - my daily unix command list
|
|
|
|
|
swjam wrote: above code does not guarantee that rows resulting from the first batch will not be in the second batch
Yes, that's why you have to combine it with the ROW_NUMBER() function to get a specific range of rows. The first link covers how to do this.
Or, like Mbah Dhaim suggested, you can use a sub SQL query to keep the already covered pages out of the results.
Obviously, if you are doing any of this, you need to be aware that new data may be being entered into the database, or existing data might be updated or removed between you accessing the pages.
It definitely works, whether it's efficient or not, I don't know. I'd make sure you run some tests, and read up on what would be the best indexes to use.
You might get more expert answers in the SQL server forum now you know what it is to ask about.
Good luck
Simon
|
|
|
|
|
How can you print a datagridview? First, I want to put it in a print document for viewing before I allow to print it. Can anyone give me the full detail of how to do it? Thanks!
|
|
|
|
|
|
Hi,
What's the best way to search a DataTable and retrieve a value??
Any possibility to use an sql Select statement??
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
Thanx
But I still cant use it correctly!
DataRow dr = dt.Select(textboxSalary.toString()+"> MIN_SALARY AND "+texboxSalary.ToString()+ " < MAX_SALARY")[0];
cannot apply operand < to string!!
How can I do it when I need to concatenate integer values as a string for the select statement
Thank you Giorgi!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
Thanx again Giorgi!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
if datatable has primary key, you can search using DataTable.Rows.Find(object key) or DataTable.Rows.Find(object[] keys).
if you prefer more like Sql statements, create a DataView instance from your datatable and supply RowFilter property with your criteria ie. 'a like '%filter%' or b=1 and c='2'' etc.
hope it helps
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
i made a combo box ...
now i want that when i click on it for drop down,
it should be displayed all available fontsizes in it.
how can i do it....
Maifs
|
|
|
|
|
|
I just wonder if there is a way of raising a number to a certain power by c# code i.e coding such a function in c#. e.g 3^5,OR 3^x where x can be a variable, now writing this in code form????
|
|
|
|
|
It has to do something with Math doesn't it? Why not search for such class?
|
|
|
|
|
Is it System.Math.Pow() that you are looking for?
Always keep the Murphy Rules in mind!
|
|
|
|
|
I believe it has to do with double power(val, n) etc.
|
|
|
|
|
What are the differences between using :
HttpChannel, TcpChannel, and IpcChannel in .NET Remoting ?
How about the performance ?
Thanks...
|
|
|
|
|
Its all a question of project scope...
HttpChannel
Scope
Wide - Objects can be hosted on an HTTP server, which makes it robust. The object can then be accessed from anywhere on the internet.
Efficiency
Reduced - HTTP brings alot of overhead with it, which reduces efficiency
Security
High - When hosting on IIS, advantage can be taken of SSL(secure socket layer) windows authentication or kerberos.
TCPChannel
Scope
Narrow - This requires certain ports to be opened, and therefor not anyone may obtain access
Efficiency
Increased - the protocol uses raw sockets to transmit data across networks
Security
low - by default there is no security system that companies this protocol, thus creating a security risk.
Hope this helps
Harvey Saayman - South Africa
Junior 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
|
|
|
|