|
Thank you, Steve.
The problem was that I had the wrong version of framework, I was using ver. 1.0 When It should have been v1.1, on the other hand, I did not know that security play such a major roll in vb.net.
|
|
|
|
|
Can somebody tell me why? everytime I finish a project, I have such a hard time to run it in different computers? what am I missing? what am i doing wrong?
I am so embarrassed about asking these kind of questions, but I am new using vb.net, actually I had no formal training, or schooling, all I have is all kinds of books (not all the books are good) and a lot of good help from guys like you, on these message boards.
According to most of the books, one should be able to build a solution and run it anywhere, but everytime I do that; for instance, I try to setup my new app in a different computer and I have all kinds of problems. What am I missing?
Most of the computers where I tried to setup my app. have ".net framework" (according to microsoft that's all I need)but I still have all kinds of problems.
I do not think that I have to installed Vb.net in every computer, Do I?
P.S. Please do not be an A.H. if
you consider this to simple.
|
|
|
|
|
JimClark68 wrote:
Most of the computers where I tried to setup my app. have ".net framework"
But do they have the same version of the .NET Framework installed that you developed the app against? For instance, If you're using Visual Studio .NET 2003, you'll be using the .NET Framework version 1.1. If the computer only has the .NET Framework 1.0 installed, this could cause you some problems.
Other than that, there's really not much else you need to install, short of keeping the computers up to date with the latest security patches.
JimClark68 wrote:
I do not think that I have to installed Vb.net in every computer, Do I?
No, not at all.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you Dave. You have been great help!
|
|
|
|
|
I am trying to write a tooltip that can display a hyperlink or change the color of one word in a string. This what I have
Dim MainString As String = "This word is a different color"
Dim stringToChangeColor As String = "word"
Dim range() As CharacterRange = {New CharacterRange(MainString.IndexOf(stringToChangeColor), stringToChangeColor.Length)}
Dim format As New StringFormat
format.SetMeasurableCharacterRanges(range)
format.FormatFlags = StringFormatFlags.NoClip
Dim region(1) As Region
region = e.Graphics.MeasureCharacterRanges(MainString, Me.Font, New RectangleF(0, 0, Me.Width, Me.Height), format)
Dim rec As New RectangleF
rec = region(0).GetBounds(e.Graphics)
Dim stringB As New StringBuilder
stringB.Append(MainString)
stringB.Replace(stringToChangeColor, " ", stringB.ToString.IndexOf(stringToChangeColor), stringToChangeColor.Length)
rec.Width = rec.Width + 10
rec.X = rec.X - 2
rec.Y = 0
e.Graphics.DrawString(stringB.ToString, Me.Font, Brushes.Black, 0, 0)
e.Graphics.DrawString(stringToChangeColor, Me.Font, Brushes.Red, rec.X, rec.Y, format)
' e.Graphics.DrawString(MainString, Me.Font, Brushes.RoyalBlue, 0, 20)
The problem I have is that I have to manually set the number of spaces in the stringB.Replace.
Is there another way?
Please help.
Thanks in advance
Mark Thibodeaux
|
|
|
|
|
My suggestion of the Rich Edit control will be no use in this case. I hope someone else may be able to help.
...Steve
|
|
|
|
|
Thank you for trying
Mark Thibodeaux
|
|
|
|
|
When connecting a combobox to a datasource like this:
ComboBox2.DataSource = DataSetMainWindowStatusCodes1
ComboBox2.DisplayMember = "statuscodes.name"
And then when you select an item in the combobox how can you automatically allow the record pointer in the combobox's datasource to move to that selected record?
|
|
|
|
|
ComboBox2.ValueMember = <yourkeyvalue>
In combobox2_selectindexchanged(...) get the key value and look it up in your table.
Hope this helps...
Bill
|
|
|
|
|
Thanks.
When looking up the value in the table I use a For Next loop to go row by row until I find the sought after row. That works but is there a better way to do this?
|
|
|
|
|
I have a combobox on a form with the following code:
ComboBox2.DataSource = DataSetMainWindowStatusCodes1
ComboBox2.DisplayMember = "statuscodes.name"
ComboBox2.ValueMember = "statuscodes.statuscodesid"
When an item is selected in the combobox the following code runs:
DataViewUserNames.RowFilter = "departmentsid=" & ComboBox2.ValueMember.ToString
This code throws the error "Cannot find column [statuscodes.statuscodesid]"
If I use this code instead it works fine:
DataViewUserNames.RowFilter = "departmentsid=" & "1"
How can I use the ComboBox2.ValueMember for the DataViewUserNames.RowFilter?
Thanks in advance for any help on this issue.
|
|
|
|
|
dptalt wrote:
ComboBox2.ValueMember = "statuscodes.statuscodesid"
dptalt wrote:
ComboBox2.ValueMember.ToString
So you set the property to be statuscodes.statuscodesid, then you asked for it back, and it hasn't changed.
dptalt wrote:
How can I use the ComboBox2.ValueMember for the DataViewUserNames.RowFilter?
Get the value of the selected item, instead of the valuemember name itself.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks, that helped.
(I'm a newbee migrating from FoxPro.)
|
|
|
|
|
I have a single selection ComboBox with only 4 entries which is contained in a VSFlexGrid. I need to have the ability to replicate 1 of the selected entries across several of the rows. It will show up correctly if I manually click within each of the affected cells. Can this be automated???
|
|
|
|
|
Anyone out there know a slick way to get a label to display a decimal numeric value, limiting the value to only 1 decimal place to the right of the decimal? I.e.- show 125.5 instead of 125.5665 I've tried designating as currency and single but the only way I've limited at all was to assign the numeric value to a string with limited length, i.e.- x as string * 5. But while this correctly displays the 125.5 it also allows something like 32.34 to display as well.
Any thoughts?
Will
|
|
|
|
|
Dim MyDecimal As Double = 125.5665
MyLabel.Text = MyDecimal.ToString("#.#")
will display 125.6
********************************************
Dim MyDecimal As Double = 125
MyLabel.Text = MyDecimal.ToString("#.#")
will display 125
********************************************
Dim MyDecimal As Double = 125.5665
MyLabel.Text = MyDecimal.ToString("#.0")
will display 125.6
********************************************
Dim MyDecimal As Double = 125
MyLabel.Text = MyDecimal.ToString("#.0")
will display 125.0
|
|
|
|
|
You ROCK!
Thank you so much for the assistance!
Don't suppose you know what size I should make my forms so they fit PDA screen? I know my PDA has a 240x320 pixel screen but the form sizes in twips. Can't figure out the conversion.
Thanks again for the decimal solution.
Will Wingfield
The ResQ Shop
|
|
|
|
|
If you are using VB.NET which I assume from your previous post, then all control sizes should already be expressed as pixels. VB.NET does not support any coordinate system other than pixels.
In VB6 there are TwipsToPixelsX and TwipsToPixelsY functions that will convert twips to pixels based on the current screen resolution.
|
|
|
|
|
How do I get a list of the machine names of all the machines connected to my network?
Thanks in advance
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Why on earth would anyone vote on a question asked?
...Is it so obvious that I'm stupid for asking the question?
Mad stuff.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
how to use stored procedures in acces, coding
|
|
|
|
|
Access is not a Relational Data Base.
forget the stored procedures, views, triggers and so on, they don't exist...
(and consider also your reasons of using such software instead of a real RDBMS)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Access does not have "Technically" such a thing as Stored Procedures or Views, but, it allows you to treat your Queries as "such" I am assuming that you do not want to have the SQL text in your code, and that you have created the corresponding Query in your Access DB.
To call an existing query, you can use this:
Command.commandtext = "[Query name]"
DO NOT FORGET THE []
If you are using parameters, your must create and append them to the command object before the .Execute call.
|
|
|
|
|
I have an aspx page("for generating report") in which i have 4 table tags("" for heading of report etc.) and the rows and cells to them are dynamically created based on the values retrieved from database in the form od dataset which results 4 tables. For ex:
Dim HeaderRow = New HtmlTableRow
Dim HeaderCell = New HtmlTableCell
HeaderCell.Height = "5"
HeaderCell.Attributes.Add("ALIGN", "center")
HeaderCell.Attributes.Add("CLASS", "ins-popupheader")
HeaderCell.InnerText = ds.Tables(0).Rows(0)("Title") & " - Content Report"
HeaderRow.Cells.Add(HeaderCell)
tblHeader.Rows.Add(HeaderRow)
Now the problem is.... I have an anchor tag on my report page "Export as CSV" on click of which I need to export the contents of the page to an Excel sheet.
I tried with the following code:
Response.ContentType = "application/vnd.ms-excel"
Response.AppendHeader("Content-Disposition", "attachment;filename=Ebom.xls")
Dim dsExport As DataSet = Session("Contentds")
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
Dim dgGrid As New DataGrid
Dim i As Integer = 0
For Each table As DataTable In dsExport.Tables
dgGrid.DataSource = dsExport.Tables(i)
dgGrid.DataBind()
dgGrid.RenderControl(hw)
i = i + 1
Next
' Write the HTML back to the browser.
Response.Write(tw.ToString())
' End the response.
Response.End()
It generates an Excel sheet but the format is not clear and I am missing some contents of my report page. I request if any one can help me in directly exporting the contents of my report page to Excel.
A quick response is appreciated........
Thanking in anticipation
--smitha
Smitha Bavandla
|
|
|
|
|
HOW Can i do Editable Listview?
|
|
|
|