|
I am unable to implement drill down in vb.net. pls help me, if possible send the code.
|
|
|
|
|
What are you trying to drill down into ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
Has anyone tried trapping the sort event of a datagrid in VB.NET?
We can set the AllowSorting property to true.Then when the column header is clicked,the rows get automatically sorted in ascending and descending order.
However this event isnot listed in the events dropdown list.
I need to trap this event for:
Im populating the grid using a temporary datatable.When the grid is sorting records, I need the temporary table also to be sorted in ascending or descending order.
Any help on this would be gr8.
|
|
|
|
|
implementing this is going to more of a headache than it's worth. when you click the column headers of a datagrid, the underlying datasource's (so long as you are binding to a datagrid, datatable, or dataview) dataview property is going to be re-sorted as well. just use that to access your data.
or, another option is to use the bindingmanagerbase and currency manager to access the particular data you want.
hope this helps.
-jim
|
|
|
|
|
Hello All,
I am new to VB.NET programming, Does anybody know how to display more than one value in Listbox (the same like listbox display in MS Access where you can select a table/query in row source property and display any values you want). Thank you
dw1928
|
|
|
|
|
Yes, it's a property on the listbox, I think it's called 'Details' ( that's the enum value, not the property to set ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi, do you have any suggestion on the problem that I have. Thank you
|
|
|
|
|
i think if you have an IList (arrayList, SortedList, etc...), you could pass it to the DataSource property of your listBox. use it accordingly with DiplayMember and ValueMember...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi,
How to mark / highlight some selected text in doc or txt ?
Plz help me.
Regards,
Shri
|
|
|
|
|
what do you call "HighLighting a text" ??
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
How do I delete a control programatically in vb.net?
|
|
|
|
|
Hi jlart
No doubt I'll get told off by someone for doing it this way......
A control can be treated like a Window. In fact - it IS a window. You can delete it by getting a handle on the control, and invoking an API call like this:
1. Let's assume you want to delete a button called 'Button2' from your form.
2. Make sure you have the following Imports statements at the beginning of your program:
Imports System
Imports System IO
Imports System.Diagnostics
3. Add the following declaration. This is just a call to the API32 .dll:
Declare Function DestroyWindow Lib "user32" (ByVal hWnd As Long) As Long
4. Then - all you need to do to delete a control is call the following code from within your calling procedure:
Dim hControl As Long = Button2.Handle.ToInt32 'Button2 is used in this example
DestroyWindow(hControl) 'This deletes button2
5. This is very crude, but it works. Obviously be sure to embed suitable exception handlers; I just gave this code as an example - not as a definitive or perfect answer
Hope that helps a bit. No doubt someone will point out a MUCH better way without the API function call
Sophie
|
|
|
|
|
Sorry - typo in the last.....
It should read
Imports System.IO
|
|
|
|
|
Hi jlart, you haven't been very specific but I assume that you want to have a control removed from a Form. The Form, and any other object that can contain controls, has a Controls collection that exposes the typical collection methods.
This code would remove a TextBox called TextBox1 from the current Form.
Me.Controls.Remove(TextBox1)
I hope that is what you are trying to do. If possible do not make WIN32API or any other Platform Invoke calls that are not actually necessary. Keep your code "managed code" as much as possible.
|
|
|
|
|
much thanx to all. works great
|
|
|
|
|
You would "remove" the control using the parent controls Remove method
For example:
<br />
'If a control on your form or parent controls is called "C" then<br />
'To remove or "delete" the control.<br />
<br />
Me.Controls.Remove(C)<br />
<br />
'Or if the control to be removed is contained in a child control of parent then<br />
<br />
Me.childcontainercontrol.Controls.Remove(C)<br />
<br />
'If you no longer need the removed control then set it to nothing<br />
C = Nothing<br />
Hope this helps
|
|
|
|
|
I'm fairly new to VB.NET, so forgive me if the answer to this question is simple:
I'm trying to control a Windows process from within my own application, so need to know the handle of the thread of the launched process. If I run an application such as Notepad which I start with:
Process.Start("Notepad.exe")
..... I can find enough information about the Notepad application by using a ProcessModuleCollection and a ProcessThreadCollection to get a handle ('hWnd') for the Notepad thread - but I admit the code I need to use for that is not very pretty if many instances of Notepad are running. However - at least I can gain external control over Notepad (and some other applications).
However, if I substitute "Explorer" in the code to replace "Notepad" to try to access and control Windows explorer, every time I try to get ANY information, I get an unhandled Exception even at the stage of declaring the process collection - which I suspect is a Windows security issue (??). If I handle the exception, the best information I can get from the exception is the message "Process has exited, so the requested information is not available".
I need to get the Handle of the Explorer thread that I have launched so that - for example - I can programmatically resize, move (or whatever) the specific Explorer window that I have launched.
Can anyone help me through the maze, please? (Or am I just not seeing the wood for the trees ?)
Sophie
|
|
|
|
|
Hi all !
I am using C1FlexGrid to contain the data that have gotten from database. Some data have date type So I want to order them. I cant't seem control. Help me !
|
|
|
|
|
I have data coming in on the RS232 line that is terminated with a <CR><LF> sequence. Is there way using the MSComm Control to have it not read the buffer until it has the entire line?
I have tried the following but it still doesn't get the entire line all the time:
While MSComm1.InBufferCount = 0
Wend
strResponse = MSComm1.Input
This was more easily done using the old-style INPUT LINE command:
OPEN "COM1:9600,N,8,1,LF" FOR RANDOM As #1
LINE INPUT #1, strResponse
CLOSE #1
Is there a way to have the MSComm control behave in this way?
Thanks,
Tim
|
|
|
|
|
Hello,
I am fairly new to vb.net programming and I am trying to figure out how to calculate the number of days between 2 dates. I have some Idea i.e. convert each date to a julian date and then subtract the 2 and wala! Are there date functions in .net that will convert a date to julian dates automatically?
Thanks in advance
|
|
|
|
|
You don't need to do any conversion. Look up the DateDiff function.
Robert
|
|
|
|
|
It worked like a champ!
Thanks,
Tom.
|
|
|
|
|
if u are on here, and a visual basic 6.0 pro then can u email me quickly on leeansell@btinternet.com
Cheers
Lee Ansell
|
|
|
|
|
Anonymous wrote:
if u are on here
If I'm reading this, where else would I be ?
Anonymous wrote:
and a visual basic 6.0 pro then can u email me quickly on leeansell@btinternet.com
Lee, you have two options. Personally, I consider VB6 beneath me, but if you want help on this sort of level, expect to pay for it, perhaps rentacoder is a good place to start. On the other hand, if you're willing to come back here and check for answers, and to ask specific questions as an active participant in this forum, I'm sure there are plenty of people willing to help you. Saying 'if you know VB6, email me' is just plain rude. Why would anyone do that, if you're not even willing to state your question, or to check here for responses ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi to you all,
as in subject, i'm trying to find dates as "first tuesday of the month" or "last monday every two months" how can i do it in vb.net
i found something in vb6 but can't find equivalents in vb.net
thanks in advance!
Fule2Run
|
|
|
|