|
Hi Guys...
i'm new to vs2008 express, after creating a simple app for testing, i wanted to create the setup package for installing....
i dont see the option for creating the setup package as in the case of vs2005...
does anyone know how to create this package or maybe the menu option that starts the wizard?
thanks in advance
Anoop Brijmohun
|
|
|
|
|
VS 2008 Express does not have setup projects. You will have to create your own (from scratch), find a third party solution, or dish out for a paid version of VS 2008.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Check out Inno Setup[^]. It's small, fast, free, and easy to learn.
|
|
|
|
|
I'll second the use of Inno Setup
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
thanks, much appreciated!
|
|
|
|
|
In Winforms, a TextBox has a MultiLine Property as well as an AcceptsReturn property.
But when used in a DataGridView via the DataGridViewTextBoxColumn, there are no such properties.
So at the moment, my DataGridView has a label, informing users to press Shift+Enter for a new line.
There must be a better way to accept the Return key for a new line in a textbox within a DataGridView.
modified on Thursday, October 2, 2008 7:09 AM
|
|
|
|
|
Assuming a datagridview control named dgvRows:
Private Sub dgvRows_KeyDown( _
ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) _
Handles dgvRows.KeyDown
' Detect the Enter key
If e.KeyCode = Keys.Return Then
' Determine the currently selected column
Select Case dgvRows.SelectedCells(0).ColumnIndex
Case 0
' Determine the currently selected row
Select Case dgvRows.SelectedCells(0).RowIndex
Case 0
' Code to manipulate the selected cell at (0,0)
Case 1
' Code to manipulate the selected cell at (0,1)
'
'
Case 99
' Etc
End Select
Case 1
'
'
Case 99
End Select
End If
End Sub
|
|
|
|
|
Hey George
Thanks for the answer but that doesn't work, I've tried it with the Keypress event as well.
The problem is that that event only fires when the entire cell is selected, but if the focus is on the control inside the cell, - in this case, the TextBox - the event doesn't fire for any keys pressed.
If you got this to work I would appreciate some more help.
Kind Regards
|
|
|
|
|
I love a worthwhile challenge. It's taken all morning, but, I think I've got it. The key is overriding the ProcessCmdKey method in the DataGridView class so that the Enter key can be detected and Ctrl^Enter substituted.
Step 1 is to add an extended DataGridView to your project where the override takes place.
Public Class myDataGridView
Inherits DataGridView
Protected Overrides Function ProcessCmdKey( _
ByRef msg As System.Windows.Forms.Message, _
ByVal keyData As System.Windows.Forms.Keys) _
As Boolean
'** When the Enter key is pressed in the textbox column,
'** substitute Ctrl^Enter
If keyData = Keys.Enter Then
SendKeys.SendWait("^{ENTER}")
Return True
Else
Return MyBase.ProcessDialogKey(keyData)
End If
End Function
End Class
Unfortunately, this means the DataGridView control will have to be completely built and positioned on the form at runtime to take advantage of the override. Here's the simple code I used for testing. You will have to flesh it out for your purposes.
Public Class Form1
Dim dgv As New myDataGridView
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
'** Add the datagridview to the form
Controls.Add(dgv)
dgv.Left = 10
dgv.Top = 10
'** Add a textbox column
Dim dgvCol As New DataGridViewTextBoxColumn
With dgvCol
.HeaderText = "Text Column"
.Name = "chdrTextCol"
.Width = 130
End With
dgv.Columns.Add(dgvCol)
dgvCol = Nothing
'** Add a row
dgv.Rows.Add()
End Sub
End Class
|
|
|
|
|
Hi
Thanks for all your trouble.
I tried your code, had to set the ".DefaultCellStyle.WrapMode = True".
But when I press enter, the focus remains on the current cell, and the cell becomes selected, instead of adding a line into the textbox.
It does however fire on the key event within the textbox, which is by far the closest I have come to a solution so far.
How would I go about substituting the Enter key with a Shift^Enter, instead of a Ctrl^Enter? Seeing that when using the datagridview, pressing Shift+Enter gives the desired result, but not pressing Ctrl+Enter.
I don't totally understand the "^{ENTER}" syntax and how it works...
|
|
|
|
|
|
Im new to VB.NET. Working on developing Windows Application using Visual Studio 2003 platform. I have a target from which I read data and show it in a datagrid. I need to convert this datagrid into a spreadsheet which can either be a MS .xls file or OpenOffice .xls file.
Thanx in advance
|
|
|
|
|
|
Ashfield is right, there are plenty of articles on this site and on the net, but here is one possible approach (which is working for me, while you read this):
1. make an excel file with some demo data and make it look the way you want your app to make it look.
2. save it as xml
3. open this xml file in vs2003, so you can see what it looks like
4. use some loops to write the values from your dataset and the xml tags into a big string.
5. write the string to an xls file with a StreamWriter
6. Bob's your uncle.
Because you wrote the file as an xml file, it can easily be opened with Excel, OpenOffice or any other program that can usually read Excel files.
Good luck.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Thanx Ashfield and Johan for replying..
I got the problem fixed. What Iv done is that I write the data from Datagrid into CSV file format which then can be opened in both MS Office and Open Office Spreadsheet.
|
|
|
|
|
Hi
I am having a little bit of trouble understanding how to read property values from objects in the Active Directory that are not included in the standard DirectoryServices.AccountManagement namespace which is new in .NET 3.5 ..
At current this is the only reference I have which I am not following.. not a very good C# guy!
http://costoda.blogspot.com/2008/01/getting-information-from-active.html[^]
If someone could suggest some examples on how to do the same as that link above in VB instead that would be awesome!
Kind Regards,
Tim
|
|
|
|
|
Does anyone know anything on this topic? I don't want to sound impatient!
Tim
-------------------------
Visit my Blog:
http://tim.raimes.com.au/
|
|
|
|
|
|
That tool was really useful, especially since it was free as I have seen expensive tools that do similar things! Thanks for that.
Ok So this has helped me build the code into a VB Class.. I am stuggling with implementing the same class into my project.. as it might get confusing to go deeper into the actually code I am working on can someone provide a rough example of how to "get" and "set" values on custom properties constructed in a class. My memory needs refreshing..
Does that make sense?
Tim
-------------------------
Visit my Blog:
http://tim.raimes.com.au/
|
|
|
|
|
|
Hello. I did something that would be considered very stupid to any experienced programmer and now would like to revert to the code in my last successful build. I am able to run the last successful build, how can I move forward in editing the associated code? Is this possible? I am using Visual Basic 2008 Express. My frustration is growing!
- Craig
"That rug really tied the room together."
|
|
|
|
|
Sorry. Not unless you are using some form of source control where you can check out a past version. There are two kinds of people out there. Those that have already experienced what you're going through - and those who will.
Look into using subversion, or some other version control software.
If it's just a small change you need to see, you might can open the old build in Reflector and see if you can get what you need...
|
|
|
|
|
You might want to look at version control tools, such as subversion.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
hai all,
i am new to .net, i have been given a task to create a vb.net app To send an email from the application using smtp gateway. Can anybody help me with this, kindly reply me as soon as possible.
Thanks in advance.
|
|
|
|
|
take a look at the system.net.mail classes
there you can create a Mailmessage and send it with a smtpclient
(you will have to set the host of the smtpclient)
something like
imports system.net.mail
dim msg as new mailmessage(senderemail,recemail,subject,body)
dim client as new smtpclient
client.host="smtpserver"
client.send(msg)
(This is from memory so could be it doesn't compile but it should help you on your way)
|
|
|
|