|
Hi All,
Can anyone tell me why I'm getting a "type mismatch" in the following code:
Thanks in advance...'
******************************
Dim strgate
set IPConfigSet = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
("select IPAddress, DefaultIPGateway from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
for each IPConfig in IPConfigSet
strgate = IPConfig.DefaultIPGateway(0)
next
WScript.Echo strgate(0)
|
|
|
|
|
I want to load image in Menu and ButtonMenu .Can you help me? Thanks
|
|
|
|
|
Hi All...
I need to catch the message that is sent to the printer when a user presses print on any app. What API's should i use.
What i want to do is catch a print request to a printer log the user name and password and then print a report sometime in the future...
Anyone have any ideas...
Shot in advance...
budgie
-+= TTFN =+-
|
|
|
|
|
You can do this, but I do not think that you will be able to do it in VB. And if you can do it, it will be a lot of work.
You will need to use C++ or some other language that allows you to access pointers. If you are still interested let me know.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Just written a family tree prog in VB, never done this before, can anybody tell me or point me in the direction of a link/site regarding how to print out the data that will be incorporated in my program! THANK YOU!!!!
|
|
|
|
|
Probably the best place to look is on the MSDN CDs that came with VB. There are lots of Books and Techinical Articles on there, and there will surely be something about printing.
Basically, you need to "draw" what you want onto the Printer object.
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
I need some English information about this ,please tell me the particular web sites,thank you!!
huang chun shen
|
|
|
|
|
Why not write a simple program to analyse your Word document,store the information of each columns into variables,create a loop,and then let your program execute INSERT sql statments automaticly.
God blessing me...
|
|
|
|
|
Hello,
Is there any way to get to know who all are currently logged on to the system?
Regards,
~A
|
|
|
|
|
Try the GetUserName API call:
Public Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (lpBuffer As Byte, nSize As Long) As Long
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Sorry,
This will give the currently logged user.
Suppose I am the admin, then I wanted the list of all the users that are logged on to my the domain.
I didnt want "who am i" equival but a "who" equival of unix.
Thanx and Regards,
~A.
|
|
|
|
|
|
|
I am trying to print an MS-Chart control off of a form.
I cannot find any help to print a standard control such as this.
I don't need to print any text or anything, just the MS-Chart
Control.
Can anyone help me with this?
thanks,
Josh Schneider
js27195@yahoo.com
|
|
|
|
|
Oops! I just noticed the subject said "VB.NET"... this may not work, but anyway:
Have a look at the EditCopy method of the chart control.
Something like this:
MsChart1.EditCopy
Printer.PaintPicture ClipBoard.GetData(vbCFMetafile), 0, 0
Untested pseudocode by the way
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Hi,
I am currently trying to read xml over a socket using a TcpClient. Unfortunately my client hangs, when I try to read from the stream:
Dim client as TcpClient
Dim reader as XmlTextReader
Dim addr as IPAddress = IPAddress.Parse("127.0.0.1")
client = New TcpClient
client.Connect(addr, 5000)
reader = New XmlTextReader( client.GetStream() )
while (reader.Read()) ' <=== here my code stops
[...]
The last line, is where my code stops when I send a document. After sending it a second time, the code runs again and of course receives the document twice. The same appears when I close the socket which I don't want to do.
Any ideas?
Kind Regards,
Michael
|
|
|
|
|
I would like to monitor TCP/UDP packets coming and I would like to match the packets with the application it uses. How would I go about doing so.. For example when I go to yahoo.com.. I get the packet from yahoo.com and then it gets the application (Internet Explorer) from that...
|
|
|
|
|
how do you dynamically make arrays of ATL Simple Objects (that are not controls) "WithEvents" too?
It wont let you write:
Dim WithEvents MyObject() As MYFUNKYLib.Object
so what do you do? we NEED events from my object I made in VC++ and we NEED it to be a Simple Object and not a control (it has to do with getting Multithreading in VB and there isnt any other way to do it from what everyone has said)
Please HelP!!!!!!!
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
You have to Create the object like this:
Dim WithEvents Scriptlet1 as MyScriptlet
Set Scriptlet1 = CreateObject("MyScriptlet")
Sub Scriptlet1_namechanged
MsgBox("Value of name property changed")
End Sub
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi, I have a control that when it initializes in design mode it gives me an error. This is because the variable that it uses has not been initialized yet. I could just do error trapping but I would rather just detect if the program is running or if I am in design mode. Is there any way to do that?
Thanks,
Clint Singer
|
|
|
|
|
There is a property you can check that tells you.
If Ambient.UserMode Then
'We are in Run mode
Else
'We are in Design mode
End IF
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
Hello,
I am trying to run a multithread sort of application. But the compiled code is giving problems. In gives memory access violation.
Pl. help.
In .frm file-->
Option Explicit
Const CTF_COINIT = &H8
Const CTF_INSIST = &H1
Const CTF_PROCESS_REF = &H4
Const CTF_THREAD_REF = &H2
Private Declare Function SHCreateThread Lib "shlwapi.dll" (ByVal pfnThreadProc As Long, pData As Any, ByVal dwFlags As Long, ByVal pfnCallback As Long) As Long
Private Sub Command1_Click()
Dim i As Long
SHCreateThread AddressOf NewThread, ByVal 0&, CTF_INSIST, ByVal 0&
' SHCreateThread AddressOf NewThread1, ByVal 0&, CTF_INSIST, ByVal 0&
' For i = 1 To 10000
' Me.Caption = i
' Next
End Sub
in .bas file-->
Option Explicit
Sub NewThread()
MsgBox "Messagebox, called from thread!"
End Sub
'Sub NewThread1()
' MsgBox "Messagebox, called from thread ONE!"
'End Sub
Regards,
~A.
|
|
|
|
|
Your code has so many problems I can't even begin to list them. Go here: www.powervb.com and buy the book. That's the only correct way to do threads in VB, period. Anything else is a hack, even if it seems to kinda work.
___________
Klaus
[www.vbbox.com]
|
|
|
|
|
I would like to know if someone could help me with an issue in VB. I've been searching (and searching!) for code that would allow me, in VB6, to span multiple CDs for my software installation. I am installing a suite of software products, hence the size is larger than 700Meg.
Thanks in Advance!
Rob
|
|
|
|
|
Have you tried using Install Shield or WISE?
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|