|
[DllImport("mydllnamehere.dll")]
int FT_Read(IntPtr ftHandle, byte[] lpBuffer, uint BytesRead, out uint BytesReturned); That's a quick guess; I'm assuming FT_HANDLE is a typedef for void* . When calling it, you need to create the array of appropriate size first.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I have a read-only textbox (I tried a label first, but for some reason it converted my \n's to a [] (a box) sign) that I need to put some text into. It is basically a chat program.
The problem is when the textbox becomes full, and more text is entered, the text goes out of view. It looks like it just keeps filling with text, but the textbox isn't "big" enough. How can I make it always show the bottom line, autoscrolling downwards in a way, like MSN Messenger for exmaple.
Sorry for the spelling errors, I'm late for lunch
|
|
|
|
|
|
Thanks, looks like it's better than the textbox, but I still don't see how I can get it to always show the last line. It now shows a scrollbar AND accepts my \n's, but as new text is entered at the bottom of the previous texts, it only creates a scrollbar so you _can_ scroll down to view the new messages, it does not however do any "automatic down-scrolling" so the latest messages are always viewable.
Sorry if I am being a pain in the ass :P
|
|
|
|
|
What you got from the above thread is the right. Otherwise if you want to implient using normal text box then set the Multiline property of text box control to true.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
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
|
|
|
|