|
B Yac wrote:
Select Case PingResult
Case 0: WScript.Echo "SUCCESS - " & Target
MsgBox "Do you want to continue?", vbYesNo
End Select
The code should be:
.
.
.
For I = 0 To UBound(DriveArray)
Target = PCName & DriveArray(I)
PingResult = WshShell.Run ("cmd /c ping -n 1 " & Target , 6, True)
Select Case PingResult
Case 0: WScript.Echo "SUCCESS - " & Target
mbResult = MsgBox("Do you want to continue?", vbQuestion + vbYesNo)
If mbResult = vbNo Then
Exit For
End If
End Select
Next
RageInTheMachine9532
|
|
|
|
|
Greeetings,
I am attempting in VB.NET to somehow capture the network packet IIS gets before it checks for HTTP headers...
i.e. I wish to use IIS as my socket server(not create my own) and want the network packets it gets at port 80 regardless if it is an http or not.
How may I accomplish this in VB.NET ?
Thanks in advance.
incoming71
|
|
|
|
|
Check into ISAPI Filters. Warning: You'll have to P/Invoke a bunch of API calls to do this and the .NET FCL does not have anything to make this easy.
RageInTheMachine9532
|
|
|
|
|
hiiiii
i m developing an application in which i m picking pixel colors from an image and display these colors in a list box with the help of loop. can any body give me code.its urgent plz.
tc
regarfds
Tahir
|
|
|
|
|
You can use SetPixel and GetPixel its a win32 API
<br />
Public Declare Function SetPixel Lib "gdi32" Alias "SetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long<br />
<br />
Public Declare Function GetPixel Lib "gdi32" Alias "GetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long<br />
|
|
|
|
|
hiiiii
i m developing an application in which i have to create control "shape" dynamically in a loop against a button click event. can anybody give me code .its urgent plz
regards
Tahir
|
|
|
|
|
Hi there,
does anybody know if the .net framework has an utility to convert modules/classes from c# to vb.net and the other way?
i guess i read something like this somewhere, but i can't remember!
thank in advance!
Fuel2Run
|
|
|
|
|
No it doesn't. That's why there is this proliferation of translators on the 'Net.
See this Yahoo[^] search result.
RageInTheMachine9532
|
|
|
|
|
i'll take a look
thanks a lot!
cheers,
Fuel2Run
|
|
|
|
|
I want to run DOS commands thru a VB app?
I know that I can use Shell, but is there a better way?
/Jarek
|
|
|
|
|
VB6 or VB.NET???
VB6, use Shell...
VB.NET, use Shell or the Process class:
Dim startInfo As New ProcessStartInfo("IExplore.exe")
startInfo.WindowStyle = ProcessWindowStyle.Minimized
startInfo.Arguments = "www.northwindtraders.com"
Process.Start(startInfo)
RageInTheMachine9532
|
|
|
|
|
Its in VB6, I can't get it to work properly?
this is my test code, this code actualy openes upp 3 cmd's and show the dir in the last one?
I only want one cmd and be able to run different commands in it!
There is a second problem cmd only works in W2K, NT and XP but not in WIN95-98, there got to be a way to run commands?
<br />
Shell "cmd", 1 <br />
SendKeys "dir c:\ *.txt" + Chr(13), True<br />
|
|
|
|
|
Where to start...
OK. There are 2 command prompt shells in WinNT and above, CMD and COMMAND. 95/98 only has COMMAND.
Now, what you want to do by stuffing the keystrokes using SendKeys is problematic at best. This is because there is no facility to make sure that, when you start the command shell, that window retains the input focus. Another window can steal the focus or the user can click in a different window. On top of that, what if the user accidentally types something in the command window your launched?
I would HIGHLY recommend looking into the Win32 Console API's, especially if you want to keep reusing the same command windows. This way, you don't have to worry about Windows versioning problems either. The docs for the Console start here[^]. A word of warning though, the documentation is written for C++ and not VB.
RageInTheMachine9532
|
|
|
|
|
Thank you!
I am a C++ programmer I know the console API.
In STL C++ you can use system function but not in VB
It amazes me that there is no other way to run console commands in VB?
/Jarek
As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality.
Albert Einstein
|
|
|
|
|
VB6 didn't really have a console available to it. VB.NET has much better support. If all you want to do is launch other programs, use the Shell, but your Shell command can also include it's command line parameters. You don't have to stuff them in with SendKeys...
RageInTheMachine9532
|
|
|
|
|
hello
i just want to know
to convert a program from VB6 to VB.net
require what prerequisite??
or is it just mearly a similiar program (can use VB6 code in VB.Net)
can please tell me what is the main different between this 2
cause i have to change my program from VB6 to VB.Net
and i have no knowledge on what VB.Net look like
please tell me and if can plese inculde some sample
thank you
Gary
|
|
|
|
|
You could just open the project (the .vbp file) using the Visual Studio.NET. This will automatically invoke the VB Upgrade Wizard and translate the code for you. Of course, it won't translate everything, but it will tell you what you need to do.
RageInTheMachine9532
|
|
|
|
|
here are a few things to look at
from MS
http://tinyurl.com/2rnq7
http://tinyurl.com/nz9v
and here is an excellent series of 15 lectures:
http://www.lakeforest.edu/~hummel/webcasts.htm
the audio webcasts are accessed thru this part of
that site
"Audio broadcasts should be available from here"
|
|
|
|
|
Hi there...
I need to produce a "star Gate" type warp effect. It doesnt have to be very large say 256 X 256. Only has to last up to 10 seconds.
Any idea where I might start using NB.Net ?
Any suggestions would be great.
Many thanks.
Coops.
|
|
|
|
|
|
Im trying to code a crystal report which gets the information from a dataset, I have the C# code to bind the data but i need the vb code, or if anyone knows of a good example on the net that might help.
Thanks,
Colum
private void Page_Load(object sender, System.EventArgs e)
{
CrystalReport1 report=new CrystalReport1();
CrystalReportViewer1.Visible=true;
DataSet ds=new DataSet("Account");//give same name as on
//dataset1 table header
DataTable table=new DataTable("Account");//give same name as on
//dataset1 table header
table.Columns.Add("Fname",typeof(System.String));
table.Columns.Add("Lname",typeof(System.String));
table.Columns.Add("Salary",typeof(System.String));
DataRow row=table.NewRow();
row["Fname"]="Mathew";
row["Lname"]="Hayden";
row["Salary"]="5000$";
// add to table
table.Rows.Add(row);
ds.Tables.Add(table);
// set report's dataset
report.SetDataSource(ds);
// set report source
CrystalReportViewer1.ReportSource =report;
}
|
|
|
|
|
Well, I'd normally say just run it through one of the C#/VB.NET code translators on the 'Net, but you have an object in that code snippet that doesn't exist in the Page_Load function, 'table'.
See this Yahoo search[^] for a list of translators.
RageInTheMachine9532
|
|
|
|
|
Hi All,
Does anyone know of any way to decrypt/decompile an installer?
I built an installer with Installshield. By accident, I deleted all the source for the installer. Not sure if there's any tool that could reverse back the whole directory?
I can unzip the Data1.cab file, but I could only get to some of the files, and some are still encrypted. Plus I lost all the custom actions.
I still need to reuse the installer files and structure for future installer.
So I don't have to build everything again. I don't need source code, because I have that backed up, but I want all the dll, exe, custom actions, windows components (with the right version), also the structure of the ism file.
Any suggestions? Thanks in advance!!
Syn
|
|
|
|
|
If it was an MSI, you could just open the MSI file. Works perfectly using Wise For Windows Installer. If it was the older Setup.exe version of an installer, start recoding...
RageInTheMachine9532
|
|
|
|
|
i need to know how to open word and power point sdocuments directly in the browser?
u see i have some pdf, word and powerpoint documents.they are placed in some location on my hard drive.
i have the paths of all thesein my SQL database.
now these paths appear in a data grid like hyper links its something like this:
doc1.ppt (power point file)
doc2.pdf (adobe file)
doc3.doc. ( word file)
so as soon as i click on a hyperlink, the selected document should open up in the browser directly.
the pdf files open directly the word and power point docs do not open.
Please note that i am developing an ASP.net (with VB.net) application
now how do i do this?
|
|
|
|