|
rberman wrote: But it still looks like something rather seriously wrong with the compiler.
Nope. I've used CreateFile/WriteFile, P/Invoked in .NET 1.0, 1.1 and 2.0, both Release and Debug configurations, with no problems whatsoever. Well, other than my own boneheaded mistakes.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi, I need help to do a source code using visual studio2005.net to do a barchart which has the x-axis for id of people and the co,mmunication error rate. Thanks!
Eric
-- modified at 5:29 Saturday 17th June, 2006
|
|
|
|
|
Help!
I migrated a program from Vb6.0 to VB.NET and I have this line of code:
iRetVal = CopyFileEx(lszNetFile, lszSys32File, AddressOf CopyProgressRoutine, 0, bCancel, COPY_FILE_RESTARTABLE)
which unfortunately generates the following error:
'AddressOf' expression cannot be converted to 'Integer' because 'Integer' is not a delegate type.
What must I do? HELP!!!
Thanks,
MAY
|
|
|
|
|
You've got the Declare for the CopyFileEx function wrong. It should be:
Declare Auto Function CopyFileEx Lib "kernel32" ( _
ByVal lpExistingFilename As String, _
ByVal lpNewFilename As String, _
ByVal lpCopyProgressRoutine As CopyProgressRoutineDelegate, _
ByVal lpData As IntPtr, _
ByRef pCancel As Boolean, _
ByVal dwCopyFlags As CopyFlags)
You can find the definitions for the CopyProgressRoutineDelegate and CopyFile enum at www.pinvoke.net[^]
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
when a tab page is closed by exit button then how to focus the control on the same tab
|
|
|
|
|
You can't close a tab page, so your question doesn't make any sense.
Besides, if you "closed" it, how on earth are you going to give the focus to a control on it?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Am writting an app where i need to have the ability to enable/disable the internet. This is different from disabling the network card or conectivity on a pc.
I thought of using sockets but am not sure if this works fine and i havent managed to do that.
|
|
|
|
|
You can't turn off the Internet portion of the machine. It looks like any other normal traffic comming out of the network card. You'd have to run the traffic through a firewall and control access to resources off the local LAN through that firewall.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I disagree, cos i know of an internet app that stops IE from running when times runs out. I saw an article about sockets, is it possible to stop trafic that comes out/in from the net or network? In this way i think the IE can be disabled!
|
|
|
|
|
You don't have to do anything with sockets to get IE to stop working. All you have to do is point IE to a proxy server that doesn't exist. Poof! It can't do anything anymore!
The problem with installing something on a machine is that, in most cases, you can only control it if you visit each machine. This becomes an administrative nightmare!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Is there a reason
Dim mypath
mypath = "V:\"
myname = Dir(MyPath, vbDirectory)
will not work, but
Dim mypath
mypath = "C:\"
myname = Dir(MyPath, vbDirectory)
THe only difference beig one is a network drive, the other is not?
|
|
|
|
|
No-e wrote: Dim mypath
mypath = "V:\"
myname = Dir(MyPath, vbDirectory)
will not work, but
Dim mypath
mypath = "C:\"
myname = Dir(MyPath, vbDirectory)
Try
Dim mypath<br />
mypath = "\\RemoteHostName\ShareName" <br />
myname = Dir(MyPath, vbDirectory)
Tell me whether it is working or not.
|
|
|
|
|
This does not work either. I do not get an error, I just do not get anything for either case (using path or drive letter) Any other ideas?
|
|
|
|
|
Try this code:
Dim mypath<br />
mypath = "\\[IPAddressOfRemoteHost]\ShareName" <br />
myname = Dir(MyPath, vbDirectory)
Example:
Dim mypath<br />
mypath = "\\192.168.1.1\Report" <br />
myname = Dir(MyPath, vbDirectory)
|
|
|
|
|
Thanks, but that is actually the way I tested it.
mypath = "\\10.22.222.150\datadrive\logs" ' Set the path.
myname = Dir(mypath, vbDirectory) ' Retrieve the first entry.
Odd thing is that I do not get any error at all, just no answer.... I have tried several different computers, can not get anything across the network....
|
|
|
|
|
|
Well without knowing the error you are receiving I'm guessing but perhaps the V: drive does not exist or you do not have sufficient authority to access that network resource?
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Steve Pullan wrote: Well without knowing the error you are receiving I'm guessing but perhaps the V: drive does not exist or you do not have sufficient authority to access that network resource?
In my opinion, his computer is try to check for the remote host availability which usually know as name resolution. If this happend, i think he might waiting during the name resolution process in the stage of broadcast the signal for the remote host and waiting for an answer.
If he do not have permission to access the resource, the message box should indicate him that access is denied.
|
|
|
|
|
Data Combo is one of Microsoft Data List Controls 6.0 (SP3)(OLEDB)
Control File: MSDATLST.OCX
In MSDN, it defined as ADO Data Bound control.
How to define Data Source, Row source, Data Field and List Field properties?
Can I define ADODB.Connection as Data Source and ADODB.Recordset as Row Source, then what about other two properties?
Can Any Kind one help me in this regard with brief source code demonstration?
Thnaks in Advance.
Shoaib Nawaz
-- modified at 14:38 Friday 16th June, 2006
|
|
|
|
|
Can anyone tell me what is this error about.
|
|
|
|
|
It's exactly what the error message says; you can't cast from a string to a double.
If you have a string that contains the textual representation of a double, you need to parse the string to convert it to a double:
string s = "3.1415926536";
double d = double.Parse(s, CultureInfo.InvariantCulture);
---
b { font-weight: normal; }
|
|
|
|
|
I am fairly (quite) new to .NET programming, trying to do a radio button as a group (only one radio can be selected), documentation indicates I need to add it to a groupBox. In order to have a groupBox, I need the "system.windows.forms" namespace. I try to import it using the following:
<%@ Import Namespace="System.Windows.Forms" %>
Still groupBox is undefined... what am I missing?
Thanks in advance...
|
|
|
|
|
In VB.Net, should the syntax be:
Imports System.Windows.Forms
- It's easier to make than to correct a mistake.
|
|
|
|
|
I tried that,when I do I get the following error...
Namespace or type 'Forms' for the Imports 'System.Windows.Forms' cannot be found.
Thanks for your help
|
|
|
|
|
You cannot add a Windows Forms GroupBox to an ASP.NET form. It simply will not work.
It looks like you read the documentation for the wrong RadioButton. I think you're looking for this[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|