|
Form1.h represents your Form1 (which is a class Form1 derived from System::Windows::Forms::Form), and contains code related to it. We can declare out objects and controls here.
Just to give you an idea, following is a small code snippet which takes number from two textboxes (which are already on form1) and after adding these numbers, shows sum in a message box. –
-------------------------------------
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
int i;
i=System::Convert::ToInt32( this->textBox1->Text);
i +=System::Convert::ToInt32( this->textBox1->Text) ;
System::Windows::Forms::MessageBox::Show("Sum : "+i.ToString() );
}
-----------------------------------------
As you want to get books on Visual C++, I would advice you to search on google.
-Dave.
------------------------------------
http://www.componentone.com
------------------------------------
|
|
|
|
|
Thanks,
I've got this book: "C++ A Beginner’s Guide by Herbert Schildt" and I ve gone through it all but it doesn't do anything on windows forms unfortunatly.
Thanks again
|
|
|
|
|
Hello,
I am not very sure about book for learning .Net programming with Visual C++… however using Google I found two links which should be useful for you.
1) Good tutorials on different topics –
http://www.functionx.com/vcnet/index.htm
2) Msdn page (I have not checked any of the tutorials available here so don’t know how they are) –
http://msdn.microsoft.com/hi-in/library/60k1461a(en-us).aspx
I hope this helps.
-Dave.
------------------------------------
http://www.componentone.com
------------------------------------
|
|
|
|
|
|
.h files are header files.
"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
|
|
|
|
|
Hi there,
Anyone up for challenge to to create a winform combo control dropdown that has visual que's like that of sharepoint combo dropdown control.
Thanking you in advance.
Sk8tZ
|
|
|
|
|
http://www.rentacoder.com
|
|
|
|
|
Along with the rentacoder site that the other CP member suggested, you can also try the Article Request Forum: http://www.codeproject.com/script/Forums/View.aspx?fid=1641[^]
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
|
|
|
|
|
Hi Friends .
I want to add a MaskedTextBox into column of DataGridView.
how can i do.
please help me.
if you cound not try then
msgbox("you will lose")
else
msgbox("you can change yourself")
end if
|
|
|
|
|
|
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
|
|
|
|