|
Hi!
i want to export data from Datagrid or (Dataset) in Excel or (CSV) in windows forms using Visual Basic .net
will someone guide me?
|
|
|
|
|
If you type 'excel' and 'export' into the search field of CodeProject you get several hits to start off:
http://www.codeproject.com/info/search.asp?cats=3&cats=4&cats=5&searchkw=excel+export&author=&sd=11%2F15%2F1999&ed=1%2F1%2F2005
They are mainly in C# but even if you you dont know C# at all you should be able to convert it to VB.Net by yourself.
|
|
|
|
|
Hi,
Wishing you all a very happy and prosperous new year.
I state my problem ,
My server socket looks for data from connected clients.
When a data is found it is stored in a file for further processing.
It's all happening but the first command being recieved from any client is being ignored as the server is just checking for a particular command.
Imagine the scenario ...i sent the data via the code:
Winsock1.SendData strTemp
in the server file it comes like
oÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌtÿÖperator play anil.pcm 2001
Though the second command onwards comes as is sent.
This has become a real headache to me..i dont understand how to get read of it.
Awaitng a quick reply
Thanks in advance.
amit mishra
|
|
|
|
|
I have an old OCX written several years ago (in C?). I have re-written this in VB6. It works fine, but the GUID is different to the original.
How can I make the GUID the same as that in the original OCX ?
|
|
|
|
|
what is a simple call to put into a click event to make sure the application fully terminates
VB 6.0 application
thanks
|
|
|
|
|
jlawren77 wrote:
what is a simple call to put into a click event to make sure the application fully terminates
What are you trying right now (maybe you could post a small code snippet)? If you say that the application keeps running it seems that there is some kind of processing (or wait) still going on.
Best regards
Dennis
|
|
|
|
|
its a simple unload me because all other forms have been unloaded through code.
I'm in my Fedora Os now, i'll post an update in a few.
|
|
|
|
|
jlawren77 wrote:
its a simple unload me because all other forms have been unloaded through code.
And that does not work? Because unloading all forms is the usual way of exiting a VB 6 application. You could use the End Statement[^] but doing so could have side effects as this statement causes the application to exit without triggering any Unload, QueryUnload, and Terminate events.
Best regards
Dennis
|
|
|
|
|
Hi all:
I consider myself an advanced beginner so decided to challenge myself.
What I'd like to do is create an app gives the user the ability to create tables similar to those found in Word. The app would NOT tie to a database, so grid control is out. Anyway, my understanding is that the grid control cannot support multiline, so that makes it impractical anyway. Table cells would be created on-the-fly (e.g. the user presses tab and a cell is added)
Here are some of the solutions I've considered:
1. Multiple text boxes - depending on the keypressed, a new text box either beside or below the previous box (to start a new row or column). The problem I see with this is that I'd have boxes of varying sizes, each with its own scrollbars.
2. Table control in asp.net - This appears to give me the table functions I need, but I don't want to require IIS be running. Would IIS be necessary?
3. System.Web.UI.HTMLControls (Table Class) - Could I in some way use these with the Active X Web Browser (shdocvw.dll) to run a VBScript and implement the controls.
4. System.Drawing classes - yikes, don't even want to go there
I know the generousity of the community and there will be those who write, "Here's a code snippet for you to use, try this..." While I appreciate that, right now, I'd just like someone to give me some hints, not specific answers.
TIA for any help.
Norm
|
|
|
|
|
Hi!
The DataGrid doesnt have to be bound to a database. It can be bound to several data structures. This cann be a DataTable which is generated programmatically without any reference to a database. It also has the possibility to write own ColumnStyles. These are classes that handle the way columns look in your grid. This way also multilined data can be presented.
1. Dont do this. Every textbox gets a window handle. This will be far too much overhead.
2. If you arent going to write a webapp dont use it.
3. In my opionen: No good idea. Again too much overhead and somehow ...hmmm... crumpy.
4. Why? The Drawing namespace can be fun. Although it can get very complicated.
I think you should take a WinForms grid control. You could take the DataGrid and bend it to your will or use some other grid (there is a cool one here on CodeProject - search for VirtualGrid).
My hint: Experiment a bit with the alternatives. This way you can get a feeling what can be done with each method and how long you will be sitting coding it.
|
|
|
|
|
Thanks Robert. Your comments were what I needed. I appreciate them. I'm going to look into the datagrid control more. It sounds like it has more potential than I thought.
Thanks again.
Norm
|
|
|
|
|
Hi Guys,
i m making a simple Counter in Asp.net with using Session,its Function is very Simple,Mean
User click on Button and then TextBox show the Count with One Increment,
Every Thing is Going Fine,But Problem is, if User Press "Refresh" button from Browser,So it shows one increment in Count.
So how can stop this.
Code is :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Count As Integer
If Not Session("Count") Is Nothing Then
Count = Session("Count")
End If
Count += 1
TextBox1.Text = Count
Session("Count") = Count
End Sub
Thanx in advance
Sajjad
|
|
|
|
|
I fill a combobox with data comes from database. I want user can choose a null value but I don't want add a null value to database( impossible) help me
Then I kiss Ur eyes and thank God we're together
|
|
|
|
|
Add the value DbNull.Value to your combobox.
Then in your update you can use isnull(@param, '') to change it to blank.
|
|
|
|
|
how to disable a column in databound grid???somebody plizz help me....
besah
|
|
|
|
|
Create another datatable that includes only columns you want to bind to datagrid. then bind the datagrid to that table ( that's all I can do);P
Then I kiss Ur eyes and thank God we're together
|
|
|
|
|
You have to create TableStyles and ColumnStyles. Read the docs or search on CodeProject to find examples (it cannot be explained in 2 or 3 sentences).
|
|
|
|
|
My Question is :
I need to select word in RichTextBox and then to select frst next word in text until end of text,but my code select all word then i try to change my code and i got all word selected in text if somebody know how the code shall to look??
tnx
|
|
|
|
|
Dim Search, Where ' Declare variables.<br />
' Get search string from user.<br />
Search = InputBox("Enter text to be found:")<br />
Where = InStr(RichTextBox1.Text, Search) ' Find string in text.<br />
If Where Then ' If found,<br />
RichTextBox1.Select()<br />
RichTextBox1.SelectedText = Where - 1 ' set selection start and<br />
RichTextBox1.SelectionLength = Len(Search) ' set selection length.<br />
Else<br />
MsgBox("String not found.") ' Notify user.<br />
End If
This is maybe need to some body like me so tnx for quick help
|
|
|
|
|
Hi,
I keep getting "The path is too long after being fully qualified. Make sure path is less than 260 characters." when I run the following recursive directory search. Could you tell me how to fix it?
Sub DoRecursiveSearch(ByVal dirname As String, ByVal filespec As String, ByVal recurseDirs As Boolean)
Dim fname As String
Dim fi As FileInfo
For Each fname In System.IO.Directory.GetFiles(dirname, filespec)
fi = New FileInfo(fname)
msgbox(fname)
Next
' recurse on subdirectory if so requested
If recurseDirs Then
For Each dname As String In System.IO.Directory.GetDirectories(dirname)
lnDirCount = lnDirCount + 1
DoRecursiveSearch(dname, filespec, recurseDirs)
Next
End If
End Sub
|
|
|
|
|
Without remapping things I don't think you can. The path limitation is not part of VB but rather the OS. Try accessing the file manually at the filesystem level to see...
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
You can't fix this. This limitation is based in Windows, not VB or the .NET Framework.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi
Using this article:
http://www.codeproject.com/useritems/ByPassAutomation.asp
I've managed to run MS Word from within a VB.Net form... All very nice.
The problem I'm having is this. My project spec involves me having a form with an explorer style navigation window to find files to open (treeview control). The treeview must be visible at all times so that the user can choose other files from the treeview rather than within MS Word using the File>Open dialogue.
Word runs correctly the first time with the file selected from the treeview. If I choose another file, word crashes out and I get Unhandled exception:
"An unhandled exception of type 'System.InvalidOperationException' occurred in system.dll
Additional information: Process has exited, so the requested information is not available."
Can some one give me an idea of how to get it so I can continue clicking within the treeview as many times as I like, having word close the current file and open the new one without the above exception occuring.
McS.
|
|
|
|
|
I use the following code to open Ms word and it could open many word file as you want:
' Open file directly into Ms word...<br />
Dim appWordRtf As Word.Application = _<br />
New Word.Application<br />
<br />
appWordRtf.Documents.Open(FilePath)<br />
appWordRtf.Visible = True
Try to use this code, if it is possible, could you post your code that error on this forum? GOOD LUCK
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Thanks for the response.
I'm having a problem with:
Dim appWordRtf As Word.Application = _
New Word.Application
It is saying 'Type Word.Application not defined'
The error received with regard to the intial post and its first response is:
"An unhandled exception of type 'System.InvalidOperationException' occurred in system.dll
Additional information: Process has exited, so the requested information is not available."
McS.
|
|
|
|