|
As long as you have the correct access rights opening a file on a remote computer is the same as opening one localy. Precisely how you open it will vary based on the task at hand.
It is correct that you will have to use the UNC path. Best practice is to place the file in a share that has appropriate rights set on it.
eg.
File.Open("\\RemoteComputerName\ShareName\FileName")
|
|
|
|
|
thanks.....
i have implemented it and was successful but it requires an username and password for it.
how could this username and password be programmatically given and access the contents?
could you explain me?
hope you would help me.....
|
|
|
|
|
Hello eveyone
How can i get a value of a textbox from Form2 ??
I got it to work when the form2 is open but it dont work when form2 is close ??
Thanks for everyones help
Bob
|
|
|
|
|
Once Form2 is closed it is only available until it goes out of scope, eg. until the end of the calling method if you used ShowDialog to display it.
In order to retain the value, add a property to Form1 and populate it with the TextBox Text from Form2 before it goes out of scope.
|
|
|
|
|
you can use the formclosing event for form2
Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Form1.RichTextBox1.Text = Me.Textbox1.text
End Sub
|
|
|
|
|
Hi all,
We know that Windows "Open With" dialog box shows a complete list of installed applications that can open a file of some format. I want the same list of applications.
I could not find anyway by which I could use and customize the "Open With" dialog box of Windows. But please note that I don't want the list of every executable that is shown by "Add/Remove Program".
Is there a way to get the list of applications that can open file of some format (as shown by "Open With" dialog box of windows.)?
I can code in both C++ and C# but preferably C#.
Thanks and Regards
Aseem
|
|
|
|
|
The 'Open With' list is populated from entries in the registry.
Details of which registry keys you need to read can be found here[^].
For all you ever wanted to know about accessing the registry from .Net look here[^].
|
|
|
|
|
i want to add two text box value and result will come automatically third text box....That means put two integer value in first two text box and automatically result come into third box.
thanks in advanced...
|
|
|
|
|
you did not ask a question someone could answer, so I'll ask some:
what is keeping you from implementing a little code snippet that does what you described?
and have you already decided which programming language and framework/environment you're going to use?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
Luc Pattyn wrote: have you already decided which programming language and framework/environment you're going to use?
Yes, Code Project I know the language. I've read a book. - _Madmatt
|
|
|
|
|
A good suggestion.
Not sure someone will actually come up with some decent code though...
It wasn't even marked urgent, no ASAP, no plzzzz
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
I have to use .net framework..
|
|
|
|
|
There is a property of the textbox known as textbox1_text_changed event. You can use that event to monitor both the input text boxes. And in the subroutine, you can give the addition of the values in both the text box.
It would be something like:
try{
textbox3.text = (Convert.ToInt32(textbox1.text)) + ((Convert.ToInt32(textbox2.text));
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
I hope you got what I am trying to convey..
|
|
|
|
|
Hello Everyone
CAN SOMEONE HELP ME PLEASE!!!!!!!!!!!!!!!!
I have 5 timers in my program
and i want to display the time of day in a text box
this is what i have in my load form section
Timer_Time.enable = True
Timer_Time.interval = 1
Textbox1.text = timeofday
The problem is it uses the first timer in my program that time get enable and disable as it is needed
CAN SOMEONE HELP ME PLEASE!!!!!!!!!!!!!!!!
Thanks
Bobmodified on Thursday, February 18, 2010 5:55 PM
|
|
|
|
|
No. Your problem is that you can't ask a question. Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
Your problem description makes no sense at all.
WHY are you using 5 timer controls?? All you need is one for the requirements you put in your post.
|
|
|
|
|
I have 4 other timers doing other things
can i tell the textbox.text = timeofday to use a specific timer ??
Thanks
Bob
|
|
|
|
|
textboxes don't use timers, all they use is some real estate on some form.
you can tell what code should get executed when a particular timer event fires, so tell the one you choose to update the GUI and show current time. You'd better use a System.Windows.Forms.Timer for that, as that one ticks on the GUI thread!
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
modified on Thursday, February 18, 2010 6:40 PM
|
|
|
|
|
Hello Luc
this is what i tryed
and it did not work
can you help me please
Thanks
Bob
Public Class Form1
Private Shared The_Time_Is As New System.Windows.Forms.Timer()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
The_Time_Is.Enabled = True
The_Time_Is.Interval = 1
TextBox1.Text = TimeOfDay
End Sub
|
|
|
|
|
Hi Bob,
several remarks:
1.
try to be informative and accurate, both for yourself (while debugging) as for asking on a forum.
"it did not work" is useless. Did it compile? did it run? did it throw an exception? was the outcome wrong? did nothing happen at all?
2.
in Windows most timing information is expressed as a number of milliseconds.
which does not mean you get millisecond accuracy all the time (you might read my timers article on that!)
3.
timers need to be started explicitly. A timer that isn't started does nothing at all, so a breakpoint at it's Tick handler would never be hit.
4.
You did not show the Tick handler, where the things are or are not going to happen. It does exist, does it?
5.
please use proper identifiers, that are easy to read and self-explaining if possible.
I would choose "clockTimer" or "timeOfDayTimer" instead of "The_Time_Is".
And I would not keep the automatic names Visual Studio provides, so change "Form1" in something more functional in your app.
Overall, I would suggest you grab your VB.NET book and read it (once more) to brush up on the fundamentals and strengthen some good habits...
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
Thanks for your help Luc
Somtime is hard for one to read when thay have dificualty reading and adhd
Overall i think i am doing pretty good
I do apreciater your help Luc
Thanks
Bob
|
|
|
|
|
Bob Beaubien wrote: Overall i think i am doing pretty good
Maybe, but you certainly did not convince me.
If you have 5 timers already, you should know intervals are in milliseconds, and timers need to be started. You should not add a second timer as long as the first one doesn't work...
I strongly suggest you make it a habit to get things working before you add new stuff!
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
all my timers start and stop at difrents times at difrent intervals that is why i have 5
Thay all work but the last one i want to display the time
Thanks
Bob
Go CANADA Go
|
|
|
|
|
I got it figerd out Luc
sorry for bugging you
but i do apreciate your help
Thanks
Bob
Go CANADA Go
|
|
|
|
|
No problem.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|