|
|
Hello
This may be trivial but I would like to automate a way of going to a particular web page and download that page to a local machine. Is there some sort of "save target as" feature to achieve this?
Thanks
HRW
|
|
|
|
|
|
I am writing a simple program in VB.net to use netsend to be able to send a message to all the users on the domain when I need to restart the server or other things like that. I have already turned windows messaging on on all of the computers, however, I can not figure out how to send the message on a button click in my program. It is a very simple windows form program with two text boxes called "CompOrDomainName" and "Message" and three buttons, "Send", "ClsButton", and "ClrAll". I have programed "ClsButton" and "ClrAll" to function the way I want, however I cannot figure out how to get "Send" to send through net send. Any help would be great. I have included the code so people can help me figure out what code I still need to be able to end.
Public Class NetSender
Private Sub SndButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SndButton.Click
End Sub
Private Sub ClsButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClsButton.Click
Message.Clear()
End Sub
Private Sub ClrAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClrAll.Click
Message.Clear()
CompOrDomainName.Clear()
End Sub
End Class
|
|
|
|
|
Looks like you have everything but the "send" part, so try something like this:
Private Sub SndButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SndButton.Click
NetSend.StartInfo.WorkingDirectory = "C:\WINDOWS\system32\"
NetSend.StartInfo.RedirectStandardInput = True
NetSend.StartInfo.RedirectStandardOutput = True
NetSend.StartInfo.FileName = "cmd.exe"
NetSend.StartInfo.UseShellExecute = False
NetSend.StartInfo.CreateNoWindow = False
NetSend.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
NetSend.Start()
NetSend.StandardInput.WriteLine("net send " & CompOrDomainName.Text & " " & Message.Text)
NetSend.StandardInput.Flush()
NetSend.StandardInput.Close()
NetSend.Close()
End Sub
What the code is doing is opening a command prompt and issuing the net send command to it. This article[^] may provide further insight.
|
|
|
|
|
That you for that, but unfortunately I am unsure how I would go about declaring "NetSend".
|
|
|
|
|
Oh, sorry! NetSend is of type System.Diagnostics.Process. So you'd have:
Dim NetSend As New System.Diagnostics.Process()
NetSend.StartInfo.WorkingDirectory = "C:\WINDOWS\system32\"
NetSend.StartInfo.RedirectStandardInput = True
NetSend.StartInfo.RedirectStandardOutput = True
NetSend.StartInfo.FileName = "cmd.exe"
NetSend.StartInfo.UseShellExecute = False
NetSend.StartInfo.CreateNoWindow = False
NetSend.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
NetSend.Start()
NetSend.StandardInput.WriteLine("net send " & CompOrDomainName.Text & " " & Message.Text)
NetSend.StandardInput.Flush()
NetSend.StandardInput.Close()
NetSend.Close()
|
|
|
|
|
Thank you, that worked perfectly.
|
|
|
|
|
I'm writing a program that is used to enter data about different rooms in a home. On the main form there is a NUD and a combo box. The NUD is used to store the room numbers and the combo box has a list of room names. When the program starts the the NUD has a value of 1 (representing the first room) and the CB is empty. The user selects a room name from the CB and the room name is stored in an arraylist.
Now, when the user increases the NUD value the CB is cleared. Now if the NUD value is decreased then the previous room (Room 1) name is loaded into the CB. My problem is this, if the user tries to increase the NUD value again and the CB box is still empty (user did not select a room name) then the NUD value is decreased (you can't move on to the next room until a room name is entered for the current room number). However when I decrease the value of the NUD, the NUD.ValueChanged method is called again. Is there a way to prevent the NUD.ValueChanged method from being called when I decrease it's value in the code? Here is some pseudocode of my problem:
Sub NUD.ValueChanged
If CB.Text = "" then
NUD.Value -=1 'This line makes the NUD.ValueChanged method call itself.
Else
CB.Text = ""
End If
|
|
|
|
|
There are 2 ways I can think of - a dirty way and a tidy way.
The tidy way would be to remove the event handler:
RemoveHandler Nud.ValueChanged, Addressof(YourRoutineHere)
Alter the value, then
AddHandler Nud.ValueChanged, Addressof(YourRoutineHere)
The Dirtyway would be to have a global boolean, called "NudManuallyChanging" or something like that. Then:
If CB.Text = "" then
NudManuallyChanging=True
NUD.Value -=1 'This line makes the NUD.ValueChanged method call itself.
NudManuallyChanging=False
Else
CB.Text = ""
End If
Then, in your event handler for NUD.ValueChanged:
Sub NudValueChanged
if NOT NudManuallyChanging then
Your Code Here
end if
end sub
Its a bit dirtier, but possibly easier to understand.
|
|
|
|
|
Okay, so if the answer for this question is out there somewhere (which I'm assuming it is), it's hiding between skads of tutorials on how to compile and use .dll's for normal use. I haven't quite figured out how to prune the responses I get, so I'll ask if anyone here has the answer I need while I continue to look.
The question is: is it possible to get output from a precompiled .dll during build time? I suppose output from an .exe would work as well, but I'm specifically wanting to call a .dll and include the output in the final executable itself, without actually including the .dll (this is for usage in a project in which the .dll does some encoding of data I want to be secured and hard-coded, so I'd prefer to leave the .dll out of the final project).
Any advice?
|
|
|
|
|
I know I can't give an answer, but the obfuscator I use allows for embedding three strings (labeled Application Name, User Name, and Serial Number but you could use them for anything) into the obfuscated program. You can then access those values from the program. If what you want to store is a relatively short string something like that might be an option.
|
|
|
|
|
That isn't quite what I was looking for. I ended up settling for writing a second application that writes the information I need to a text file, which I then embed into the main application. Not exactly the elegant solution I was looking for, but I guess if I can script it all together, it'll be ok.
|
|
|
|
|
Hi,
I have Crystal XI release 2 installed on my pc. I want to use a crystalreports in a windows application.VS2005 comes with crystal components and I want to use these for the application. Will there be a license issue and any prerequisite and will I need to reference different dll’s? The client doesn’t want to pay an arm and leg and a license will be a big No.
|
|
|
|
|
Here is my thoughts...
If you want to use a Crystal Report within VS2005, then, develop the report with VS2005 itself. That way, you should not have issues with multiple DLL's.
If the report is developed with VS2005, then there should be no licensing fees for the use of Crystal.
Tim
|
|
|
|
|
Crystal Reports lets you create a distribution package for installation on other machines. Your clients will require the full application only if they need to create / modify the report files themselves.
HTH
|
|
|
|
|
you can add module of Crystalreport_x86.msm file with your setup for crystal report license.
<big>Regard</big>
Anubhava Dimri
anubhava.prodata@gmail.com
9250168195
|
|
|
|
|
Hi guys i'm not sure if this is surpose to be the subject title. I'm sorry as this is not a programming
question. But i have to ask. Do i have to pay MICROSOFT for software developed using visual
studio 2008 ,and how do i sell them to end users(inspired by flash & 3d studio Max). How and why should
I license the software developed in visual studio is there anything else i have to do besides
licensing. I searched for these answers through the web till i got an unbearable headache(it hurts).
|
|
|
|
|
Nope, there is no royalty system in place at all to do this.
There are some licensing restrictions I believe if you are using the Express or Academic versions if I remember correctly with regards to producing commercial software using those products.
|
|
|
|
|
If you develop code in VS2008 and use no external components, then there should be on additional licensing required.
If you use external components, the licensing required will be determined by that component's vendors.
How you choose to license the application is up to you.
Tim
|
|
|
|
|
Sry man but i dun get it ,now ur confusing me. What do u mean by external components. Also i want to know how a there programs that are cross platform what IDE do they use to make them.
Do u know how to package a program to .exe
Thanks
|
|
|
|
|
it sounds like you have very little programming experience judging by the questions you are asking. why not buy a programming book or get one from you library and have a read. or try wikipedia. i'd recommend learning java if youre wanting something that will run on a variety of operating systems. or if youre just wanting to write programs that run on microsoft windows why not download some of the visual studio express editions and learn from there.
|
|
|
|
|
hi all,
i use following statement for increase the date value
CurrentDate = CurrentDate.Date.AddDays(NumberOfDay)
above statement add the value of NumberOfDay variable to CurrentDate but also it time component is set to 12:00:00 AM"
for example, if before execution of above statement the value of CurrentDate is following
#3/31/2007 5:35:13 PM#
then after execution of statement the value of Current date is following
#3/30/2007 12:00:00 AM #
so how can i get the value #3/30/2007 5:35:13 PM# in place of #3/30/2007 12:00:00 AM #
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
You need to change:
CurrentDate.Date.AddDays(NumberOfDays)
to:
CurrentDate.AddDays(NumberOfDays)
Hope this helps.
|
|
|
|
|
Thanks a lot ,its work
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|