|
Hello You!
I need Your HELP.
I have my own TreeView Nodes Editor, in order to add 'MyTreeNode'', like node which are ComboBox and so.
I have two classes. one inherit from 'TreeView' and the other from 'TreeNode'.
In 'MyTreeView' i override 'Nodes' (keyword- new) in order to open my custom editor.
In public partial class MyTreeView : TreeView, I use the next statement:
[
DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
Editor(typeof(NodesTypeEditor), typeof(UITypeEditor)),
]
new public TreeNodeCollection Nodes
{
get { return base.Nodes; }
set
{
TreeNode[] myTreeNodeArray = new TreeNode[((TreeNodeCollection)value).Count];
((TreeNodeCollection)value).CopyTo(myTreeNodeArray, 0);
((TreeNodeCollection)value).Clear();
this.Nodes.AddRange(myTreeNodeArray);
}
}
but the DesignerSerializationVisibility create the next code, which produce casting error on run time:
MyCheckTreeNode myCheckTreeNode1 = ((MyCheckTreeNode)(new TreeNode("TreeNode")));
I need it to be :
MyCheckTreeNode myCheckTreeNode1 = new MyCheckTreeNode("TreeNode");
In the editor i use TreeView and PropertyGrid. the code in 'Add CheckBox Node' is:
treeView1.Nodes.Add(new MyCheckTreeNode("TreeNode"));
How can i fix it???
Please Help me. I need it fast.
Thanks,
Ran S'
|
|
|
|
|
Using context menu in windows explorer treeview (left part), I would like to launch my winform application in the listview (right part of windows explorer).
Is it possible ? (for the moment i just know how to create context menu in windows explorer)
|
|
|
|
|
I have a question on how to configure my .VCPROJ (VC++ 7.10) project properties so that I can produce both a .LIB and a .DLL when I compile.
In Studio.NET IDE, i can go under
Project->Properties->Configuration Properties->General->Configuration Type>
And set it to build a .LIB (or a .DLL). In a VC++ 6.0 version of a project I have, I can build both .LIB and .DLL in one compile.
How can I do this?
Thanks,
Johnny
|
|
|
|
|
I have an installer with several dialogs where the user can enter information. This information is later passed into a custom action as parameters in the form of:
/username=[USERNAME] /password=[PASSWORD] /hostname=[HOSTNAME]
being passed into the CustomActionData.
The installer works fine if all of these fields are filled in, however if they are left blank the installer crashes with the error:
"Exception occurred while initializing the installation:
System.IO.FileNotFoundException: File or assembly name myLastName, or one of its dependencies, was not found"
Does anyone have any idea why this is and if I can still run this custom action with these as parameters if the fields are left blank?
Thanks,
Luke
|
|
|
|
|
Hello everyone, first code project post for me.
In .NET, all classes seem to export by default, is there a way to explicitly mark a class so that it is not exported, i.e. make it invisible to
anyone who uses the assembly? I've got a couple of classes that are only used internally in my class library that the user shouldn't have to know about.
Any suggestions?
-Mathias
|
|
|
|
|
|
Thanks a lot!
Note to Managed C++ developers:
In Visual Studio 2003 there is no '__internal' keyword equivalent to C#'s 'internal', instead one is supposed to use 'private public:' access modifiers (!?). This should be fixed in Visual Studio 2005.
|
|
|
|
|
I'm trying to create an installer that will prompt the user for a username and password that they want to save. Unfortunately none of the templated dialogs that are in the user interface portion of the installer setup have a password field and their properties can't be edited to have them.
Does anyone know how I would go about adding this functionality to the installer? I've read all about custom actions and what's available there, but unless I'm wrong, these aren't there as prompts to the user and only execute during/after the installation process. I'm also using C# if that makes a difference.
Any help would be greatly appreciated.
Thanks,
Luke
|
|
|
|
|
|
I am using the Visual Studio 2003 Setup Wizard in the Setup and Deployment Project. I create a Setup for windows applciation. The generated output is a .msi file which I want to be able to distribute.
When I try to install a new version of my application over an existing one I get the following warning.
"Another version of this product is already installed.
Installation of this version cannot continue. To
configure or remove the existing version of this product,
use Add/Remove Programs on the Control Panel."
In the Deployment Project
DetectNewerInstalledVersion = True
RemovePreviousVersions = True
One strange thing is that if I Right Click on the Deployment Project and choose Install I do not have any problems - all installations are OK. It is only when I double click on the generated .msi file that the problem occurs.
I do not know if there is any use of it but I have Windows Installer 3.1 (the latest vesion I think)
Does anyone have any suggestions?
Thanks,
|
|
|
|
|
The setup.exe file is the file that will check for the previous versions ,click it and it will work as well.
|
|
|
|
|
LongHC wrote:
The setup.exe file is the file that will check for the previous versions ,click it and it will work as well
My distribution does not have the setup.exe file it only has a single .msi file.
|
|
|
|
|
You can force a reinstall over an existing installation by doing the following:
Make sure that all newer files have a higher version number than the existing files.
Run the msi with the following command line parameters:
msiexec /i [Fully qualified path to your new msi] REINSTALL=ALL REINSTALLMODE=vomus
You can modify the bootstrapper exe to run the install with the above command line.
There are a couple of limitations to this method:
This forces your new msi to run in reinstall mode, and overwrites all existing files where the version has changed. If older files exist that are no longer needed, this method does not account for removing them, and in fact you will still need to add the unneeded files to your new msi because they need to be present so that they are entered in the uninstall log. Otherwise if your user does a complete uninstall, old files not installed by your new msi will be left on the target machine. Ditto for all other resources like registry entries, etc.
If your new install needs to get user input from dialogs, you may run into problems.
An alternative to forcing a reinstall is to modify the bootstrapper to first run the existing msi in Unistall mode, then launch your new setup. You can get the parameters needed to run an uninstall from the registry.
Finally, Windows Installer does support "true" product upgrades, which are not the same as simply trying to force a reinstall over an existing product. But if your original setup was not correctly authored with an UpgradeCode, among other things, then this will not work. Describing how to author msi's to support future upgrades, and how to author the associated upgrade msi's is beyond the scope of anything I could answer on this forum.
Robert
|
|
|
|
|
Robert,
There seems to be a lot of good informaiton there but is beyond my understanding.
Could you point me to a tutorial/info on the installer process as used by Visual Studio. (e.g. what is the bootstrapper, how do you author installer scripts, how to access the registry setting, what other installation options do I have?)
Does this all have to be done from within Visual Studio.
Thanks,
Liam
|
|
|
|
|
|
OK, the typical installation process involves first running a program called Setup.exe, AKA the bootstrapper. The bootstrapper is a program written in C++ so that it has minimalk external dependencies and should run on any system that has Windows installed.
What the bootstrapper does is to check to see if the .NET Framework is installed. If not, it installs the framework so that the target machine is now ready to run your MSI setup package. Once the bootstrapper has prepared the target machine it launches your MSI.
The source code for the bootstrapper is available, so you can modify it to run additional actions before your MSI is launched. In this case that would be probably uninstalling the existing application if it exists.
To unistall the existing application and then install your new application, you would perform the following steps:
1) Search the registry to verify the app is already installed. MSI packages are identified by a GUID known as the ProductCode. You have to determine the ProductCode for your app. If the app is installed, there will be an entry in:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
Example. ProductCode is {FB6E8318-B7EA-4392-A7DD-D33295D158B7}. If the product is installed, you will find a registry entry at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FB6E8318-B7EA-4392-A7DD-D33295D158B7}
2) If the app is installed, uninstall it by running the command line:
MsiExec.exe /qb- /X[Your ProductCode]
Example:
MsiExec.exe /qb- /X{FB6E8318-B7EA-4392-A7DD-D33295D158B7}
MsiExec will return a success code = 0 when the uninstall is complete.
3) Launch your new install after msiexec has returned a success code for the uninstall.
Now, you have a couple of options on how to proceed:
1) If you are comfortable programming in C++ you can modify the bootstrapper directly to perform the above sequence.
2) If you are not adept at C++ programming, you can get by with minimal modifications to the bootstrapper. Simply change it to run a custom exe file instead of the setup msi at the end of the bootstrapper sequence. Since the NET framework will be installed by the bootstrapper, you can create a custom exe as a NET application that checks the registry, launches the uninstall, and finally runs your new setup.
To get started, you need to download the bootstrapper sample project and figure out how to proceed from there. Information about the bootstrapping process, as well as the setup.exe source code can be obtained from:
http://www.msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/dotnetframedepguid.asp[^]
Robert
|
|
|
|
|
:(Sorry im reali new at this....i doing a project on .Net compact framwork.
can someone tell me how can i combine two image so tat i get a onmouseup and down?
im using C#....
Help
|
|
|
|
|
I have written an application in c# and need to be able to print sticky address labels, the 21 to a page variety. Is there a correct way to do this, or is it best just to write the code to calculate the layout of the text. If this is the case is there info on the layout of these labels i can use, ie margins and label sizes to use when drawing the text
|
|
|
|
|
When using User Controls in a .NET Windows Forms app, the designer sometimes "activates" controls within a User Control when in design-mode, but only when the User Control have been placed within a container control (like a Panel or Groupbox).
Look at this zipped AVI movie which demonstrates the problem :
http://www.bean.dk/uctest/UCTest.avi.zip
The full source code for the example can be found here :
http://www.bean.dk/uctest/UCTest.source.zip
This would normally only be a minor thing since the bug only occurs at design-time, but I'm using .NET's designer in my own app. so the users can design forms themselves.
Is there a workaround to avoid controls within a User Control to be "activated" when the user clicks on them design-time ?
Thanks in advance,
/Bean
|
|
|
|
|
|
|
*triple bump*
I can't be the only one with this problem ?
|
|
|
|
|
Hi,
I have heard that MSAA can be used to capture the menu operation . There are several events related to Menu Operation . I want to know which event is fired when the user press save on notepad. For menu selection and popup of menu there are events EVENT_SYSTEM_MENU_START and EVENT_SYSTEM_MENUPOPUPSTART called. But what about the actual click.
Regards,
Sunil Virmani
|
|
|
|
|
hi list,
i'm new to .NET programming ( coming from Delphi ).
I'd like how can i test programs written fro Framework 1.1 with Framework 2.0 ( as it seemms i can't use VS2003 ).
Thanks and rgds.
Paolo
Paolo Fenelli
|
|
|
|
|