|
God.. never occured to me it would be that easy! OK, will have a go... After the football (soccer - European Cup final...)
cheers
F
|
|
|
|
|
hi ,
i have four checkboxes
can i provide four events in a single handler
Private sub checlick(byval sender as system.object, byval e as system.eventArgs)checkbox1.checkchanged , checkbox2.checkchanged , checkbox3.checkchanged , checkbox4.checkchanged
end sub
|
|
|
|
|
Yes, for instance
Private Sub CheckBox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles CheckBox1.CheckedChanged, CheckBox2.CheckedChanged, CheckBox3.CheckedChanged, CheckBox4.CheckedChanged
MessageBox.Show(sender.Name)
End Sub
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.
|
|
|
|
|
|
yes Nilish , You can handle these four event from a single handler
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
|
|
I don't really have a link. I have an article I wrote on VS setup projects:
http://www.codeproject.com/dotnet/Win_App_Setup_Project.asp[^]
And the post you are refering to was a copy of the forum discussion at the bottom of that article.
If you take the code in the link and put it in like a batch file. You can create a shortcut to that batchfile and assign whatever icon you want to it.
Hope that helps.
Ben
|
|
|
|
|
Hi Kubben,
Thanks for that lovely article.But that elaborates only the installation process and not the uninstallation process programatically with the help of uninstall icon.
|
|
|
|
|
Ok, I havn't tried this, but these steps should work.
Create a new file with a bat extension.
In the file put this line:
msiexec /x {460FB517-716B-4495-B3CE-44799A75D868}
Note the GUID must be the one from your setup project productcode.
Add this file to the application folder of your setup project so it will get installed.
Add your icon you want to associate with the bat file.
Set the icon for the bat file.
Create a shortcut to this file in the program menu.
That should pretty much work.
Ben
|
|
|
|
|
By the way there is nothing wrong with having the user go to control panel and then using add/remove program to uninstall your programs.
If you are writing a software package that people are buying I can see why you want an uninstall icon, but if it is for an internal company install, I find I would rather not give the employee an icon they might click on by mistake that will uninstall my program.
Ben
|
|
|
|
|
Sir, Yes ... U r right.Control panel is also the way.and I am very sorry for specially calling u to attend this thread.Sir, The thread u provided , was very good one for the installation process.Actually it is requited to povide the uninstallation file along with the installation file.
Thanks
-- modified at 9:07 Wednesday 23rd May, 2007
|
|
|
|
|
hi,
My application can check at startup whether particular font is installed on client system or not. if particular font is absent then i want to that my application install this font to client system(not just copy).
have any idea about how can i perform this thing in vb.net or link that provide appropriate information about this thing using vb.net(not VB)
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
If you are using something like InstallShield, you could create an installer for the font, then from your program execute the install, should the font be missing.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
hi steve ,
i want to install font programmatically(using vb.net) .
i don't want to create installer for this thing.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
At installation time is the most appropriate time to do this. Installing a font is only done through Win32 functions. It's NOT a simple matter of just copying a file to a folder.
If you really want to do this, Google for "how to install font vb.net c#".
|
|
|
|
|
Now I am doing one project in vb.net with ms access for offline test.
In my project I had one command button named as "View Questions". If I Click this button first five question will be displayed with four optional answers.
Question are displayed using Label control. And the optional answers are displayed using radio button. These controls are created at the runtime only not at the design time. The radio button are grouped into Panel and the panel control name is pane1. the radio button names are radio1,radio2,radio3,radio4.
Now problem is if I click radio1, it goes into database and check the answer in the database and if it is right answer the mark stored in the another field of the same table should returned and it should be added in the separate variable.
Anotherthing I didn't use array concept to create controls. (i.e) I had use the following line to create the conrols at runtime.
Public radio1, radio2, radio3, radio4 As Windows.Forms.RadioButton
Public pane1 As Windows.Forms.Panel
Public label As Windows.Forms.Label
label = New Label()
radio1 = New RadioButton()
radio2 = New RadioButton()
radio3 = New RadioButton()
radio4 = New RadioButton()
pane1 = New Panel()
Me.Controls.Add(label)
Me.Controls.Add(pane1)
Me.Controls.Add(radio1)
Me.Controls.Add(radio2)
Me.Controls.Add(radio3)
Me.Controls.Add(radio4)
pane1.Controls.Add(radio1)
pane1.Controls.Add(radio2)
pane1.Controls.Add(radio3)
pane1.Controls.Add(radio4)
AddHandler radio1.Click, AddressOf GenericClick
AddHandler radio2.Click, AddressOf GenericClick1
AddHandler radio3.Click, AddressOf GenericClick2
AddHandler radio4.Click, AddressOf GenericClick3
According to the no of question that are stored in the database, the controls will be created. Controls are creted by using forloop.
-- modified at 7:16 Wednesday 23rd May, 2007
Regards,
G.Manivannan M.Sc.,[IT],
Software Programmer (VBA),
AKUVA Infotech, Bangalore.
|
|
|
|
|
So....what's the question?
|
|
|
|
|
"If I click the answer(ie) radio button, it should check the database for answer and if the answer is correct it should add the mark to a separate variable". This is my problem in my project.
Marks are stored along in the question table.
question table contians the fields such as Qno, Question, Ans1,Ans2,Ans3, Ans4, CorrectAnswer,Mark.
Regards,
G.Manivannan M.Sc.,[IT],
Software Programmer (VBA),
AKUVA Infotech, Bangalore.
|
|
|
|
|
The users marks should not go into the questions table. They should go into a table that lists the users ID, the question ID, and the users mark for that question. The correct answer should be obtained from the question table. You can update this table when the user clicks on an answer on the form.
After that it's a simply matter of retrieving the correct mark from the question and the users mark from this new table.
|
|
|
|
|
My next problem, I had created the radiobutton only at the runtime of the form. All radio button for all questions are added on a panel at each and every qestions. There is no common name or id for radiobuttons. How can i get the value of checked radiobutton.
Regards,
G.Manivannan M.Sc.,[IT],
Software Programmer (VBA),
AKUVA Infotech, Bangalore.
|
|
|
|
|
You create them and wire them up the same way the designer generated code does.
Dim newRadioButton As New RadioButton
With newRadioButton
.Location = blah
.Text = blah
blah
blah
End With
Panel1.Controls.Add(newRadioBUtton)
|
|
|
|
|
Creating radiobutton is not my problem? Only getting the value of all runtime radiobuttons at the single button click is my problem. see the following code:
Public Function Createcontrols(ByVal intidx As Integer)
radio1 = New RadioButton()
radio2 = New RadioButton()
radio1.Top = r1
radio1.Left = x
radio1.Height = 25
radio1.Width = 150
radio1.Text = ans1
Me.Controls.Add(radio1)
radio2.Top = r1
radio2.Left = r2
radio2.Height = 25
radio2.Width = 150
radio2.Text = ans2
Me.Controls.Add(radio2)
Panel1.Height = 25
Panel1.Width = 850
Panel1.Left = x
Panel1.Top = p1
Me.Controls.Add(Panel1)
Panel1.Controls.Add(radio1)
Panel1.Controls.Add(radio2)
end function
For intIdx = 0 To 4
Createcontrols(intIdx)
Next
by the above code i can get 5 radio1 and 5 radio2 on 5 panel control.
It is perfectly working.
But the problem is if I check any one radio button on all panel controls at a time (ie)keeping all 5 radio button's checked = true and then click submit button to get all checked radio button values.(ie) I have to print all checked radio buttons text in the msgbox.How can i print?
Regards,
G.Manivannan M.Sc.,[IT],
Software Programmer (VBA),
AKUVA Infotech, Bangalore.
|
|
|
|
|
G.Manivannan wrote: Public Function Createcontrols(ByVal intidx As Integer)
Well, you're defining a Function but not returning a value. Make this a Sub.
Next, inside this code, assign a Name to each of the radio buttons
radio1.Name = "Radio1"
or whatever name you want to use.
All you have to do is enumerate the controls on the panel:
Public Function GetRadioButtonChecked(ByVal controlName As String) As Boolean
For Each c As Control In Panel1.Controls
If TypeOf c Is RadioButton Then
Dim rb As RadioButton = DirectCast(c, RadioButton)
If rb.Name = controlName Then
Return rb.Checked
End If
End If
Next
Return False
End Function
|
|
|
|
|
Hello guys,
i am using vb.net 2.0,my problem is
when i converting a word file in to htm file then it will slow down the performance why???
is any one have speedy execution code then please suggest me..
help please,
-koolprasad2003
Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|