|
Look at the PrintDocument class for starters
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi,
I am using a treeview control to show image on each node depending on a particular variable's value (green if it is set and red if not. Bydefault red)
When I am setting the variable for a particular node then the node's image is changed to green(required behavior). But when I click on a node which has green image, the node's image is automatically changing to red and again changing back to green after changing the node selection.
Please help me in solving this problem.
Thanks:
Rakesh
Rakesh
|
|
|
|
|
Check out the SelectedImageKey and ImageKey properties ... these control what image is set by default and when a node is selected. they should both be clear if you want to control it.
|
|
|
|
|
I have set these values to null in the tvQuestionsList_NodeMouseClick eventhandler but the problem still persists .
Rakesh
|
|
|
|
|
Set them both to the same value.
|
|
|
|
|
That worked but one more problem has raised, when I select other node the previous node is again changing to red color from green. What could be the solution...
Also can you suggest me any refference for this SelectedImage property like how it works and so.
Thanks:
Rakesh
|
|
|
|
|
|
I fixed it. Thanks...
Rakesh
|
|
|
|
|
Hi Ed,
Can you help me solving one more problem?
I want to retain the back color of the selected node when I change the selection of the node through my form's next/previous buttons. To be clear when I am clicking on any node with mouse the backcolor is turning to blue(system generated). But when I am changing the selection the backcolor of the newly selected node is turning to white.
I tried to modify the backcolor explicitly but I am not getting the same color as if system is giving by default.
thanks in advance,
Rakesh.
Rakesh
Rakesh
|
|
|
|
|
rockyl wrote: but I am not getting the same color as if system is giving by default.
Are you using SystemColors.HighlightColor ?
|
|
|
|
|
No I am not using this color. Will this solve my purpose?
Rakesh
|
|
|
|
|
This colour changes automatically to reflect the highlight colour (used when the TreeView item is selected) defined by the user in the Display Properties of Windows. So it is the same colour as the TreeViews selected node colour.
|
|
|
|
|
|
SystemColors.Highlight has solved my purpose.
One more thing I am looking for is: I want to have some gap between each node of my tree. I have used indent property for this but there is no effect. Can you tell me way?
Thanks in advance:
Rakesh
|
|
|
|
|
Indent is the indentation from the left of the parent node, not the seperation between nodes, look for something like NodeHeight or a property with Height in it (excluding the ones relating to the control). I think there is one.
|
|
|
|
|
HI Ed,
Now I want to implement the key down event. Means when user clicks on down arrow I want next item to be diplayed and other wise if Up arrow. For this I am using the tv_KeyDown event and changing the item on the arrow clicked either Up or Down. But the problem is for the first click it is moving two nodes istead of one. And from then working fine.
Please let me know your thoughts on this.
Thanks:
Rakesh
|
|
|
|
|
Can you post some code? The only thing I can think of is if the TreeView doesn't have a node selected by default.
|
|
|
|
|
I am explicitly selecting the first node
tv.SelectedNode = tv.Nodes[0];
and here is my code:
private void tv_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyValue == 40) //code for down key only
{
if (currentItemCount > -1 )
{
MyItem[currentItemCount].Visible = false;
tv.Nodes[currentItemCount].BackColor = Color.White;
currentItemCount+= 1;
MyItem[currentItemCount].Visible = true;
if (tv.SelectedNode != null)
{
tv.SelectedImageIndex = tv.Nodes[currentItemCount].ImageIndex;
}
}
}
Rakesh
|
|
|
|
|
Hi all
From where i Get The PASSWORD EXPIRY DATE of user in WINDOWS SERVER 2003 OS
SP
--
Bugs can neither be created nor be removed from software by a developer. They can only be converted from one form to another. The total number of bugs in the software always remain constant.
|
|
|
|
|
|
I have an installer.exe. That installer is built in NSIS V2.17. I need to run that installer in silent mode from command line.
My coding is as below:
char regSvrPath1[1024];
strcpy(regSvrPath1, "C:\\Program Files\\Installer.exe");
char regSvrArg1[1024];
strcpy(regSvrArg1, " /S /D=C:\\Program Files\\Installer");
int iI = _spawnl(_P_WAIT, regSvrPath1, regSvrArg1, NULL);
When the spawnl statement is executed, it shows me the messagebox,
"Please specify the installation type as first parameter: /install /upgrade /remove"
I have tried out the arguments as
strcpy(regSvrArg1, " /install /S /D=C:\\Program Files\\Installer");
But it is not working....
Can any one please guide me, how to specify install, uninstall or upgrade option from command line??
|
|
|
|
|
- I do beleive you should run the installer
with a /S for silent mode.
example:
myinstaller.exe /S
-If this has changed with a new version check
your nsis manual
PS: You migh also have to add an IsSilent() check
in your install script
"Shorter of breath,
and one day closer to death." ~Pink Floyd
|
|
|
|
|
i used Mask text box in project
& when i Run Project on diferent pc
if Format of date of system is Different than it give error
that invalid DateTime how i solve this
|
|
|
|
|
How are you accepting data in masked text box? You can convert the input into your format.
For example you can say string.Format("{0:dd\MM\yyyy}",DateTime.Today.Date);
If this does not make any sense, you will have to send me some code of yours
|
|
|
|
|
Hi,
how i can validate a formula.
Formula contains columns of table and operators.
if suppose c1,c2,c3 are columns of table, c1 is of type string, c2 is decimal and c3 is int.
formula may be a+(b*c),or a*(b/c). I need to validate that formula. how i can
approach.if any one had done this plz send me the required code.
lakshmi
|
|
|
|