|
I had multiline on, but it didn't allow me to set any autoscrolling on.
|
|
|
|
|
Set ScrollBars property of your textbox to vertical.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I am sorry, but I don't see how that helps me, unless you expect people to be willing to scroll down manually for each new message (plus every time the user types his own message).
Yes, I want (nad have) a scrollbar, that is however not what I needed help about
|
|
|
|
|
|
Hello,
I have a TabControl with three TabPages and at one TabPage I add a panel and in the panel are 6 textBoxes and a vScrollBar. Unfortunately the problems occured when I deployed the application:
1)When I look at the tabPage the scrolling is not possible - I see the ScrollBar but only the top point of the scroll bar not the bottom point, although I set the size of my scroll bar in the VS Designer only as big as the tabPage..?
2)When I enable the SIP the Scroll Bar adapts to the size with the keyboard and scrolling is possible. But when I scroll down the scrollbar goes up as the textBoxes do. So after scrolling a while the top point of the ScrollBar cannot be seen...?
The code for that is as follows:
As fields I declared beside a panel, textBoxes, etc. these two variables.
private const int SB_HEIGHT_SIP = 188;
private const int SB_HEIGHT_NOSIP = 268;
The EventHandlers and the pResizeScrollBar looks as follows:
private void vScrollBar1_ValueChanged(object sender, System.EventArgs e)
{
panel1.Top = -vScrollBar1.Value;
}
private void Form1_Load(object sender, System.EventArgs e)
{
pResizeScrollBar();
}
private void inputPanel1_EnabledChanged(object sender, System.EventArgs e)
{
pResizeScrollBar();
}
private void pResizeScrollBar()
{
const int NO_OF_PAGES = 2;
if (inputPanel1.Enabled)
{
vScrollBar1.Height = SB_HEIGHT_SIP;
vScrollBar1.Maximum = panel1.Height - SB_HEIGHT_SIP;
}
else
{
vScrollBar1.Height = SB_HEIGHT_NOSIP;
vScrollBar1.Maximum = panel1.Height - SB_HEIGHT_NOSIP;
}
vScrollBar1.LargeChange = (int)(vScrollBar1.Maximum / (NO_OF_PAGES - 1)) + 1;
vScrollBar1.Maximum = vScrollBar1.LargeChange * NO_OF_PAGES - NO_OF_PAGES;
panel1.Top = -vScrollBar1.Value;
}
Please can anybody give me an explanation why these strange things occurs??
Thanks in Advance.
Best Regards
mat
|
|
|
|
|
Ok. You have few textboxes in your panel. You want scroll bar when number of text boxes increses and need to view. This is what i understood. For scrolling the content of a panel you don't want to add any scroll bar inside. Better way to tackle this is, set the autoscroll property of the panel to true. If so, panel will automatically add scroll bar if it contain more number of controls which is not in visible position.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I want create program read user list from LDAP (on LINUX)
Every body help me.
Thank
|
|
|
|
|
|
I would like to mark a form as abstract and then inherit from that form.
My problem is that, when I open the child form. VS tells me that it's unable to open the mother form because it's abstract
any idea ?
|
|
|
|
|
You cannot instantiate an abstract class. Declaring a class as abstract is telling the compiler that you never want to instantiate it, only derive from it and instantiate the concrete derivatives.
What do you mean by "child form" and "mother form" in this context? When I think of that the parent form is opened before the child form is, so I can't think what you mean by it.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
I know that it's impossible to instantiate an abstract class. And I don't want to.
The term mother form and child form are translated from french ... i'll try to explain a little better.
I have a form (fmBase) from wich I inherit all other forms in my application.
I will never instantiate fmBase in the application, only herited forms. I could live without declaring fmBase as abstract but I would like to declare abstract method in fmBase.
If I declare fmBase as abstract, it's impossible to open the inherited forms in the VS designer. VS says it can't create an instance of fmBase. I understand that it's impossible to crate an instance of fmBase to show in the designer, but I would just like to open an inherited form.
I hope I explained better that time, I'm french and it's sometimes difficult to put the right word at the right place
TIA
Julien
|
|
|
|
|
|
|
hi! can anyone show me how to make an expiration for a certain software where backtracking of dates (i.e. changing the system date) will not nullify the license.. also, the software will have a counter which counts how many times the software is being used.. thanks!!
|
|
|
|
|
Here what you need to check is, while generating lisence key, you need to use some other values to produce entire lisence key. Say combination of dates ,customer name and etc.
If you follow this , then you don't want to worry about date changing.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Dear All,
i have a problem with a deployment project, in the first of this project i can add a merge model to that project and i have reached to a point where i hade an error while compiling that project
unable to import merge module
if any pody know what is that error related to, i will be thankful for help
best regards
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
i'm just learning C#, just to warn you.
I want to create a app that will be able to perform various functions on chemical equations. so if the input was "C12H4O3Mn5". how would i divide each element, some one letter, some 2 into workable variables along with their corresponding amounts which would have to be integers in seperate variables?
what would be ideal is 2 arrays, one with the element and one with the ammount correspondingly.
|
|
|
|
|
Please check the member function which is avilable in string class. All functions are self explanatory and contain nice examples.So please refer MSDN.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Anonymous wrote:
what would be ideal is 2 arrays, one with the element and one with the ammount correspondingly
I would have said the ideal would be to create a class. Having two arrays in this way can be problematic - especially if they arrays become out of sync with each other.
As for splitting the input string. I imagine that the best solution would be to use a regular expression, however I'm not to good with them.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
Hello,
My Form has a listView control, that is acting as a
message window. Messages are appended to the listView.
I would like the scrollbar knob to stay positioned at
the bottom of the vertical scrollbar. How can I do it?
Regards,
Zishan
|
|
|
|
|
This code blcok will help you to get the visibility of last item in your listview control. And if nessasary it will scroll upto the end.
<br />
if(listView1.Scrollable)<br />
listView1.Items[listView1.Items.Count-1].EnsureVisible();
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Thanks a lot.. this solved my problem
Best regards,
Zishan
|
|
|
|
|
I hava simple program that posts a xml file over the web to an Apache Web Service.
HttpWebRequest wr = ()WebRequest.Create(url);
wr.ContentType = "text/xml";
wr.KeepAlive = false;
wr.Timeout = 60000;
wr.Method = "POST";
Stream s = wr.RequestStream();
.....
.....
WebResponse response = wr.GetResponse();
The TCP Timeout is occuring on the wr.RequestStream() after the 5th time file sent.
Knowingly the program sends many XML files a minute. It is quite efficient producing them. However it would appear to block after the 5th one and then everything yields a TCP timeout. I increased the timeout to 1 minute on my side but yet I get the timeout within 20 seconds.
Guillermo Jimenez
|
|
|
|
|
Are you closing your connections? The number 5 seems almost programmed, like that's a connection limit. You need to make sure that you close your connections by calling Close or, better yet, use the using block statement to make sure the HttpWebResponse gets disposed (which closes the connection among other things):
using (HttpWebResponse response =
(HttpWebResponse)request.GetResponse())
{
} The using block statement compiles to a try-finally block, where it is disposed - if not null - in the finally block (so exceptions are thrown but the finally block is always executed before execution returns to the caller).
Now, if you need to allocate N number of connections like a web crawler or something, you need to control your threads. Don't just create new threads when you feel you have to. Using the ThreadPool helps in these case.
The .NET BCL also includes checks to prevent too many stops. This uses a ServicePointManager and the ServicePoint classes to limit connections. The ServicePointManager.DefaultConnectionLimit gets or sets the default number of connections. Setting that higher may help, but most servers implement their own connection limits.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Heath
You are close to becoming my personal mentor. You have answered every single one of my questions with incredible accuracy. Thanks a lot.
Back to WebResponse
I also thought that forcing the connection closed from my side was the way to go and added a finally block to set the object to null. Of course your using {} block is a much more elegant solution and I happily threw mine away to use yours. I have not tested either. I will let you know.
Look out for my next question, I'm sure you have the answer!
Guillermo
|
|
|
|