|
i want a exe file in my cd that when my software isn't installed run setup from cd otherwise run cd software from client computer
i know i must do it with Registry
is there any sample code ?
Thanks
MHF
|
|
|
|
|
I imagine you just want to put the installed path to the exe in the registry, and if it's there, run it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
yes but how can do it ?
(it is better not be .Net code )
MHF
|
|
|
|
|
MHASSANF wrote: yes but how can do it ?
Most installation software lets you create registry keys. You've not told us what you're using for an installer. Then your program can read the registry, how to do that is well documented.
MHASSANF wrote: (it is better not be .Net code )
Well, that takes the cake. Why on earth are you asking in the C# forum then ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: Why on earth are you asking in the C# forum then ?
Looks like he also heard that you live here.;)
Regards
|
|
|
|
|
Hi
i put a bitmap on to the control but this bitmap is with alpha layer
and aplha color is black.How can i make the alpha color transparent
|
|
|
|
|
How is there an alpha layer ? The typical way is the create an image attributues class, specify a transparency range and use it in the call to DrawImage.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
In VB we are using Timer.Is there anything like that in C#.Net ?
Thanks,
Mirunalini
|
|
|
|
|
Yes, there is. You have System.Windows.Forms.Timer control that uses the timer in windows UI, and there are System.Threading.Timer and System.Timers.Timer which are a multi-threaded timers.
---
b { font-weight: normal; }
|
|
|
|
|
Can u just explain me with an example.
It will be so helpful to me..
Thanks,
Mirunalini
|
|
|
|
|
An example of what? What are you going to use the timer for?
---
b { font-weight: normal; }
|
|
|
|
|
Sorry, I don't know whether am I right or not.But the thing is, I wants to display the value(time)continuously in a textbox as every secondchanges.is it possible?
Thanks,
Mirunalini
|
|
|
|
|
you can also use DateTime class for the same thing....
see the sample code... this may do...
Thread time = new Thread( new ThreadStart(Systime));
time.Start();
private void Systime()
{
while(true)
{
DateTime t = DateTime.Now;
this.textBox1.Text = t.ToString();
}
}
Thanks and Regards
Dillu
|
|
|
|
|
I'm not sure you want to do that!
That is going to be one very busy thread, continually updating the time when it doesn't need to. At the very least you could add a Thread.Sleep(1000) in there to rest the thread for a second between updates, although why you'd do this rather than use a timer escapes me.
Not to mention that you should *never* update the GUI from anything apart from the thread which created it (and in VS2005 it will explicitly block you from doing so). You'd need a call to BeginInvoke to make this solution acceptable.
Regards,
Rob Philpott.
|
|
|
|
|
I developed Multi threaded application ([MTATrhead]). And am using OpenFileDialog, when clicked on My Computer (from left wokspace) it is not showing the Drives available. I found its a bug in COM Interoperability (Pls see link http://discuss.develop.com/archives/wa.exe?A2=ind0509d&L=advanced-dotnet&T=0&F=&S=&P=6681)
Is there any Work Around?
Thanks
Santosh
|
|
|
|
|
Is there any specific reason you specified the [MTAThread] attribute? Multithreaded applications can be STA, unless COM clients are involved. Otherwise, the only option I can think of is launching another thread (STA) and showing the file dialog from that thread.
|
|
|
|
|
Thanks senthil you posting was helpful
|
|
|
|
|
Hi
Guys can any one let me know , how to make the collection classes serializable, thankx in advance.
|
|
|
|
|
Hello
Well, last time I check they already were serializable. The implement the SerializableAttribute , don't they?
Regards
|
|
|
|
|
in an editor some lines are
1 p q r s
2 x y z v
when the user will enter some line(2 a b c d) in between 1 and 2
2 x y z v will appear like 3 x y z v.
it will appear like
1 p q r s
2 a b c d
3 x y z v
give some idea how to do it
|
|
|
|
|
I guess the first step is to think about what it is you want to do, then the next step is to think about the materials you were given in class, and how they point you in the right direction. Then, you should do your own homework. Post here if you get stuck ( i.e. if you have code to post and wonder why it's not exactly working ).
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi everyone,
i'm getting this error: "There was an error generating the XML document" when i try to serialize a class. it works for other classes except for classes like these :
public class studentList()
{
public student[] students //has only one member and it is an array of another class
}
i didn't get much info from stackTrace which says:
at System.Xml.Serialization.XmlSerializationWriter.WriteTypedPrimitive(String name, String ns, Object o, Boolean xsiType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write3_Object(String n, String ns, Object o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write228_studentRegistration(String n, String ns, studentRegistration o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write5_studentBody(String n, String ns, studentBody o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write1_studentMessage(String n, String ns, studentMessage o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriter1.Write242_studentMessage(Object o)
my question is, is it the class? this is a project at work. i was given these schema files and just generated classes from those schemas to use for the project. i already did searching online and i found one that it says it is a problem on the class. let me know please. i will really appreciate your reply. thanks
|
|
|
|
|
Did you look at the InnerException property of the exception thrown? Does it give you any useful clues? Typically, this problem comes when one of the member types are not declared [Serializable] .
|
|
|
|
|
i tried to connect to my sql server on my computer using my ip address instead of my server name but i keep on getting an error saying that sql server does not exist or access denied
this is the connection string i used: myConnection = new SqlConnection("Data Source=10.0.0.1,1433;Network Library=DBMSSOCN;Initial Catalog=CallAccounting;User ID=sa;Password=;");
is this correct? or is it because i am not really on a network???
or do i have to configure my sql server differently
kenny
|
|
|
|
|
Since you're trying to connect to the SQL server on your machine, try specifying 127.0.0.1 or "(local)" as the Data Source in your connection string.
|
|
|
|