|
How To Get IP Address Of A Machine[^]
I don't think there are separate ways for ipv4 and ipv6. If the computer has ipv4, you'll get an ipv4 address. If ipv6 is enabled, you'll get an ipv6 address (::1).
|
|
|
|
|
#1 (permalink) Add to desperateboy's Reputation Report Post
Old Today, 1:09 PM
desperateboy desperateboy is online now
VB.NET Forum Newbie
.NET Framework: .NET 1.1 (VS 2003)
Join Date: Dec 2007
Posts: 20
Reputation: 12
desperateboy is on a distinguished programming path ahead
Default Insertion problem in database
hi friends,
I have added 3 buttons of name add,save and delete.When add username in the database first heck out that already exist or not.If not existed then insert into database.I trying using this code
Plz help to sort it out.
Try
dim str1 as string
str1 = txtusr.Text
conn.Open()
cmd = New SqlCommand("select * from usrs where uname='" & (str1) & "'", conn)
dr = cmd.ExecuteReader
While dr.Read()
str = dr.Item("uname")
If str <> Trim(str1) Then
usrexist()
Exit Sub
Else
Dim sYN As String
sYN = MsgBox("User Already Exists, Want to Update", vbYesNo + vbQuestion, "Update User")
If sYN = vbYes Then
'' update in the database''
End If
End While
Catch ex As Exception
MsgBox(ex.Message)
Finally
cmd = Nothing
conn.Close()
dr.Close()
End Try
|
|
|
|
|
lahsiv wrote: #1 (permalink) Add to desperateboy's Reputation Report Post
Old Today, 1:09 PM
desperateboy desperateboy is online now
VB.NET Forum Newbie
.NET Framework: .NET 1.1 (VS 2003)
Join Date: Dec 2007
Posts: 20
Reputation: 12
desperateboy is on a distinguished programming path ahead
Default Insertion problem in database
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Copy / paste from a posting on a different site
|
|
|
|
|
|
lahsiv wrote: u don't know
Really?? It just takes a minute of googling to get at this page[^]
|
|
|
|
|
facing same problem buddy.I am not interested to spoil time to ask questions if i know.
|
|
|
|
|
hi
when i am running my windows application in vb.net .i am getting an error
as below
The CLR has been unable to transition from COM context 0x1a1298 to COM context 0x1a1408 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.
please suggest any solution to above problem.its very urgent
thanks and regards
sneha
|
|
|
|
|
Press CTRL+ALT+E - opens the exceptions window. Goto Managed Debugging Assistants. I *think* you want to uncheck the ConextSwitchdeadlock checkbox.
If not, logically determine which one is appropriate.
Cheers!
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Not enough information to go on. What COM components are you using in your app?? It would appear that one of them is not working correctly or, maybe, is running as an MTA when VB.NET expects to run as an STA by default.
|
|
|
|
|
Sometimes you maybe doing a call to an object that does a large amount of processing and takes longer than 60 seconds. The exception assistant assumes that the operation is a deadlock or is unresponsive and will throw the error.
Just something I ran into before.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
When I am Opening my appliaction from .exe, If a dll is missing it throw me an error :
An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'nsoftware.IPWorksSSL, Version=8.0.3022.0, Culture=neutral, PublicKeyToken=cdc168f89cffe9cf' or one of its dependencies. The system cannot find the file specified.
How Can I Check at start of the Application.
Or How can It Attached with my application
|
|
|
|
|
When you build your deployment project make sure the DLL is included or make it copylcal = true if you are using clcikonce.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yes, It is Understand.
but after installation if someone deleted the .dll files from client machine then the problem arise
|
|
|
|
|
That's too bad. They'll have to reinstall your software.
|
|
|
|
|
pdnet wrote: but after installation if someone deleted the .dll files from client machine then the problem arise
Then its their own fault. Even if you check at start up all you will be able to do is tell them there is a missing dll, so what is the benefit?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hello,
Is it possible to user the authentification control provided by Aspx in a winform application ?
Thanks
|
|
|
|
|
Sure - you just need to deploy your page to a website, and put a web control in your winforms app.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
how to open pop pup window in window application(Vb.net).
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
A modal window? use ShowDialog() method when you show the form.
|
|
|
|
|
i want to open pop pup window from system tray when any event fire. for example-that pop up contain "N a v a n e e t h is great" (like Google Talk when any msg com and gtalk not open)
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Try notify Icon tool from the toolbox
|
|
|
|
|
create your own form at runtime,
see this code .., this may help u
Private Sub geterate_data_window(ByVal comport As Ang_Serialport, ByVal SMSPopupform As Form, ByVal lc As Integer, ByVal popuptext As Label, ByVal closebtn As PictureBox, ByVal mypicbox As PictureBox)
Dim runningimg As Bitmap = New Bitmap(Application.StartupPath & "\images\running.gif")
Dim backimg As Bitmap = New Bitmap(Application.StartupPath & "\images\bg.gif")
Dim closeimg As Bitmap = New Bitmap(Application.StartupPath & "\images\Closebutton.jpg")
Dim lcdimg As Bitmap = New Bitmap(Application.StartupPath & "\images\lcd.jpg")
Dim progressimg As Bitmap = New Bitmap(Application.StartupPath & "\images\ProgressBar.gif")
Dim progresspic As New PictureBox
backcolor1 = Color.Pink
backcolor1 = Color.LightBlue
SMSPopupform.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
SMSPopupform.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
SMSPopupform.ClientSize = New System.Drawing.Size(300, 65)
SMSPopupform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
SMSPopupform.Location = New System.Drawing.Point(1, lc)
SMSPopupform.Name = "Form1"
SMSPopupform.StartPosition = System.Windows.Forms.FormStartPosition.Manual
SMSPopupform.Text = "Data Downloading"
SMSPopupform.ResumeLayout(False)
SMSPopupform.ShowInTaskbar = False
SMSPopupform.TopMost = True
SMSPopupform.BackgroundImage = backimg
SMSPopupform.TransparencyKey = System.Drawing.SystemColors.ButtonFace
'' For label
popuptext.BackColor = Color.Transparent
popuptext.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
popuptext.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
popuptext.BackColor = System.Drawing.Color.Blue
popuptext.ForeColor = System.Drawing.Color.Black
popuptext.BackgroundImage = lcdimg
popuptext.Location = New System.Drawing.Point(65, 10)
popuptext.Name = "RichTextBox1"
popuptext.Size = New System.Drawing.Size(200, 40)
popuptext.TabIndex = 0
'' for button
closebtn.Image = closeimg
closebtn.Location = New System.Drawing.Point(270, 9)
closebtn.Name = "Button1"
closebtn.Size = New System.Drawing.Size(18, 17)
closebtn.Text = ""
closebtn.TabIndex = 4
closebtn.TabStop = False
'PictureBox1
'
mypicbox.Location = New System.Drawing.Point(8, 11)
mypicbox.Name = "PictureBox1"
mypicbox.Size = New System.Drawing.Size(53, 54)
mypicbox.TabIndex = 1
mypicbox.TabStop = False
'progress picture box
'
progresspic.Image = progressimg
progresspic.Location = New System.Drawing.Point(62, 50)
progresspic.Name = "PictureBox1"
progresspic.Size = New System.Drawing.Size(200, 13)
progresspic.TabIndex = 1
progresspic.TabStop = False
SMSPopupform.Controls.Add(popuptext)
SMSPopupform.Controls.Add(closebtn)
SMSPopupform.Controls.Add(mypicbox)
SMSPopupform.Controls.Add(progresspic)
AddHandler SMSPopupform.Paint, AddressOf SMSPopup
AddHandler closebtn.Click, AddressOf btn_close
SMSPopupform.Show()
SMSPopupform.Refresh()
End Sub
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
If all you want is some text to appear in the popup window, just use:
Msgbox("Hello World!")
or
Messagebox.Show("Hello World!")
With the second option you can also fill in the other parms to control what the popup title is, if the popup has OK button or Yes/No buttons, etc.
Hope this helps.
|
|
|
|
|
Hi there,
When I look at professional and/or opensource .net-code, I often see this code to be well organised, such as some regions for events, regions for procedures / subroutines, etcetera. These regions are sorted alfabetically.
I can not find a program or an addin on the internet that does this, but at the same time I can't imagine everyone is doing this manually.
Does anyone is aware of a nice tool?
Thanks,
Jochem
The Netherlands
|
|
|
|