|
I want to change the color of the small box in the checkbox.
If I change the backcolor to white, it does not affect the small square inside the checkbox border on which we actually click.
Can anyone please tell me how can I change that color ?
|
|
|
|
|
I dont' believe you can simply by setting a property. You can extend the checkbox by creating a class and inheriting the checkbox. In the OnPaint event you could fill that square in yourself with a different color. However, you'll have to draw the check mark as well.
|
|
|
|
|
when a row is double clicked in datagrid ,the row data should display in textboxes.waiting for help.
thank u
-- modified at 1:03 Tuesday 13th March, 2007
|
|
|
|
|
Generally whenever you are displaying data in a grid it contains a unique value in a particular column. So, put the unique column number
Formname.textboxname.text=val(datagrid.textmatrix(datagrid.row,colnumber)
Then you can write a query for displaying other things using this unique vale
I hope this can solve your problem
Priya
|
|
|
|
|
I am making a windows application in VB.NET 2003 and ACCESS.I want to set reminders through a windows form.I want a popup message to be shown whenever I login to my system or a pop-up is shown whenever the reminder time is equal to my system clock.
Please help me.
Live life to the fullest
|
|
|
|
|
what coding do i do so that my textbox take values only between two integers say 0 to 45, any value other than this range gives error..
thanks
|
|
|
|
|
Try a NumericUpDown control. If that's not an option you could do this a few ways. For one, in the validating event you could check the value to see if it's okay. Unless you want to disable copy/paste you'll probably have to validate the entry here anyway. The other option would be in the keypress event. You could check if the keypress was a number, if it's not you wouldn't allow it. Secondly, if it's a digit and the current contents including the new digit is > 45 you could dissallow it. If you prevent '-', this would take care of anything less then 0 so you wouldn't really need to worry about it.
|
|
|
|
|
Hi
You Can Use This Code.
(Text1 is your TextBox)
Private Sub Text1_Change()
If Val(Text1.Text) > 45 Then Text1.Text = 45: MsgBox "Please Enter A Number Between 0 to 45", vbCritical
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 48 To 57: '0 To 9
Case 8: 'Back Space
Case 13: 'Enter
Case Else: 'Other Keys
KeyAscii = 0
End Select
End Sub
Good Luck
Mogtabam
|
|
|
|
|
thanks people...
for sending me solutions...
regards..
manni
|
|
|
|
|
Hi,
Could anybody tell me what I'm doing wrong with this:
Dim objDsExistingXRatesFile As DataSet<br />
objDsExistingXRatesFile = New DataSet("StoredRates")<br />
objDsExistingXRatesFile.ReadXml("xrates.xml")<br />
<br />
Dim MaxRows = objDsExistingXRatesFile.Tables("StoredRates").Rows.Count<br />
MsgBox(MaxRows.ToString)
Its giving me an error on the 'Dim MaxRows' line saying, "NullReferenceException was unhandled" - "Object reference not set to an instance of an object" - advising me that I need to use the New command.
It isn't null, because I can put the data into a DataGridView to test it!
|
|
|
|
|
Try:
Dim MaxRows as integer = objDsExistingXRatesFile.Rows.Count
|
|
|
|
|
Check that the table "StoredRates" actually exists in the objDsExistingXRatesFile dataset.
It looks like the name of your dataset is "StoredRates", not the table. Not sure what the table name would be as that may depend on your XML.
|
|
|
|
|
Thanks for your replies.
I did a message box for objDsExistingXRatesFile.Tables(0).TableName.
I assumed I was assigning the table name when I did the line objDsExistingXRatesFile = New DataSet("StoredRates").
.... obviously not
|
|
|
|
|
Hello!
I have installed Vista Ultimate and I needed to use IMAPI 2.0 in my project. It suppose to be a referance COM object. However, when I browsed .NET references to add it, I couldn't find it listed there. I looked at the .NET and COM section but all I saw was the following COM objects related to imapi.
imapijpn.1.0, imapikor 1.0 and imapi_JK 1.0. Which one is the one that I should add it to my project?
The project is about writing CD and DVD in VB.net. ANY IDEA PLEASE?
Thank You.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
what I have used for cd writing in VB is found here[^].
I hope that is of help to you
|
|
|
|
|
Thanks I knew it before I posted the message. What I am looking is the name of imapi com object.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
What I reference in my code is the com wrapper from the article I referenced.
the imapi objects that are used are imapi.sys and imapi.exe, but with out knowing how to interface directly to COM using a wrapper is preferable.
-- modified at 22:55 Sunday 11th March, 2007
|
|
|
|
|
Hi guys. I'm begginer to VB.Net. My main form has a main tab control. And when it run 1-imports from Access DB name and numbers of main tab control's Tab and add tabs to existing empty tabcontrol.
2-Also i wanna my program after creation of tabs, imports tab pages from an external files.But I donno how i can perform second step.
Please give me a solution with an examle or tutorial.
|
|
|
|
|
Please be specific about what you mean getting tab pages from external files? Do you want to show the content of file inside a tab page when you open a file?
Dynamically you can add tabs to tab control. Lets get your answer and then see what i can do about it...
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Oh.Yes. You'r right.
I have a program that based on some tabs that those names and number obtain from db.
You can think i wanna update my program and wanna just change some dll or everything that you think is possible.
How i can change tab pages contents, i mean i wanna set each tab's page's contents from a .dll or something else.
means how i can fill each tab's page with my favorite contents such as text boxes,labels and other activeX's.
|
|
|
|
|
First, I am sorry to say that your english is not good enough because I am confused by your posted messages.
You can't add any textbox, label or etc. to tabpage in runtime but tab page to tabcontrol. You can simply place a textbox or a richtextbox inside a tabpage and then open the specific file and assign its content to that textbox.
This sample code can give you some insight how to open a file and add it to richtextbox in tabpage.
Scenerio: First, place a button on the form and OpenFileDialog control, place a richtextbox control inside the tab page and then place the code below for button's click procedure. Then run it and press the button. This sample works for only rtf. extensioned files.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
OpenFileDialog1.Filter = "*.rtf|"
OpenFileDialog1.RestoreDirectory = True
OpenFileDialog1.ShowDialog()
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
RichTextBox1.LoadFile(OpenFileDialog1.FileName)
End If
End Sub
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
JUNEYT wrote: You can't add any textbox, label or etc. to tabpage in runtime
I'm not exactly sure if adding controls dynamically to the tabpage is required by the OP, but I just wanted to clarify that you certainly can add controls to a tabpage at runtime if required.
|
|
|
|
|
Yes you are right! I made a mistake in adding it to tabcontrol not tab page.
Dim myt as new textbox
TabControl1.TabPages(0).Controls.Add(myt)
is working...
Thanks.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Tnx for you replies but my problem is diffrent.
My main program have to have dinamic tabs which i want add tab pages to them. But i want that these tab pages exist in a external class object or every thing that is possible. Like a user defined control.
You assume my program have a button that:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
<br />
If myVar=0 then<br />
externalform.visible=true<br />
Else<br />
form2.visible=true<br />
End If<br />
<br />
End Sub
and this externalform should be imports in header.Means i want to this form be a dll or every thing that is possible.Cause this form change every week. But i donno how i perform this.
|
|
|
|
|
KOKEMO wrote: Email at : Fight_2_death@hotmail.com
You'll get plenty of spam from this, but no replies, I would think.
There are free and commercial libraries that do this, and there's a ton of info online about how to draw onto a bitmap in .NET.
But, if you have literally *no* idea, perhaps you need to learn a little more prior to tackling this project ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|