|
The other error I get when trying to open the UI is...
The control System.Windows.Forms.TabControl has thrown an unhandled exception in the designer and has been disabled.
I tried to included the snag-it capture of the message box, but it doesn't look like that can be done on this site.
StackTrace:
at System.Windows.Forms.TabControl.UpdateTabSelection(Boolean updateFocus)
at System.Windows.Forms.TabControl.OnHandleCreated(EventArgs e)
at System.Windows.Forms.TabControl.WndProc(Message& m)
|
|
|
|
|
I got it to work one time so far.
This is where it's failing to find a file....
~VideoWindow()
{
}
No arguments and no code.
|
|
|
|
|
Perhaps it's not important, but can I ask why you have an empty destructor in your C# code?
|
|
|
|
|
Can anyone link me to a good article/resource explaining how to marshall different data types, specifically from C++ to C#. I'm trying to marshall some stuff going to/from a DLL.
|
|
|
|
|
There are several articles on this site detailing how to do this. Basically, for standard exported C functions, you can use P/Invoke. If you're interesting in interoping with C++ classes things other than standard C exported functions, you'll probably want to write a wrapper for the C++ classes in C++/CLI, which can them be called natively by C#. (Again, check the articles on this site for info on C++/CLI interop with C#)
|
|
|
|
|
there seems to be some code to operate the registrykey(add a key in "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"),but how can I use these codes or where can I use them in the deployment project. and in the deployment project,there is also registry management in the deployment,can I set the attributes to implement the executing of the application when turning on the computer.
joypain
|
|
|
|
|
I think you answered your own question there... The Deployment project's registry editor.
|
|
|
|
|
I add a new item in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\
CurrentVersion\Run,and then I add a key, and set the key value to the path of the application,can it work?
by the way how can I get the path of the application in the registry editor and write it to the keyvale?
joypain
|
|
|
|
|
Looking at the properties of the Application Folder in File System, the default location is probably something like this...
[ProgramFilesFolder][Manufacturer]\[ProductName]
which is equal to this...
[TARGETDIR]
I don't know of a way to get the EXE's name, but you should know what that is anyway. So add your reg string with a value like this...
[TARGETDIR]myExe.exe
|
|
|
|
|
"[TARGETDIR]" works!
I've been searching on the internet and msdn for a few days to solve the problem.Thank you for your guide!
joypain
|
|
|
|
|
Sure. I wish I could find a list of all the variables that are available, but those are the only 4 I'm aware of. That may be all of them.
|
|
|
|
|
I computer use XP ,I want to my program interface can cover the XP system deskface. how can I do ?
|
|
|
|
|
|
|
Hi All
I would like to use a DLL written in C, in my .Net 2.0 win application.
I’ve tried using DllImport, but I’ve encountered the following exception:
“Attempted to read or write protected memory. This is often an indication that other memory is corrupt.”
Probably because I didn’t declare the function right.
The DLL function I’m trying to use is:
extern "C" __declspec(dllexport) void EncryptString(char* inString, int strSize, char* ret)
What should be the .Net equivalent?
Thanks in advance
Yaron.A
|
|
|
|
|
stringbuilders are used to marshal strings that get changed by the unmanaged code..
try
<br />
[DllImport(@"YOUR.DLL")]<br />
public static extern void EncryptString(String inString , int strSize , System.Text.StringBuilder result);<br />
this is assuming the first parameter won't be changed.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
Works like a charm, i've spent hours to figure out this one.
THANKS Malcolm!
|
|
|
|
|
A pleasure.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
Hello...
I have a problem. For example :
public class MyClass
{
public int A = 1;
public int B = 2;
public int C = 3;
}
If I serialize that class, I want to serialize A and B only. I don't want to serialize C.
Are there any possibilities to do that ?
I'm using XmlSerializer.
Thanks...
|
|
|
|
|
Use the XmlIgnore attribute to prevent specific public properties from being serialized.
/ravi
|
|
|
|
|
Ravi's response will take care of your problem, but if you want further information I have an article on XmlSerializer attributes[^] that should help out.
|
|
|
|
|
hi
my project have 2 form and i call show() method to showing Form2
i want to pass a parameter (or property) to form2 when it showing or
find that form2 is close or show in form1
Does anyone know how i can do this action?
Thanks;
|
|
|
|
|
I think I understand your question, try using ShowDialog() instead of Show() . If I don't understand your question, reply with more details.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Declare private fields for the properties in Form2 and set them when you construct the form. For example:
Form2 f2 = new Form2 (prop1, prop2, etc.)
f2.Show(); /ravi
|
|
|
|
|
hi
my project have 2 forms ...in form 1 i have a button and button1_Click is
private void button1_Click(object sender, EventArgs e)
{
this.DesktopLocation = new Point(DesktopLocation.X - 200, DesktopLocation.Y);
new Form2(this.DesktopLocation.X + this.Width, this.DesktopLocation.Y).Show();
}
now form2 is Show() and i want to know IN FORM1 that form2 is close or still running ....
and when form2 is close event or property fire in form1 to Form1.DesktopLocation return to orginl location...
here is source code of my project[]
Does anyone know how i can do this action?
Thanks;
|
|
|
|