|
You can query the system tables in sql server, the information should be available in there somewhere.
Hope this helps
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi All,
I have the following code which i have type for getting the use of refection for button class,
But I got following error
Object reference not set to an instance of an object.
<br />
Public Class Form1<br />
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
Dim pobjtype As Type<br />
pobjtype = Nothing<br />
Dim PobjObject As New Object<br />
PobjObject = Nothing<br />
Dim pobjButtons As New Windows.Forms.Button()<br />
PobjObject = pobjButtons.GetType()<br />
<big> For Each PobjObject In pobjtype.GetMembers </big><br />
LstDisplay.Items.Add(PobjObject.ToString())<br />
Next<br />
End Sub<br />
End Class<br />
<br />
Thanks in advance,
amit
|
|
|
|
|
You assign Nothing to the variable pobjtype, and then you try to use it as if it referenced an object.
Did you assign the value to the wrong variable on the line before?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Sorry I didn't get you. Can you please explain with the line code ?
Thanks
|
|
|
|
|
He means that you assign Nothing to variable: pobjtype = Nothing
and then you try to use it
for ... in pobjtype.GetMembers
Shay Noy
|
|
|
|
|
Good Day,
I am busy writing a I2C communication link through the printer port. I need to set up a square wave of 100-400kHz for the I2C clock signal. This is for an EEPROM programmer.
I was going to use the windows timer, but the interval only goes down to 1 ms. I need an interval less than 10 to 2.5 nano second.
I was trying to use system.timers.timer, but am not sure if this is the correct class for what I need to do.
Is there another way to create and interval or a delay in vb.net?
Is there an example implementation for sytem.timers.timer?
Here is my code for system.timers.timer:
Public Class Main
Dim WithEvents myTimer As New System.Timers.Timer
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
myTimer_Init()
AddHandler myTimer.Elapsed, AddressOf myTimer_Run
End Sub
Sub myTimer_Init()
With myTimer
.Interval = 0.001
.Enabled = True
End With
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
myTimer.Start()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
myTimer.Stop()
End Sub
Dim counter As Long
Sub myTimer_Run()
counter += 1
TextBox1.Text = counter.ToString
End Sub
End Class
Error at runtime: Cross-thread operation not valid: Control 'TextBox1' accessed from a thread other than the thread it was created on.
|
|
|
|
|
My math was wrong above. its 10 to 2.5 microseconds.
|
|
|
|
|
Microseconds... Damn.. Uhm
10^-6..
0.001 ms...
Afaik, VB only works in ms. And then only down to somewhere near 50 or so as an interval for the timer class.
So, if you're gonna do that, with microseconds, you'll need another language.
|
|
|
|
|
Hi,
i have a contextMenuStrip control with 5 items. I can change its forecolor and backcolor easy like
contextMenuStrip1.Forecolor=color.Yellow.
How can i change the color of the selected item when i am on it?
I mean when i select for example forth item, there is a different color that shows/indicates on which item i am on.
How do i change this color?
Thanks in advance
|
|
|
|
|
By inspecting the menuitem object you will see that there is no fore/back color property so you are not going the set these in the standard object.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
No, you make mistake. Both in System.Windows.Forms.ContextMenusStrip and in System.Windows.Forms.ToolStripMenuItem there is a forecolor and backcolor property, and for sure i can set those 2 colors because i already do.
How do you know on which MenuItem you are on, while you have not yet click on any and you are just browsing? You know it, because on this MenuItem you are on, it appears something like a 'selection' that has a different color. This color i want to change!
|
|
|
|
|
hey frnd MD4 unction is not inbuilt. I do not know from where to start.Can somebody plz frd me the coding. I will be very greatful to you.
|
|
|
|
|
Googled this[^] in seconds....
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Could you please repost again, Sonia?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
hey frnd MD4 unction is not inbuilt. I do not know from where to start.Can somebody plz frd me the coding. I will be very greatful to you.
|
|
|
|
|
|
Hello,
I have a SharePoint application with a list (with data). I want to get the data with the webservice method into my windows vb.net application. Does anybody know, how I can get my list information into the windows application with the webservice method?
I have created a webservice to get lists. If I want to get the listdetails the webservice tells my that a credential error there is.
I have tryed this:
Dim Liste As New ServiceReference.ListsSoapClient
Dim node As Xml.XmlNode = Liste.GetListCollection("NameOfList")
Can anybody show my an example, please?
Thanks a lot.
BK
|
|
|
|
|
I have the following TextBox on my .aspx page.
<asp:textbox id="hdnresultbox" style="z-index: 101; left: 520px; position: absolute;<br mode=" hold=" /">top: 632px" runat="server" Width="1px" Height="1px" ReadOnly="false">no
The JavaScript from viewing the source is as follows. There is some JS above what you see here, but it is working fine. I also have a try...catch around all of this. The error that occurs is [object Error] and it occurs on the lines below when I attempt to set the value of the text box. The text box is on the page, but I am thinking it may have something to do with the runat="server" in the code above. I need that though b/c I check the field in my code-behind file as well. I need help on updating the value of this field via JavaScript.
if(result == true){
document.getElementById('aspnetForm._ctl0_ContentP laceHolder1_hdnresultbox').value='yes';
}else{
document.getElementById('aspnetForm._ctl0_ContentP laceHolder1_hdnresultbox').value='no';
}
return result;
|
|
|
|
|
Sorry....textbox code did not post.
<asp:TextBox ID="hdnresultbox" Style="z-index: 101; left: 520px; position: absolute;
top: 632px" runat="server" Width="1px" Height="1px" ReadOnly="false">no</asp:TextBox>
|
|
|
|
|
Well, serverside the ID of the textbox is not: "aspnetForm._ctl0_Conten...".
But rather the ID itself at designtime: "hdnresultbox".
Tried that?
|
|
|
|
|
As I can't see the controls surrounding the TextBox, I don't know exactly what the client id will be, but aspnetForm. is definitely not part of the id.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Use the ClientID property on the server side to write the id to a variable, then it will always be right.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
At the moment i'm attempting to create an application that uses the Office 2007 renderer[^]
But, unfortunately, i'm having some serious run-time issues. The load time is par to none, so that's not the problem. But, when the form is resizing or being maximised, the lag is terrible and consumes up to 90% of the CPU (which considering I have 3GB RAM and Duel 2.2GHZ processor, is a lot).
I believe it's because the ToolstripManager redraws the entire content-panel region with the blue background. But, even when I switched to the default "Professional" renderer, it lagged slightly (but, not as bad as before). I enabled DoubleBuffer and SetStyle(OptimizedDoubleBuffer, True) but alas, it still lags.
Even placing Me.SuspendLayout() and Me.ResumeLayout() in the form resizing events does not stop that lag.
Is there any way that I can prevent all this lag, or is it always going to occur due to the redrawing upon resize?
Thanks muchly
~ Chris
|
|
|
|
|
Hello,
I had this idea of doing some work with wireless units etc.
So I looked into it, and found some functions in Windows Vista, for showing wireless networks (More specifically "netsh wlan ..."), which would show all networks with their signal strength etc.
However, for XP, all I find points towards WMI, which I have basically no idea how to use. Could anyone point me in the right direction, in regards to wireless communication / scanning.
The ultimate goal, is a triangulation application, which uses strengths from several points, to pinpoint one location.
- Mike
|
|
|
|
|
Is there a simple way to do that? Or do I have to create a dataview of the first table and then put that view into a new table using .totable?
Thanks
|
|
|
|