|
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
|
|
|
|
|
Ok sorting regions alphabetically is a little anal and really does not make sense - sort by function groups yes.
jochem wrote: I can't imagine everyone is doing this manually
I think you are in for a bit of a shock, I'm betting most of us do it manually and don't think twice about it, organising your code should be so natural and so much of a habit that when someone comments on it you can't understand what they are talking about.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: I'm betting most of us do it manually and don't think twice about it, organising your code should be so natural
I second that, Mycroft.
"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
|
|
|
|
|
I do this all the time. In fact it is one of my pet peeves when developers do not do it.
I have a few things that tick me off... take a look here[^] for some examples...
|
|
|
|
|
HI am developing an application in VB.Net and am totally new to it
Now i have to design a page it goes like this:
I have to create a task and allocate it to different people based on their associate ID .There is a submit button in the page when i click on to it a mail must be triggered to the particular associate(sometimes same task to one or more associates)describing about the task he has to do can u tell me how to do it trigger a mail to any number of associates
|
|
|
|
|
READ on the SMTP class in vb.net,its very easy..u will get it
|
|
|
|
|
Hello,
I'm trying to compile a vb6 application I've made but I keep getting this error below
Compile Error in File 'D:\TAT\VB6\apps\go bingo\Connection.bas', Line 121 : Sub or Function not defined
Line 121 consists of this block of code...
Function addrec(myform As Form, mydata As adodc)
On Error Resume Next
mydata.Recordset.AddNew
mycmd = cmds(myform, False)
addflag = True
End Function
...line 21 is mydata.Recordset.AddNew . I've tried to comment-out the code but the error keeps persisting. How could I compile the project properly?
Many thanks for your replies.
Aim small, miss small
|
|
|
|
|
You defined a function but did not supply a return value type. It should be:
Function addrec(myform As Form, mydata As adodc) As someType
If you're not returning a value to the caller, change Function to Sub .
|
|
|
|