|
|
Hi,
What is best machinsm to check whether the server is UP or not?
How far ping mechanism is reliable?
If any good machanism is there to check whether server is UP or not?
Kindly help me
|
|
|
|
|
Hi all,
I am trying to write the following logic in c#.Please help me , i could not able to translate the Bolded code in the following logic.
Code in VB.Net
==============
Public Function ConvertPage(ByVal PageUrl As String) As Bitmap
Me.PageUrl = PageUrl
Dim thrCurrent As New Thread(New ThreadStart(AddressOf CreateImage))
thrCurrent.SetApartmentState(ApartmentState.STA)
thrCurrent.Start()
thrCurrent.Join()
Return ConvertedImage
End Function
Private Sub CreateImage()
Dim BrowsePage As New WebBrowser()
BrowsePage.ScrollBarsEnabled = False
BrowsePage.Navigate(PageUrl)
AddHandler BrowsePage.DocumentCompleted, AddressOf WebBrowser_DocumentCompleted
While BrowsePage.ReadyState <> WebBrowserReadyState.Complete
Application.DoEvents()
End While
BrowsePage.Dispose()
End Sub
What is Equivalent c# code for above bolded lines?
Thanks in advance.
|
|
|
|
|
This may or may not get you going:
Thread thrCurrent = new Thread(new ThreadStart(CreateImage));
BrowsePage.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(WebBrowser_DocumentCompleted);
private void WebBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e )
{
...
}
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
|
|
Hi,
I want to know how Visual C++ experts implement these complicated logical relations between visual components of a form.
For example when user switch between different radio buttons and you need to en/disable other components or some other tasks.
Actually I need some APIs (like EnumChildWindows) or some approaches(which I don't know any!) to make it more covnvenient to do such boring tasks!
|
|
|
|
|
Interaction between controls in a WinForm Application is handled by using events of controls.
Therefore lets say if we want to disable a button control on selection of a radio button, we can use code like this –
private: System::Void radioButton1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
this->button1->Enabled=false;
}
Don’t forget to add handler for Checked event of Radio button.
-Dave.
------------------------------------
http://www.componentone.com
------------------------------------
|
|
|
|
|
Hello,
anybody help me out by providing code for a label box to be visible when a condition satisfies.how to set the property.how to get the value from presenter view.
thank u
|
|
|
|
|
Do you mean Label.Visible = true ? What's a presenter view?
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson Because programming is an art, not a science. Marc Clifton I gave up when I couldn't spell "egg". Justine Allen
|
|
|
|
|
yeah. i mean label.visible=true.
but when the window form appears label should not be appear.when a certain button is clicked and operation is done then it should show the label.
like
if clicked flag=1 then
label.visible=true
else
label.visible=false
And i need this using n-tier. i mean the presenter is diff.and the logic ,data are implemented in diff places.so label property should be set in presenter view.as i cant access directly LabelName.Visible=True in the buss tier.It can be accessed in the bussiness tier by using Me.View.LabelName.
I have taken label visibility property false as default.
But i am not getting how to define the property in the presenter(designer.vb)and (codebehind.vb)
i have used View.VisibleControl(Me.View.LabelName,True)
but its not showing the label.i think problem in setting the property.which i am not able to correct it.i just declared the property in the designer.vb. didn't define get set properties of the label.
thank you.
modified on Thursday, September 11, 2008 9:35 PM
|
|
|
|
|
So you're performing an operation and the label needs to be visible based on the result of that operation.
What is the return type of the method you are calling on the business object? Could you return a boolean value & use that to set the visible property? Or if you need to return multiple values you could create a context type that returns the values you're looking for.
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson Because programming is an art, not a science. Marc Clifton I gave up when I couldn't spell "egg". Justine Allen
|
|
|
|
|
I'm not sure if this is a .NET framework issue or a windows XP to Vista transition issue but I have an application I've been developing in VS 2008 (C#), .NET framework 2.0, on a windows XP machine. Recently, my team was told that we needed make sure this was vista compatible so we moved over to a machine running vista and framework 2.0 and noticed that the background colors to the combo boxes had lost their backcolor property. When the page loaded the color would flicker and then go to the default grey. At first we thought it was a theme overriding out property so we disabled the theme first through windows and then in our code using uxtheme.dll, each to no avail. Thus far the interwebs have yielded no results so I'm wondering if this is a random act of God.
"The shortest distance between two points is under construction"
-Noelie ALtito
|
|
|
|
|
Vista adds more styling to comboboxes than Windows XP did. You may have to rewrite the graphical code for those comboboxes if possible to make it more appealing under vistas themes.
As far as code is concerned, you should have absolutely no problem with moving it vista/.NET 3.0. The only problem is with overriding graphical themes/control aspects.
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
|
|
|
|
|
Yeah, to solve the problem we had to change around a few things and make some sacrifices as far as a machine using vista is concerned. We just changed the style to "flat" whenever we detected Vista. It's not as pretty but it's a fairly quick and easy solution.
Thanks for you reply. Much appreciated.
"The shortest distance between two points is under construction"
-Noelie Altito
|
|
|
|
|
Hi, im a newbie, and i now the answer is probably very simple but i just cannot figure it out. I would like to get the datagridview to STOP taking the first row as the columnheader. i hav tried using DataGridView1.Columns(0).HeaderText but iv realised it doesnt stop taking the first row as the column header but it simply replaces the text in that column header but does not do what i want. Any help is much appreciated
PS i am using vb
|
|
|
|
|
Do you mean that you don't want column headers? Have you tried setting the ColumnHeadersVisible property to false?
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson Because programming is an art, not a science. Marc Clifton I gave up when I couldn't spell "egg". Justine Allen
|
|
|
|
|
Hi Friends.
I'm a new member.
i'm working with VB.net 2.0.
I want to add a datetimepicker into column of datagridview
please tell me how to do??
Thanks for all ideas
|
|
|
|
|
|
Thanhks Tindo.Your guide help me so much.Thanhks again.
And Do you know how to add a MaskedTextBox into column of DataGridView???
if you cound not try then
msgbox("you will lose")
else
msgbox("you can change yourself")
end if
|
|
|
|
|
how do you get values from text boxes and then use them?
thanks
|
|
|
|
|
You have to use the Text property.
The String^ value can be converted to a number
using System::Convert::To[Type] .
([Type] = Double, Int32, ... )
Alex
|
|
|
|
|
string A;
int B;
A = textbox1.text;
B = convert.toint32(textbox2.text); // if possible!!!
other types other convertions
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
salam sir;
please help me how can get online help in visual studio .net 2003 and 2005?how can get free download msdn software and how can get online get help in msdn?
thanks
mohammedali
|
|
|
|
|
I am pretty certain that you need to buy MSDN library, it also comes with the purchase of the VS products. I don't know if you can get it for the express versions.
Otherwise you can use the online version, however most developers use Google, you get MSDN + community information.
Never underestimate the power of human stupidity
RAH
|
|
|
|