|
hiii i've created a form with a button...and i want that, on a button click a message will come to display the time left for shutdown the system.till the time gets over it'll decrease the value of time that is showing.
and when the time gets over message will go off and the system will shutdown automaticalyy....
i've coded already and when i'm clicking on the button a message box will come to show the information that "Do you want to stop debugging?",after that system gets shutdown..but i don't want that........
plz help me out for this problem.
thanks n regards:
manish kumar
|
|
|
|
|
rocky.manish wrote: a message box will come to show the information that "Do you want to stop debugging?",after that system gets shutdown..but i don't want that........
Uhh... That message is comming from Visual Studio! Your application is shutting down the system, causing Visual Studio to give you this prompt because it's being told to close!
You didn't really trry to run your app outside of the debugger yet, have you?? You won't get that message if you try it.
|
|
|
|
|
Go to where you saved your project, then go to bin\debug folder and launch your application as you would normally, this will work. Visual Studio shows you this message because you are "Debugging" at the time your program tries to shut down your computer. So, stop debugging for a sec, and check out the exe file that Visual Studio has created for you. It shoult be somehwere like: \....\Visual Studio\Projects\YOUR-PROJECTNAME\bin\debug\YOURPROJECT.exe
hope this helps
|
|
|
|
|
how to set connection string after deploying the project
|
|
|
|
|
Store it in something like the app.config file?? Then you can modify it to what the user needs and load it when you need to using the Configuration and ConfigurationManager classes.
|
|
|
|
|
thank U dave for ur concerned replys
(how to set connection string after deploying the project)
can u plz specify some example for it
actually i need to edit(connection string) after the application in is installed into the system
i think xml is used to edit
plz help me dave...................
|
|
|
|
|
Have a look at this article and the connection settings part - View Database Structure Using C#[^]
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
It's really just simple string manipulation. You have an options form in the setup where the user can enter the name of the server and instance and possibly the database name, then you use that information to build a new connection string, possibly test it, then save it to the app.config file using normal XML methods.
|
|
|
|
|
hello
i had developed windows application in vb.net and sqlserver.
used sqlserver provider
created an setup file
my doubt is,Is it compulsary to install sqlserver on the client machine to run the project and if yes how to get the database Name and sql server name
for connectionstring
Please Help me
|
|
|
|
|
No, you don't have to run SQL on the client machine, you can run it anywhere the client machine can get access to, like a centrally located SQL server for example.
But you developed an app that used SQL so you should be accounting for needing it when you deploy the application.
Your project should store the connection string in the apps xml config file so you can set it to what ever you want once the app is deployed, not hard coding the values in the app (sounds like what you did).
|
|
|
|
|
Hi friends,
I've a textbox and a button in my WinForm. Now, I want that, whatever the user enters in the textbox and clicks on the button, the entered text should be copied to a precreated text file "C:\test.txt". Note, that I am using Visual C# for this purpose. I searched google and MSDN, but my search ended up in futile. Please help me out with the appropriate code.
Hope to hear from you guys soon,
Rajdeep.NET
|
|
|
|
|
|
Well I can give you simple idea. I provide you source code you need to modify it. I am having some problem with my computer else I will do that proper code for you . just post you some my old exercise .
just put this function on the button click I mean where you want it will save . If you want to save automaticaly you just modify .
private void savingtext()
{
SaveFileDialog savetx = new SaveFileDialog();
savetx.DefaultExt = "rtf";
savetx.Filter = "Texto enrriquecido (*.rtf)|*.rtf";
savetx.FileName = "Log.rtf";
if (savetx.ShowDialog() == Windows.Forms.DialogResult.OK) {
textbox1.text.SaveFile(savetx.FileName);
}
}
Wisht it will help you
|
|
|
|
|
I'm sorry, but I just cannot believe how many people have asked the same question on so many different forums. There ARE MANY SOLUTIONS to your problem at hand that can be obtained from a Google search. And by many, I mean thousands of solutions.
Here is the code. I'm only doing this because I'm in a good mood today. Any other time, you'd be ^h%t out of luck.
Double-click on your button that you've added to the form and inside the event handler type:
File.AppendAllText(@"C:\Test.txt", textBox1.Text);
..That is ofcourse, assuming your TextBox control's design name is still textBox1.
Now, for this to work you need to include a 'using directive' in the top of your file like so:
using System.IO;
Hope this helps.
Jason.
|
|
|
|
|
When i use below code, it returns true and then i changed the condition to check m=1 then its returns false. I am little confused about booleans so please let me know the internal implementation about boolean.
Dim m As Boolean = 1
If m = -1 Then
MsgBox("true")
Else
MsgBox("false")
End If
I know that using "True" or "False" is best practise but for better understanding i need this
Thanks in advance
Regards
Azeem
|
|
|
|
|
A boolean can be either true or false. Best practice is not to use 1, -1,0 etc but use true and false as the actual values can be operating system dependant.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Once you set the Boolean = to 1 are you sure that it is staying at the value of 1 and not being altered to equal how VB internally stores a true or false value?
Why do you want to create a Boolean then assign it a number and compare it to a number?
|
|
|
|
|
Trying to locate a link that shows you why this happens, but what you are seeing is type conversion related. VB.NET stores false as a 0 and any other value as true, but that defaults to being stored as = -1.
So, when you assign the Boolean = 1 it gets converted internally to -1 because it is not a false value (0).
Try doing a few debug.prints and setting the Boolean to a few values and see what happens.
It looks to me like you do not have option strict turned on. If not, you should because it forces your code to be far more explicit and not allow type coercion (dynamic type conversion) like this.
|
|
|
|
|
0 = nothing = false, the rest is always true
A more proper boolean;
enum MyBool = {
true,
false,
EFileNotFound}
I are troll
|
|
|
|
|
Respected Experts,
I have doubt to get one solution.My task is ,is it possible to take some mobile while we put a data cable to system the folders are be visible in the computer.Shall is any way to create a component in windows form using c#.net ,that by clicking one button the folders may be the sms or images should be copied or drag and drop to that windows form from the mobile.Please suggest me related to this task.
Thanks and Regards
Ch.Gayatri
|
|
|
|
|
Ch.Gayatri Subudhi wrote: ,is it possible to take some mobile while we put a data cable to system the folders are be visible in the computer.Shall is any way to create a component in windows form using c#.net ,that by clicking one button the folders may be the sms or images should be copied or drag and drop to that windows form from the mobile.
Uhhh... I understand English is not your first language, but this doesn't make any sense at all. I have no idea what you're trying to describe.
|
|
|
|
|
I need to create a windows application that while i click a button in the windows form ,the mobile which is connect through datacable to system,the folder which one present in the mobiles like messeges and picture should be copied to the windows form.
Thanks and Regards
Ch.Gayatri
|
|
|
|
|
|
dear frenz,
i need to store the name of the parent node of the node selected in a treeview
i have used the following code:
parent = TreeView1.SelectedNode.Parent.Parent.Name.ToString()
but this gives the o/p as "TreeNode: 1203"
whereas i only want the o/p as "1203"
where 1203 is the parent node of the selected node.
treeview node level 0= 1203
treeview node level 2= selected node.
plz help asap.
|
|
|
|
|
You are getting but this gives the o/p as "TreeNode: 1203" because that is the name of the node.
try using parent = Treeview1.SelectedNode.Parent.Text;
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|