|
This code won't work. You only have one label wired up with it. Basically, you can't use WithEvents on a class-level variable and expect this to work. Drop the "Friend WithEvents..." line completely. Your MouseUp code has to create the label and wire up the events itself. This way, every label you create will maintain event connections.
Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
Dim lbl As New Label
' lbl.Name = "lbl" & i ' Drop this line. It's not necessary
lbl.Text = "Label " & i
lbl.Location = e.Location
lbl.AutoSize = True
AddHandler lbl.Click, AddressOf lbl_Click
Me.Controls.Add(lbl)
i += 1
End Sub
and drop the "Handles lbl.Click" from the end of the Sub you defined.
|
|
|
|
|
Works great! thanks for your help.
|
|
|
|
|
Hi,
my application wit database accsess is running fine on the System I developed it. When distibuting it on a other PC - without installation - I get the error message "Can't find System.EnterpriseServices.Wrapper.dll or one of it's dependencies". In former times this method worked fine but no I have a new target system. Is there a workaround for that.
Michael
|
|
|
|
|
How to get the datagrid header value? I have VS 2003 and not able to use Datagridview so is there any other work around?
|
|
|
|
|
what you want to do exactly please explain.....
Anshuman Singh
|
|
|
|
|
Singh,
Thank you for your interest on this post but I got it all figured out.
First I connect to the database then query the table and set it as DataTable. From the datatable I managed to looped for inconsistent Header and display them onto Comboboxes as Lists
adapter.Fill(dt)
Dim dc As DataColumn
For Each dc In dt.Columns()
....
end
|
|
|
|
|
Whenever i am trying to access C# ActiveX control on web page getting following exception.
Application attempted to perform an operation not allowed by the security policy.
To grant this application the required permission,
contact your System administator , or use the Microsoft .NET Framework Configuration tool.
Request for the permission of type ,
'System.Security.Permissions.UIPermission, mscorlib,
version=2.0.0.0, Culture=neutral,
PublicToken=b77a5c561934e089' failed.
Thanks in advance !!!
Dattatraya
modified on Wednesday, January 14, 2009 8:52 AM
|
|
|
|
|
contact your System administator , or use the Microsoft .NET Framework Configuration tool.
I are troll
|
|
|
|
|
Hello,
I have installed VS.net 2005 and i want to know the additional softwares required for developing mobile applications using VB.net 2005.
When i try to create any sample application, it shows message to install .NET Framework 1.0.
but When i try to install .NET Framework 1.0 it says that Framework 1.1 should be installed first.
Please anyone can list the softwares required, also please can give me some idea or sample code to start developing for my Nokia 3230.
Thanks In Advance.
|
|
|
|
|
Hello Friends,
I have a requirement of getting the selected value from crystal report view to my .net application and using that value set datasource to other report.
Kindly help me how can I get the selected value from crystal report view to my application.
Thanks in advance
Regards
|
|
|
|
|
can anybody tell me!!
How can i set trust level of trusted site to FullTrust Programatically!!!!
i know how to do it by
1.Microsoft .NET Framework 2.0 Configuration.
2.CasPol.exe
however i don't want to use both this option.i want to set it programmatically.
Thanks in advance
Dattatraya.
|
|
|
|
|
You shouldn't be doing this from your code. This should be done at installation time, by the installer. I'm not even sure it would work if you tried to do it from code.
|
|
|
|
|
Actually issue is that i designed one C# activeX control and that is embeddded inside 1 html .
Whenever any user request that page control is visible but if requested person do any thing related to that control.
The Control is not allowed access to resources of that machine by CAS of .NET runtime.
and exception thrown is System.Security.Permission.UIPermission.
and throws repeatedly as soon as mouse is over the control.
I am not getting how to deal with this problem.
Any help will be appreciated
Thanks in advance!!!
|
|
|
|
|
Whoah - you want to do this from a webpage? You can't, and when you stop and think about it for a minute, you'll see why. If you could elevate privileges from a website, then any site you visit could host a malicious control that increased its privileges and started to crawl your hard drive looking for useful information, or add a virus. This is part of the reason why these controls are sandboxed.
|
|
|
|
|
Like Pete said, you cannot do this. Code running inside a browser runs inside a heavily restricted sandbox. That code cannot evelate its own privileges and any code you put into that control has to be written to abide by those restrictions.
|
|
|
|
|
Hello,
I have SQL database and I need to Alter a Relationship in my Table.
There Is an Employee Table with Employee ID and Another Table that has Employee ID as foreign Key.
I need a Query to update this relationship to Add the functionality of CASCADE ON DELETE RECORDS.
Please Anyone has any ideas, i am relatively new to SQL.
Thanks In Advance.
|
|
|
|
|
First, you have to drop the Foreign Key Constraint and then recreate it with the desired options.
ALTER TABLE <table_name>
DROP CONSTRAINT <foreign_key_name> ;
ALTER TABLE <table_name>
ADD CONSTRAINT <foreign_key_name> FOREIGN KEY (EmployeeID)
REFERENCES <other_table_name>.EmployeeID (EmployeeID) ON DELETE CASCADE ;
Keep It Simple Stupid! (KISS)
|
|
|
|
|
Thanks Ben Fair,
That was what i was looking for.
Thanks for your reply.
|
|
|
|
|
Hi there,
with Windows 7 there came a neat new feature in the superbar. You can display progress inside the taskbar icon.
The linked image below shows the download progress of a file, to illustrate what I mean.
http://bb.nfshost.com/progressBar.JPG[^]
Does anyone happen to know if this feature can already be implemented through .net code? I'd love to have this in an FTP upload application that I only use for myself, on a Windows 7 system.
Any hints would be welcome
Cheers
|
|
|
|
|
In the sense you are speaking of, I would say not. it is possible to create a child window in the taskbar that is sort of like a toolbar (ex: Windows Media Player), however it would not be exactly like a taskbar icon. I am sure their are some Windows 7 specific APIs that you may be able to work with, but that is uncharted territory with Windows 7 still being in beta.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
I figured it out - if your app uses IProgressDialog it's done automagically. I hope they add that for ProgressBar aswell in the release version.
|
|
|
|
|
|
Hi
I'm trying to use the system.printing namespace to get the status of print queues on a print server. Unfortunately the only status I ever get for any queue is "None".
Here's the code:
dim myPS as PrintServer = New PrintServer("servername")
dim myPrintQueues as PrintQueueCollection = myPS.GetPrintQueues()
For Each pq as PrintQueue in myPrintQueues
pq.refresh()
'output pq.name
'output pq.QueueStatus.ToString
Next
I must be missing something obvious. Can anyone give me a pointer.
Thanks.
|
|
|
|
|
may it can help you out
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzalu/rzaluroutingexamples.htm
|
|
|
|
|
I have added a DataGridViewButtonColumn to one of the columns of a grid.How to change the colour of a button in DataGridViewButtonColumn?
|
|
|
|