|
|
Hi, I am working on a web parts custom control which consists of a label,a list box and a context menu. I bounded the context menu to the list box such that when the user rightclicks on the list, the menu will appear. However, when the menu appears, it is blocked by the listbox. Hence only part of the menu is visible. How do I make the menu to be totally visible and to appear 'on top of' the listbox?
A code snippet is below:
list1.ID = "List1" 'List's ID
listitem1.Text = "Testing" 'List's items
listitem2.Text = "Event"
list1.Items.Add(listitem1)
list1.Items.Add(listitem2)
Me.Controls.Add(label1) 'Add the list as part of the custom ctrl
menu1.ID = "ContextMenu1"
menuitem1.Text = "Acknowledge" 'Menu Items
menuitem2.Text = "Testing"
menu1.ContextMenuItems.Add(menuitem1)
menu1.ContextMenuItems.Add(menuitem2)
menu1.BoundControls.Add(list1) 'Attatch menu to the list
Me.Controls.Add(menu1) 'Add the menu to the custom control
The code is in Visual Basic 05. Advice will be appreciated!
|
|
|
|
|
Hi Guys....
i want to show MS Chart in PrintPreview Control & then print it.
How can i do this???Please Help.
Thanks for ur suggestions in advance.....
|
|
|
|
|
Are we talking about VB6 here?
If so, then a really easy method would be to call the PrintForm method. But this means no print preview.
Otherwise, you're going to have to implement something much more complicated. The MS Chart control itself doesn't provide a nice way to print or save it. A lot of people copy the chart image to the clipboard and then print/save it, but that's bad practice.
|
|
|
|
|
Hello again.
I just dug up some of my old VB6 MS Chart code. You can get an image of your MS Chart control by taking a screenshot of your form. You can then use this image in your print preview.
Taking a screenshot of your form involves calls to the Win32 API. Luckily, Microsoft has already written a VB6 Module that will do the work for you. You'll probably want to call its CaptureForm() function.
http://support.microsoft.com/kb/q161299[^]
|
|
|
|
|
Hi Guys!
need some help
i want to change the color of rows in datagridview if the value of 1 column is say "Disabled". i m fetching data from sql server 2005 in dataset and binding the dataset with the grid.
Can any one help me in guiding me how to do it.. any hints.
i m using VS.NET 2005
abhinav
|
|
|
|
|
You have to add a handler for the datagridview (cellpainting)
That event will be fired for every cell in your datagridview. There you must check the columnindex to see if thats the column you are checking, if it is, change the color of the row
Private Sub dgvDetalle_CellPainting(ByVal sender As Object, ByVal e As DataGridViewCellPaintingEventArgs) Handles dgvDetalle.CellPainting
If e.RowIndex >= 0 And e.RowIndex <= Me.dgvDetalle.Rows.Count - 1 Then
If e.ColumnIndex = 2 Then
If e.Value = 1 Then
'code to change color of current row
Me.dgvDetalle.Rows(e.RowIndex).DefaultCellStyle.BackColor = Color.AliceBlue
End If
End If
End If
End Sub
I hope that helps, if you havent done it yet
Alexei AR
Theres always a better way
Look for it
|
|
|
|
|
Someone Help !
Can I get all vb.net keyword string array at run time.
Thank in advance.
!alien!
|
|
|
|
|
I don't think so...
Search google for "Visual Basic .NET keywords" and put that in your array.
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I don't think you can see them using public methods. At least I've never found anything in the VisualBasic classes that exposes it.
But, using Reflection, you might be able look inside the Microsoft.VisualBasic.VBCodeGenerator class, which is a Friend class in the Microsoft.VisualBasic namespace, and see the Private Shared ReadOnly member field keywords . This is an array of String arrays, but is not filled in until an instance of the VBCodeGenerator class is instantiated.
I'm short on time right now, so I can't build an example, but I've given you some hints of what to search for.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello again..
Need help if there is another way on how to display the day of the week using a variable that has a datatype of intger...
this is how i get the integer value...
intmonth = cdDateTime.picker.value.year
intday = cdDateTimePicker.value.year
intYear = cdDateTimePicker.Value.Year
and i have to use the integer value to get the day of the week...
cddate = Cdate( cstr(intmonth) + cstr(intday) + cstr(intyear).DayofWeek).ToString
this produce an error....nid healp ... thank you:->
|
|
|
|
|
Here is the simple way.
Dim objDate as Date
objDate=New Date(intYear,intMonth,intDay)
Messagebox.Show(objDate.DayOfWeek.ToString)
!alien!
|
|
|
|
|
welbert wrote: how to display the day of the week using a variable that has a datatype of intger
Dim DayOfTheWeek As Integer
DayOfTheWeek = Now.DayOfWeek
Or
you want to get it from the DateTimePicker
Dim DayOfTheWeek As Integer
DayOfTheWeek = cdDateTimePicker.Value.DayOfWeek
chatura
|
|
|
|
|
Hi everyone ,
How do I get the all sql server names using vb.net code? I would like to fill it into combobox. Thank in advance.
!alien!
|
|
|
|
|
hello everybody:
i am new to VB.net I have to design a custom web server control which validates itself on client side and server-side. which means that i would not use a seperate custom validator for validation, but it should be a part of the custom control itself.and this validation would be done on clientside first, and incase javascript is off in browser then validation is done on server side.
The description of the custom control is as follows:
its a date control which has 3 dropdowns(dds).one for month, second for days and third for days.it has two properties isDOB(boolean) and getDate which returns the date in the format mm/dd/yyyy.
one method setDate which takes the string inn the format mm/dd/yyyy.This will set date according to the input string.
can somebody point me to the rite direction.any help would be deeply appreciated.
Thanks
Cheers!
AB
Aamir Babar
|
|
|
|
|
Anyone using the free add-in for VB 2005? Very slick!
Kevin
|
|
|
|
|
Kevin McFarlane wrote: Anyone using the free add-in for VB 2005?
Can you provide a link?
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Can you can give us a quick opinion of what you like most and least about it?
I haven't tried it yet, so I'm very interested in hearing your opinion.
|
|
|
|
|
I've used and most of the time it works and has some nice features such as when you extract a method, you get to select where in your code you want it to to instead of the IDE deciding as C# does. The link for those who want it is http://msdn.microsoft.com/vbasic/downloads/tools/refactor/[^].
Warning though sometimes I rename a variable ( a private or protected one) and let the refactor happen and VS blows up or hangs.. forever. But it's not bad enough for me to uninstall so it's well worth the price - free. )
Al
|
|
|
|
|
Al Ortega wrote: Warning though sometimes I rename a variable ( a private or protected one) and let the refactor happen and VS blows up or hangs.. forever.
That's a bummer. The renaming variables part was the feature that I most wanted.
|
|
|
|
|
It doesn't happen all the time, it's strange. If I had it renaming public property that was used throughout a very large program, I would understand it taking a while, but on private/protected class level ones...?
I think they (DevExpress) give it away to entice you into purchasing their pro version.
Still the alternative is doing it by hand or if your brave (I'm not) Find and Replace. Does anyone know of any other free ones (serious question)?
|
|
|
|
|
Well, I've only played with it a bit, rather than used it in anger. But it's very "visual."
See this short video:
http://msdn.microsoft.com/VBasic/Downloads/Tools/Refactor/3MinDemo.Aspx[^]
Main reason I tried it is because I just started a contract in VB .NET (2003). My main language thus far has been C#, so I thought I'd better get a bit of VB practice before starting the contract, and thought I'd use the new IDE, even though the contract is 2003.
Kevin
|
|
|
|
|
Wow! Very cool video. Thanks for the link Kevin.
|
|
|
|
|
I wonder if anyone can point me in the correct direction. I am going to have to run a crystal report via VB.Net for the first time. Can anyone give me any ideas or good pointers or even any articles to view. Any help would be greatly appreciated.
|
|
|
|
|
http://www.vbdotnetheaven.com/UploadFile/sushmita_kumari/Report201242006041121AM/Report2.aspx?ArticleID=d6184a33-ee75-495d-9ef3-1fe3e9a24632
!alien!
|
|
|
|