|
Impossibile trovare informazioni sullo schema per l'elemento 'http://schemas.microsoft.com/winfx/2006/xaml/presentation:Window'
Che succede?
|
|
|
|
|
This is an English-speaking board...
OK. What did you expect this URL to show you? It's not a site to see the documentation on XAML, or anything else for that matter.
|
|
|
|
|
Well,
I'don't understand what's append.
I try to generate a WPF windows application with 4 windows form but in the property Application, starting object, i don't see any of my forms.
VB2005 show this error
Impossibile trovare "Sub Main" in "UTENTI". (Unable to show SUB MAIN)
Can someone help me?
|
|
|
|
|
I have seen a similar error where the main method is missing. This method is used to call the Application.Run() method to start the application.
Hope that helps.
Ben
|
|
|
|
|
How about asking your question in English, please
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I'm looping thru a datagrid - as it loops I want the application to do calculations and place that result in a column for each record. - Right now it is only doing the calculation for the first record and placing that result in the column for every record
How do I get it to go to the next record.
This is my loop - any suggestions
<code>
Dim cm1 As CurrencyManager = Me.BindingContext(dgOrderReport.DataSource, dgOrderReport.DataMember)
Dim dv As DataView = CType(cm1.List, DataView)
'I thought this will go to each record and do the calculations if row is not equal to dv.count which is a record counter
For row = row To MyDataSet.Tables(0).Rows.Count - 1
If row = dv.Count Then
Exit For
Else
'Do time calculation for each row for column 3
x = DateDiff("d", dgOrderReport.Item(row, 3), System.DateTime.Today)
dc.Expression = x
'add one to row to go to next record
row = row + 1
x = 0
'Label1.Text = row
End If
Next row</code>
I can not figure out what I'm missing - what do the world suggests
Thank You
|
|
|
|
|
A quick lesson on loops
For loops go around a specific number of times.
For aNumber = startNumber To endNumber
For Each loops go around a collection of items
For Each item In items
KA National Marker wrote: For row = row To MyDataSet.Tables(0).Rows.Count - 1
Try:
For row = 0 to MyDataSet.Tables(0).Rows.Count - 1
KA National Marker wrote: row = row + 1
Would never be needed in any type of For loop as the loop itself updates the counter. What you are actully doing here is skipping an extra row.
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
Thanks Colin For the help I've changed the code around - but I'm still getting the same results in my tables - I can not get it to go the next record to do the calculations - Its only giving the column the results of the first calculation for each record - I've tried using both examples below:
example1.
<code> Dim Dr as Datarow
For Each dr In MyDataSet.Tables(0).Rows
x = DateDiff("d", dgOrderReport.Item(row, 3), System.DateTime.Today)
dc.Expression = x
x = 0
Next
' I beilive I need to assign dr.Item a value somehow - but I cannot figure it out</code>
example2.
<code> Dim cm1 As CurrencyManager = Me.BindingContext(dgOrderReport.DataSource, dgOrderReport.DataMember)
Dim dv As DataView = CType(cm1.List, DataView)
For row = 0 To MyDataSet.Tables(0).Rows.Count - 1
If row = dv.Count Then
Exit For
Else
x = DateDiff("d", dgOrderReport.Item(row, 3), System.DateTime.Today)
dc.Expression = x
x = 0
End If
Next row</code>
What am I missing.
Thank You
|
|
|
|
|
In the first example, you're not actually setting "row" to anything, so you'll be pulling the same item into "x" every iteration. In the second, well, here, let me just post some code...
Dim count As Integer = Math.Min(dv.Count, MyDataSet.Tables(0).Rows.Count)
For row As Integer = 0 To count - 1
x = DateDiff("d", dgOrderReport.Item(row, 3), DateTime.Today)
dc.Expression = x
Next row
Now I only have one question... What's "dc"? You never assigned it in any of your code. You probably want to set it equal to a particular cell before setting its expression.
|
|
|
|
|
Thanks Ian for the Reply I've figured it out...
Ian Shlasko wrote: What's "dc"?
DC is a datacolumn - and Expression is a class with in it. I will never ever - use datacolumn.expression again well maybe if I was using to columns in the grid it would of worked fine...
My resolution was so simple that it does not surprise me - the easier things are they harder they come
Dim cm1 As CurrencyManager = Me.BindingContext(dgOrderReport.DataSource, dgOrderReport.DataMember)<br />
Dim dv As DataView = CType(cm1.List, DataView)<br />
Dim row As Integer<br />
For row = 0 To MyDataSet.Tables(0).Rows.Count - 1<br />
If row = dv.Count Then<br />
Exit For<br />
Else<br />
x = DateDiff("d", dgOrderReport.Item(row, 3), System.DateTime.Today)<br />
dgOrderReport.Item(row, 7) = x<br />
x = 0<br />
End If<br />
Next row
Such a easy resolution - One day I will need datacolumn.expression but on that day I will forget all about it...
Thank You
|
|
|
|
|
hi everybody,
I hope you can help me.
I have a small 3 layer solution. It works but now I want update my DAL using patterns.
I will use data application block from enterprise library 3.1. It's my first time using patterns and I don't know how start.
My questions are:
Must I use the code from quickstart?
What section of code?
What is the best way to personalize the code to my DAL?
A small example will be excellent.
Thanks in advance
Si crees que estás vencido, vencido estás.
|
|
|
|
|
jesusnaun wrote: I will use data application block from enterprise library 3.1.
Why?
The reason I'm asking is that I feel that many people use the Enterprise Library without really knowing why. They seem to think it is a good idea, but when you ask them the answer doesn't necessarily add up. Sometimes a lightweight DAL is enough. So far, I've come to the conclusion that the Enterprise Library is, for many projects, just bloatware.
jesusnaun wrote: It's my first time using patterns and I don't know how start.
I'll bet it isn't. The way you have said that tells me that you don't quite know what patterns are... Yet.
I found when I first read a book on patterns many years ago that I'd actually been using many without realising. And I'll bet that you have been using many patterns as well without realising.
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
Thanks for advice.
you are right but I believe that code from enterpise library could be personalized, so, Only I will use code's section. Not all.
My DAL works but If now I need improvements and aditional funcionalities, I must build another DAL.
Data Acces Appilcation, I believe, will show me code useful for future necessities.
Do u have any example showing how enterprise library works wiht DAL.
Thanks...
Si piensas que estás vencido, vencido estás.
|
|
|
|
|
Colin Angus Mackay wrote: The reason I'm asking is that I feel that many people use the Enterprise Library without really knowing why. They seem to think it is a good idea, but when you ask them the answer doesn't necessarily add up.
Yep. So many projects I've worked on and the only part of the entire enterprise library that has been used is ".ExecuteDataSet()". Makes me laugh every time.
|
|
|
|
|
Mark Churchill wrote: So many projects I've worked on and the only part of the entire enterprise library that has been used is ".ExecuteDataSet()".
So you've seen my company's DAL?
Actually, we're not that bad - but I don't think we use the EL very well at all.
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
Say I wanted to use CSS to change the background color of every page in my Web Browser control to blue (I know you can do this by setting the documents back color property, but that won't work with every stylesheet) and all the links' colors to green. How should I go about doing this?
I found two solutions on MSDN - one looked overly complicated and the other just didn't work. And they were both in C# .
My best guess was:
Private Sub wbBrowser_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles wbBrowser.DocumentCompleted
With wbBrowser.Document
Dim elmCSS As System.Windows.Forms.HtmlElement = .CreateElement("style")
elmCSS.InnerText = _
"body {background-color: blue;}" & vbNewLine & _
"a:link {color: green;}" & vbNewLine
.GetElementsByTagName("head").Item(0).AppendChild(x)
End With
End Sub
or
Dim elmCSS As System.Windows.Forms.HtmlElement = .CreateElement("link")
elmCSS.SetAttribute("rel", "stylesheet")
elmCSS.SetAttribute("href", "Styles.css")
.GetElementsByTagName("head").Item(0).AppendChild(elmCSS)
Thanks in advance for any help.
-- modified at 9:12 Friday 24th August, 2007
-- modified at 7:24 Saturday 25th August, 2007
|
|
|
|
|
This question belongs in the ASP.NET forum because it has nothing to do with VB.NET.
|
|
|
|
|
Sorry if I posted it in the wrong forum - but this has nothing to do with ASP.NET (though maybe the Winform forum).
Anyways I found the answer:
The problem was I was using a relative path to point to the same folder as my app, when the CSS file wasn't there.
|
|
|
|
|
Hi,
I need to develop a custom Find Function for a page displayed in a webbrowser control. I cannot use the default IE one as we dont want to display the microsoft interface. I have tried the following method, but with problems:
wBrowser.Document.Body.InnerHtml = Replace(wBrowser.Document.Body.InnerHtml, wordToFind, "" + wordToFind + " ", , 1)
The problem is that it finds and replaces the word whereever it appears, even if its in an image's alt tag. I just want to highlight the text. Is there any way of doing this?
Thanks,
Ahmad
|
|
|
|
|
I think you want to use InnerText instead of InnerHtml
|
|
|
|
|
Anybody working in reports????
Facing problem with multiple subrepotrs in single main report.
Hi,
Can anybody help me how to use two sub reports in single main report?
I am using two sub reports in my main report.
From main reprot one parameter is passed to each sub report.
In Reportviewer1_SubreportProcessing event I am adding the datasource after checking the reportpath(From the event args.)
But I am getting the Subreport could not be shown as error message...
Hope you are getting my scenario...
-Saran
-- modified at 3:15 Tuesday 28th August, 2007
|
|
|
|
|
Hello!
I have a panel (Panel1) on a form (Form1) and i want that on every click on panel a new control should be added to panel. But it dont work! Any Help?
Public Class Form1
Dim counter As Integer
Public Class JOJOBA
Inherits System.Windows.Forms.Control
Dim myControl As Control
Public Sub New()
myControl = New RichTextBox
End Sub
End Class
Private Sub panel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel1.Click
counter = counter + 1
Dim aNC As Control
aNC = New JOJOBA
aNC.Name = "Control" & counter
aNC.Top = Panel1.Top + 20
aNC.Left = Panel1.Left + 20
aNC.Height = 30
aNC.Width = 150
Panel1.Controls.Add(aNC)
aNC.Visible = True
aNC.Show()
End Sub
End Class
colgateas900197
|
|
|
|
|
The code to add the control to the panel works. It's the control you're adding that's all screwed up.
You created a custom control that contains another control, a RTB. The problem is that your custom control doesn't paint any kind of visible interface, so you don't see anything.
What are you expecting this custom control to do??
|
|
|
|
|
Whole scnario is:
A form has a panel. As many times i click on the panel a new control (an RTF Textbox) should be added to the panel at the point where i have clicked. All text boxes added to the panel should have the capability that when i select a textbox i can drag it on the panel.
In order to drag controls i think, i should have event handlers for each textbox.
If you please guide me how can i acheive this? Please give me a basic program structure and some instructions to do so....
Thanks in advance!
colgateas900197
|
|
|
|
|
First, you're code doesn't add a RichTextBox to the panel. It's adding a custom control that doesn't show anything. Just because inside your control you instantiate a RTB doesn't make it visible automatically.
Your control inherits from Control. Don't. Inherit from RichTextBox instead.
Public Class MyRTB
Inherits RichTextBox
You might want to read my article on creating your own runtime-movable controls here[^]. Though, I've never done it with a RichTextBox. You could end up with some goofy side-effects.
|
|
|
|