|
Sir/Madam,
Can i programically find out the IP address of my machine in vb.net 2005
Thanks and regards
Pankaj
|
|
|
|
|
Yes. How you do depends on what IP address you want. You can get the local IP address used by the computer by examining the network card(s). This is a rather common question, you should be able to search for it in the forum.
If you are behind a firewall or router and want the external IP address, you have to send a request to a server outside the local network that returns the IP address to you.
---
single minded; short sighted; long gone;
|
|
|
|
|
Sir,
Can u please provide the code to get the ip address of my machine programically in vb.net 2005
Thanks and Regards
Pankaj
|
|
|
|
|
A little haiku in the morning:
Few simple words
In search engine I type
Instant gratification
Have a look at this article:
The Code Project: How To Get IP Address Of A Machine[^]
The code is in C#, but it has what you need.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thank You Sir.It is working very fine.
|
|
|
|
|
Sir/Madam,
I am programically snding the mail in vb.net 2005 Window application.
I am using the following code.
But there is occuring an error
Failure sending mail
Dim mail As New Net.Mail.MailMessage()
'set the addresses
mail.From = New Net.Mail.MailAddress("pankajgarg10@yahoo.co.in")
mail.To.Add("pankajgarg10@yahoo.co.in")
'set the content
mail.Subject = "This is an email"
mail.Body = "this is a sample body"
'send the message
Dim smtp As New Net.Mail.SmtpClient("This is the I.P address of my machine")
smtp.Send(mail)
|
|
|
|
|
amaneet wrote: Dim smtp As New Net.Mail.SmtpClient("This is the I.P address of my machine")
What's the exact error message?
This will only work if your machine has an SMTP server installed on it AND is allowed to mail to another mail server on the Internet.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi i have different User roles in my sqlserver database...,
Ex:
in "admin" approle i given all rights for that table..,
in "Normal User" Approle i given insert record right only for that table...,
How to use those roles in my vb.net form....
Plz solve my probs...,
All sorrows will be forget...,When u think ur most lovable one...,
Mag,
|
|
|
|
|
i hv one problem.
i hv done one mdi form they hv many child form but one form is that it's also contain one child form so how to create child of child form in mdi form?
|
|
|
|
|
have a look at the Showdialog function of a Form and its Parameters......
If you are calling form2 from form1 call like this
Dim myFrm as frm1<br />
myFrm=New myFrm<br />
myFrm.Showdialog(Me)
it will make frm1 as Parent/Owner of frm2
Tirtha
"A man can ride on your back only when it is bent....."
|
|
|
|
|
You can't do it the way you decribed. Windows does not support MDIChild forms having MDIChild's themselves. A form can NOT be both an MDIParent and MDIChild at the same time.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Can I use a modem for analog to digital conversion
using VB or C/C++ wihtout using any other hardware?
|
|
|
|
|
No. That is not how a modem works.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
plz tell me to display/call a value in a label/textbox accesed from database of sql 2005 express edition using data reader or any thing else (not grid veiw method)
if possible send me example
|
|
|
|
|
Your question makes no sense. What do you want to do ? It sounds like if you could word it better, you could just type it in to google and find dozens of hits. You want to combine a data reader, a textbox and a database ? Which bits don't you know how to do ? Once you have the data, you can just read it and assign it to the Text property.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
please i need help to finish my FINAL YEAR PROJECT
any body can help me for VOIP.. please give me the whole source code. please please...any example..perhaps...
alpuse
|
|
|
|
|
You're joking, right??
You want use to give you the entire source code to a VOIP project so you just turn in something that's not your work? It's bloody obvious you don't even know what you're talking about. Why should we help you cheat in a class you're not qualified to pass?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Does anyone know how to open Windows Picture and Fax Viewer using Shell Command in vb6?
I tried the following code, but it does nothing:
Shell "rundll32.exe C:\WINXP\System32\shimgvw.dll, ImageView_Fullscreen " & Chr(34) & (<filepath>) & Chr(34), vbMaximizedFocus
Please help!
|
|
|
|
|
I can't get it to work either. It would appear that that functionality isn't exported anymore. But, it's probably possible to do it using its COM interface. Try adding a Reference to the "Preview 1 Type Library". Once you add the reference, you can open the Object Browser and see the methods and properties the Preview class exports.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dim x As Integer, y As Integer
Dim bmpIn As New Bitmap(fInName)
Dim bmpOut As New Bitmap(fOutName)
For x = 0 To bmpIn.Height - 1
For y = 0 To bmpIn.Width - 1
bmpOut.SetPixel(x, y, bmpIn.GetPixel(x, y))
Next
Next
bmpOut.Save(fOutName, System.Drawing.Imaging.ImageFormat.Bmp)
I've tried to save a bitmap image but failed. Please help me!!!
Thanks!
|
|
|
|
|
What do you mean you have failed. Are you getting an error? Is the output not what you expect? What exactly are you trying to do with this code. Please explain so we might help, because I don't think this code is what you want. From what I can tell you are creating a bitmap from an image on your harddrive. You are then creating another bitmap from a different image on your harddrive. The loop attempts to copy all the pixels from the first image over the second image.
|
|
|
|
|
bmpOut.Save(fOutName, System.Drawing.Imaging.ImageFormat.Bmp)
The error is found on this command statement. I dont think it is wrong but I cant even figure out what's happened
|
|
|
|
|
You didn't answer the question. What has failed ? Did you get an error at runtime ? At compile time ? Did you end up with a file you can't open ? A file that doesn't contain what you expected ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Creating a bitmap using dim bmp as new bitmap("somefile") will lock the file. In your code you created the bitmap from fOutName. You are also trying to write the new bitmap to that same file. My guess is whatever error your getting is due to the fact that the file is locked. You can get around this by using a stream instead.
Dim fs As New IO.FileStream(fOutName, IO.FileMode.Open)
Dim bmpOut As New Bitmap(fs)
fs.Dispose()
Hope that helps.
|
|
|
|
|
Dim x As Integer, y As Integer
Dim bmpIn As New Bitmap(fInName)
Dim fs As New IO.FileStream(fOutName, IO.FileMode.Open, FileAccess.Write)
Dim bmpOut As New Bitmap(fs)
For x = 0 To bmpIn.Height - 1
For y = 0 To bmpIn.Width - 1
bmpOut.SetPixel(x, y, bmpIn.GetPixel(x, y))
Next
Next
bmpOut.Save(fOutName, System.Drawing.Imaging.ImageFormat.Bmp)
fs.Dispose()
I've tried but failed with the error statement "Parameter is not vail" which can be describled in detail that:
System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap..ctor(Stream stream)
at IP.frmMain.SubMenuSave_Click(Object sender, EventArgs e) in D:\Thu_Vien\Documents\Studying Files\Image Processing\IP.NET\IP\IP\frmMain.vb:line 97
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
What should I do???
|
|
|
|