|
hello frnds,
can i get the following thing using VB 6.0
1. IP address of My Computer
2. my computer is working under which server
please help....
thankx in advance
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Dim getipaddress As String
Dim xAddr As System.Net.IPAddress
Dim vAddr As String
With System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName())
xAddr = New System.Net.IPAddress(.AddressList(0).Address)
vAddr = xAddr.ToString
End With
getipaddress = vAddr
MsgBox(getipaddress)
that's the syntax for .net but i'd imagine it would be somewhat similar in 6
|
|
|
|
|
thaknx Froz,
BUT r u sure it is run under VB 6.0 environment
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
it's for vb 2005, so I don't know how the vb 6 will look... I think it will look real close tho.
|
|
|
|
|
No, the VB6 code won't look ANYTHING like this. Most of your code uses classes in the .NET Framework that don't exist in VB6.
|
|
|
|
|
This example[^] shows how to resolve an IP Address to a DNS name and the other way around, name to IP.
Here's another example[^] speeling out how to get the machines host name and IP.
|
|
|
|
|
1.Press Ctrl+T
2.Check The Microsoft Winsock Control 6.0
3.Add It To Your Form.
4.Winsock1.LocalIP Shows Your IP
A.E.K
|
|
|
|
|
|
Thankx To all for your valuable Replys,
Just....Keep on Posting
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
I have a real simple question that I'm somewhat embarrassed to ask but I can't figure it out.
dim x as string
x = 59 * .60
msgbox(x) ' displays 4600000000000.2
now what i'm trying to do is store the first 2 digits, which would be 46 into a variable
the reason x is a string is because I used as split function to get the 59 in this case
|
|
|
|
|
dim i as integer
i = integer.parse(x.substring(0,2))
this will only work if you are absolutly certain that x contains a decimal value (otherwise make i string and remove integer.parse)
hope this helps
|
|
|
|
|
Oh thanks. That works great!
|
|
|
|
|
I want to compare between the dates something like that
If Date.Now.ToShortDateString < date2.ToShortDateString Then
Ahmed El-Badry
|
|
|
|
|
If Date.Now < date2 Then
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Talking about it, how does one calculate the duration between two dates?
|
|
|
|
|
Hello,
I am using VB 2005 & in my form all control are bound. I have Client Name field. I want to display all names in a combo, let the user select & bound the selected text to the client name field of DB. How do I achieve this?
Currently, I am using a trick for it - a combo box which has all names, when user select put the selected name in an invisilbe text field which is bound to the field. Client names will be taken from other table. In other case, combo will be filled by values but the scenario is the same. I Know & belive that this is a wrong way, professionally speaking. I would like to know is their a better and proper way for the operation.
Prog. is using the Binding to DB method, so operations are not done by manual code.
Thanks
Terry
|
|
|
|
|
Get that field or whole table into dataset
assume u r table comprises of (ID,Name)
then how u are goin to bind this
is
combobox1.datasource= dataset.tables(0)
combobox1.displaymember="ID"
combobox1.valuemember="ID"
|
|
|
|
|
I think, u didn't get my point clearly.
It is a data entry form & all fields are dragged from dataset to the form & hence they are bound automatically. The displaying respective fields in respective text box is managed by BindingSource only. I am not writtting any code for Add, SAve, Update, dEl etc.
I have data set with 3 tables. In table 1, i have id & name. In table 2 i have name, source & other fields.
* I want to display all names from table 1 and the selected name should be bound with name field of table 2
* For source field, I want user to enter items from 4 only. So, i thought of combo box. The point is how do I bind the combobox with that source field of table.
So, how do I make the bound sure of combobox with the field of table. How such a task be achieved.
Any help is appreciated.
Thanks
Terry
|
|
|
|
|
Short way is make inner join b/w tables
|
|
|
|
|
hi all,
how can i change the date format of Month calendar ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
hi guys
i have made an windows application in vb.net. which contains certain dlls and a pdb and a exe.confing file. i also have another application of centura which works out after my application executes. no problem till here.
but problem is arrising when i am creating a setup & deployment project.
i will give a detailed report of what i have done for the setup & deployment project.
1)selected setup project with name hccp(some name)
2)pressed ok
3)i get a window containing file system on target machine.
4)selected application folder in that and added to folders and two text files(help files),one folder contains my vb.net windows application with related files, another contains the centura application(also windows or desktop application) and related files.
5)in users desktop folder i added the exe file of my application(getting an error ie a blue line is underlined under the file)
6)in users programmenu folder i created a folder and then added certain imp files like exe file and config file and help file.(getting an error ie a blue line is underlined under the file).
the centura application in no where concerned with ma pplication ie it runs in the background after my application completes execution.
getting warning messages like this below
E:\parser\parser\parser.vdproj File 'browserapplication.exe' should not be installed into a User's Profile folder because it may not be available to all users.
E:\parser\parser\parser.vdproj File 'browserapplication.exe' should not be installed into a User's Profile folder because it may not be available to all users.
and when i build the application msi file is being created.
here comes the real problem
when i click on the setup.msi or setup.exe file i get a n error like this
mshtml.dll failed to register.hresult-2147024770
could not rectify it.
i would be glad if some one helps me out in creating a setup file.
there is no such thing as good or bad.
|
|
|
|
|
from what I can see this might be the problem:
you create 2 folders in you're application folder in wich you put you'r application
I don't know this for sure but I think this is not allowed. I think you have to put you're application directly into the application folder by adding project output this will automaticly put all the files needed to run you'r programme (unless you have an outside component in wich case you might have to add a few dll's) in the application folder
you put you're exe on the desktop, don't know if it's a warning or an actual error but normally this is not done you create a shortcut on the destop (can be done by selecten user's destop then right click and choose 'create new shortcut')
in programme menu the same as user's desktop, create shortcuts instead of adding the files
All files outside of the project output that are needed or wanted should be added to the application folder
|
|
|
|
|
I am new to vb.I have downloaded a vb project code which can play wav files.
Location = CurDir()
Soundname$ = "c:\VB\WAVEPLAY\START.WAV"
wFlags% = SND_ASYNC Or SND_NODEFAULT
But when i run that i am getting runtime error. mmsystem.dll not found.
I know adding .lib and .dlls to vc code. But dont know how to add this dll to the vb project.
Please help me.
KIRAN PINJARLA
|
|
|
|
|
if you know the path of the mmsystem.dll (and you have the file)
you can 'add' this dll to the project by maken a refferenct (just right click the project in solution explorer and choose 'add reference') then choose tab browse and locate the dll
this is for 2003 and 2005 (vb.net)
don't know how to do it for vb6
|
|
|
|
|
As a side note, adding a reference only works for COM and .NET .DLL's. It won't work for library .DLL's.
|
|
|
|