|
Has anyone created or seen an extension of the existing splitter panel that supports an "unlimited" number of panels?
If now, any hints on how to do it would be appreciated!
|
|
|
|
|
Daniel Jansson wrote: an "unlimited" number of panels?
What do you mean? Like 100 Rows and 100 columns? After a certain number of rows and columns it starts to sound like a job for something else like a grid or whatever, rather than a split panel control.
led mike
|
|
|
|
|
More like either 100 rows or 100 columns, but not that amount, more like 5 rows or columns.
I want the user to be able to resize and show/hide the different rows / columns easily.
The tablelayoutpanel can't be resize by default right?
|
|
|
|
|
Daniel Jansson wrote: I want the user to be able to resize and show/hide the different rows / columns easily.
To accomplish 5 or 6 rows or columns you could use nested SplitContainers. Let me be clear, I am not advocating that, I don't know near enough about the problem you are trying to solve to suggest any solution.
led mike
|
|
|
|
|
Hello,
when a key is pressed in a win form, it receives "key down" message. That event can be traced in WndProc function where another parameter indicates what key was pressed.
But the problem is discerning the left and the right control, shift or alt keys. Do you know how to find out whether right or left key was pressed?
|
|
|
|
|
As far as I know there's no visible difference on left and right shift keys in .net event data. However, you can try using native WM_KEYDOWN notification and see if it shows the difference.
|
|
|
|
|
Hi Paul,
I think you can find the information you need by coding a KeyDown event handler and examining the KeyEventArgs.Modifiers property. This returns a bitwise combination of values from the Keys enumeration which differentiates the right and left keys. The Alt keys are named LMenu and RMenu so you might easily miss those if you don't read the Keys documentation really carefully.
Alan.
[EDIT] Just tested this and the modifiers property doesn't return the left and right information, just plain Keys.Control, Keys.Alt etc.
|
|
|
|
|
Hi again,
thanks for your replies. KeyEventArgs.Modifiers can't discern left and right controls, I tried. The same concerns WM_KEYDOWN . 'Wparam' value passed with WM_KEYDOWN is surprisingly identical not only for e.g. control key. I'm wondering why pressing right alt (RMenu) resulted in the same event code as pressing a control key.
However, I came across some info about native methods in winapi programming, with which left and right keys can be discerned. These are:
GetAsyncKeyState() and GetKeyState()
They return the state of a certain key with needed distinction. With some indirect code, it is possible to find out whether left or right key was pressed.
But there comes the problem again (mentioned above): when I press right alt, firstly, the WndProc method gets a message as if the left control was pressed. Secondly, a KeyDown message for right alt is passed. Why is that so strange?
|
|
|
|
|
Good to know. Did you check lParam if WM_KeyDown. I understood from documentation that it should show the difference:
lParam
...
24
Specifies whether the key is an extended key, such as the right-hand ALT and CTRL keys that appear on an enhanced 101- or 102-key keyboard. The value is 1 if it is an extended key; otherwise, it is 0.
Mika
|
|
|
|
|
Can you let me know where did you find that information?
Well, there is a difference but the value is never 1.
For instance, on right alt down, there are two stages as I described.
At first lparam = 1900545. Nextly, it is 557318145. Can it be dependent on the keyboard type?
However you've got a point. I'll put more attention to lparam. But still, I don't know why pressing right alt causes sending two separate keydown messages. First for control, then for alt.
|
|
|
|
|
Sure: WM_KEYDOWN Notification[^]
The value depends on many factors so the number may be significantly different at different keystrokes (or when the key is repeated and so on)
I'm not absolutely sure about this but I've understood that right Alt isn't only alt but it's combination of Alt+Ctrl (that is also the reason for naming it Alt Gr and not only Alt)
Mika
|
|
|
|
|
Now I see what they mean with those numbers and value of 1. It is about specified bits inside lparam. No wonder that it has stranges values.
You've helped me much so far, thanks. I'll post here when I come to something reasonable.
Paul
|
|
|
|
|
You're welcome
I'd be glad to hear when you resolve your problem or if new problems arise
Mika
|
|
|
|
|
Hi,
Iam new to c#.net.
I have a dataset with the data coming from database.
I have bind the dataset to datagrid.
1. How Add a checkbox to the Datagrid ?
2.How to perform check and Uncheck functionality on the CheckBox in datagrid?.
3. How to change the column header text i.e, for example from database a column comes as "MP_Print_Name" I want to change it as "PrintName"?
Kindly help me
|
|
|
|
|
|
i want to work on something that manages staff time schedule. the rows indicate the time and the columns indicate the staff/employee. the logic of my app is when the start an end time is inputed it will color the datacells affected and show the details of the employee task. my problem is the details will appear on every datacell it will affect. is there a way in vb.net that same cells will be merged displaying a single values? i have seen an application in vb6 that display in datagrid what i need. here is the image:
[URL=http://img357.imageshack.us/my.php?image=datagridus2.jpg][IMG]http://img357.imageshack.us/img357/5510/datagridus2.th.jpg[/IMG][/URL]
the image show same dates merged into a single cell and displays a single value. hope there is a way in vb.net. ive tried to search for it in the web, i cant find any samples of it.
|
|
|
|
|
|
Hi
i m new in programming and want to include an analog clock in GUI(vc)in .Net.help me if i am in right form or inform me about the right form
|
|
|
|
|
You should look for Gauge or chart control which could allow you to create Analog Clock on Form.
This type of control is available from many software component developing companies.
I hope this helps.
-Dave
------------------------------------
http://www.componentone.com
------------------------------------
|
|
|
|
|
I have a requirement to read the data from the selected files, and populate in the treelistview, currently it is taking more than 10 seconds to display could any body post a sample code how to reduce this time. The file contains at about 10 delimiters to read the contents properly. Most of the file size is more than 5000 lines.
SomaShekhar
|
|
|
|
|
Speeding up the loading process depends also on the way you store data in files. Is it possible to make any precalculations for that data, so that it is not necessary to calculate some things while loading?
How do you know where the items from a file should be placed in the treelistview? Try to sort data in your files, so that you know it without any parsing, calculating and so on. E.g. store a value that would indicate how many items there are to load for each branch of the tree.
Secondly, you can use e.g. BackgroundWorker class provided with .NET, which will run the loading process on another thread and let you do something else, while loading lasts.
|
|
|
|
|
I'm not sure if this is the correct forum, but in case it's not, pls let me know where I can post for some assistance.
I'm trying to write a program that supports the following requirements:
Run while another program is running;
Get the keyboard input(s)
While on another program, my program will take the input and loop.
In other words, instead of repeatedly pressing keys, if I hold key down, my program will loop and return the key value to the active screen.
The problem I'm having right now, is that it works as a console, but when I switch to another screen, I loose focus of my application and the keyboard input is no longer being detected. I suspect I need help with threading but need some direction as well.
Here's what I've got so far.
#include <stdio.h>
#include <conio.h>
#include <iostream>
using namespace std;
//function prototypes
void press_any_key();
void one();
void two();
void three();
int main(){
cout << "Start";
press_any_key();
getch();
return 0;
}
void press_any_key(){
bool done;
done = true;
char input;
do{
do{
input = _getch();
if(input == '2'){
cout << "Currently holding the right key";
done = true;
}
else if(input == '+'){
cout << "Abort.";
//done = true;
exit(0);
}
else{
done = false;
}
}while (_kbhit());
}while(done == true);
cout << "Done";
}
Help pls. Thanks
|
|
|
|
|
humblepgmr wrote: Run while another program is running;
Get the keyboard input(s)
While on another program, my program will take the input and loop.
Sounds like a keyboard logger, normally used by hackers to steal passwords etc. We don't support hackers here on CodeProject.
led mike
|
|
|
|
|
It's really not intended to be a key logger.
I'll explain.
I have a program that requires that I press the number '2' repeatedly; basically instead of pressing it manually, I'd like to just hold the button till I press the '+' key to terminate. While I agree that it can be saved somewhere as a file and then emailed / transfered over the network it's not my intended purpose. I really have a genuine need to press repteatedly.
This isn't intended as an insult, but you jumped to a conclusion which is not accurate at all.
|
|
|
|
|
i have a control in mdi form. when i open a child form then the control in mdi form is overlaping the child form.
please help me to solve this issue.
Pradeep Reddy
|
|
|
|