|
Hi,
Form.StartPosition = FormStartPosition.CenterParent;
Robert
|
|
|
|
|
Wooowwww.... Thanx soo much
in the same way how will i do with messageBox ??? is there any way ???
thanx
Akhil
|
|
|
|
|
The first parameter of one of the Show method overloads on MessageBox is the owner window (IWin32Window to be exact - so control or form). The messageBox shows up centered over its parent, if passed.
|
|
|
|
|
i have created a custom scroll bar, and implemented the mousedown, mouseup etc. events. But -for instance- when i click and hold the down arrow the scrollbar value changes only once.
any ideas how to make the scrollbar scroll continuously when i click and hold up/down arrow ?
best regards...
.:: Something is Wrong ::.
|
|
|
|
|
You could try using a Timer. Start it when the mouse button is pressed and with every tick of the timer (perhaps after a delay) you change the scroll value a little. Stop the timer when the mouse button is released.
|
|
|
|
|
How can I use try and catch to catch errors on my application and write them in a lof file. eg logfile.txt
Boboza
|
|
|
|
|
try
{
throw new Exception("Error here");
}
catch(Exception ex)
{
StreamWriter streamWriter = new StreamWriter("logfile.txt", true);
streamWriter.WriteLine(ex.Message);
streamWriter.Close();
}
|
|
|
|
|
What I do is catch the error and write it to a custom eventlog.
I created a class that takes a string value(error.ToString()) and the type(error, warning, info).
Then in my catch I call the class with the parameters to write the eventlogentry and then just display a pretty message to the user.
You can do the same principle, except for a class that writes the an custom eventlog create a class that writes to a txt file.
He who laughs last is a bit on the slow side
|
|
|
|
|
Have a look at log4net[^]. It should cover (almost) anything you need regarding any kind of logging.
|
|
|
|
|
I am using a folder broswer dialog to let the user select a folder. The control is great, hoever i would only like the user to select a folder from the "C" drive - how do i do this? By default, all the folders are listed in it.
|
|
|
|
|
Hi All,
Can anyone please tell me if there's a way to use a .net application that
makes use of office 2003 interop assemblies on a server machine that does not
have office 2003 installed. The applcation creates .ppt files and there's no need
to actually view them on the server, so we don't need office 2003. On the other hand
the com components that the interop assemblies interface to are missing on the server.
Is there a manual way to copy the office com components and register them on the server?
Thanks very much
|
|
|
|
|
Even if it could be possible to find out which dlls are required to instantiate and operate the objects you want to use, I doubt that the office EULA will cover that.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
hi all,
how will i know if a datagridview cell is left empty or not?
string.isnullorempty(dataGridView6.Rows[0].Cells[1].Value.ToString());
returns en error. [object reference not set to...]
any other method to check if empty or not ?
help please,
thanks in advance,
bye.
|
|
|
|
|
string s = dataGridView6[1,0].Value.ToString();
if (s != "")
{
.....
}
best regards
|
|
|
|
|
Hi,
I have a question about deployment project in C#. When we compile our project in c#. It generates two files one is perhaps setup and other is some thing called bootstrapper file. Now i want to know which of these two files is to be given to the user. I want the installer to install .Net and SQL Express if it is not installed on his machine already.
Thanks in advance...
Wasif Ehsan.
|
|
|
|
|
hi all,
i have a few things to ask about setup projects...
first, how can i add an uninstall option to User's Start Program.
second, how can i reinstall my setup even if a previous version was installed before ?
thanks in advance,
bye.
|
|
|
|
|
Firts one I'm not sure.
Second one, on the properties of your installer theres an option removePreviousVersions. Just set that to true
He who laughs last is a bit on the slow side
|
|
|
|
|
i want to write an application in c# that check either MSDE is installed on current machine to not if not then install MSDE on machine and copy SQL Server database (mdf and ldf) files to specific location so that my abouther c# application may use database could anybody help me out this please
|
|
|
|
|
I have the exact same problem. You can't use the installer within visual studio as it does not allow for multiple installation simultaniously.
So I started looking at external installers. Nice one to try is nullsoft installer, its freeware, you can be even include stuff like the runtime enviroment. You will just need to learn a bit about scripting so that you can manipulate the installer scripts as to what install when. They have alot of documentation and examples, so run through them, might even be able to mod one of the examples.
He who laughs last is a bit on the slow side
|
|
|
|
|
I made an c# application that uses SQL Server 2000 now i want to make a setup that not only installs my application but also MSDE to the clients machine so that my application can use database from MSDE how i would bmake that setup please help me out
|
|
|
|
|
Add the merge module of MSDE with your application. The merge module for module for MSDE is available with SQL Server in one of its subdirectory but exactly which one, i am not sure. But i think its extension is .msm . You can add that merge module to you application. So when your application installs, it will also be installed along with it.
Regards,
Wasif Ehsan.
|
|
|
|
|
Hi. I need help. When you assign the CustomActionData you do the following.
/textValueA=[EDITA1] /textValueB=[EDITA2]
The problem being that when the user enteres a two word value in EDITA1 it soesn't take the whole string as the value, it takes the first word as the value and uses the space between the firts and second word as the delim.
Is there some way that I can change the delim between
/textValueA=[EDITA1]?/textValueB=[EDITA2]
Thanks in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
I answered my own question.
/textValueA="[EDITA1]" /textValueB="[EDITA2]"
He who laughs last is a bit on the slow side
|
|
|
|
|
Glad you found out how to encapsulate these arguments.
You have to be careful, though, if you want to give a path as an argument.
Something like
/instPath="[TARGETDIR]" will give you a very strange error message (I think I remember something about the last " being escaped by the last backslash in the path or something similar).
You have to use
/instPath="[TARGETDIR]\" instead.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Thanks, will keep in mind, currently it's only getting the client details, Company name etc..
I know if you use the installer helper class, you can reference the installation path with
path = Context.Parameters["assemblypath"]
Problem is that it returns the whole installation path including the executable. eg
C:\Program Files\Test\Test1.exe
what I want is just the
C:\Program Files\Test\
Any Ideas???
Thanx
He who laughs last is a bit on the slow side
|
|
|
|