|
Thanks alot, it is up and running.
John
|
|
|
|
|
Doubtful, I'd say you should go and look in a 2nd hand bookstore for old VB6 books. MS doesn't support VB6 anymore ( for quite a while ), so no help there. www.vbcity.com is an option.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi I am tring to read a xml in vs2005
my code keeps raising the following exception: "illegal characters in path"
here is the vb.net code:
Dim ds As New DataSet
ds.ReadXml(xmlout)
ds.WriteXml("C:\Query.xml")
here is the xml doc i am reading:
<?xml version="1.0" encoding="Windows-1252"?>
<InvQuery Language='05' CssStyle='' DecFormat='1' DateFormat='01' Role='01' Version='6.0.015'>
<StockItem>
<StockCode>R00001</StockCode>
<Description>POLYCARBONATE</Description>
<LongDesc>POLYCARBONATE RAW</LongDesc>
<AlternateKey1/>
<AlternateKey2/>
<Version/>
<Release/>
<StockUom>KG</StockUom>
<AlternateUom>GM</AlternateUom>
<ConvFactAltUom> 1000.000000</ConvFactAltUom>
<ConvMulDiv>D</ConvMulDiv>
<OtherUom>KG</OtherUom>
<ConvFactOthUom> 1.000000</ConvFactOthUom>
<MulDiv>M</MulDiv>
<StockAndAltUm>N</StockAndAltUm>
<PartCategory>B</PartCategory>
<Supplier/>
<ProductClass>POLY</ProductClass>
<Buyer/>
<Planner/>
<TraceableType>N</TraceableType>
<MpsFlag>N</MpsFlag>
<SupercessionDate/>
<DrawOfficeNum/>
<Ebq> 1.000</Ebq>
<DockToStock> 0</DockToStock>
<ManufLeadTime> 0</ManufLeadTime>
<TariffCode/>
<UserField1/>
<UserField2> 0.00000</UserField2>
<UserField3/>
<UserField4/>
<UserField5/>
<LeadTime> 5</LeadTime>
<WarehouseToUse>B2</WarehouseToUse>
<GrossReqRule>I</GrossReqRule>
<EccUser/>
<Mass> 0.000000</Mass>
<Volume> 0.000000</Volume>
<PriceCategory>A</PriceCategory>
<PriceMethod>C</PriceMethod>
<CycleCount> 0</CycleCount>
<TaxCode>B</TaxCode>
<OtherTaxCode/>
<ListPriceCode/>
<SerialMethod>N</SerialMethod>
<KitType>N</KitType>
<BulkIssueFlag>N</BulkIssueFlag>
<AbcClass/>
<StockMovementReq>Y</StockMovementReq>
<ClearingFlag>N</ClearingFlag>
<AbcAnalysisReq>Y</AbcAnalysisReq>
<AbcCostingReq/>
<CostUom>KG</CostUom>
<StockOnHold/>
<StockOnHoldReason/>
</StockItem>
<WarehouseItem>
<Warehouse>B2</Warehouse>
<Description>BRAESIDE RAW MATERIALS</Description>
<QtyOnHand> 14320.580</QtyOnHand>
<AvailableQty> 14320.580</AvailableQty>
<QtyOnOrder> 333500.000</QtyOnOrder>
<QtyInInspection> 0.000</QtyInInspection>
<MinimumQty> 0.000</MinimumQty>
<MaximumQty> 0.000</MaximumQty>
<QtyOnBackOrder> 0.000</QtyOnBackOrder>
<QtyAllocated> 0.000</QtyAllocated>
<MtdQtyReceived> 15000.000</MtdQtyReceived>
<MtdQtyAdjusted> -4418.896</MtdQtyAdjusted>
<MtdQtyIssued> 19229.420</MtdQtyIssued>
<YtdQtySold> 0.000</YtdQtySold>
<PrevYearQtySold> 209807.530</PrevYearQtySold>
<QtyInTransit> 0.000</QtyInTransit>
<QtyAllocatedWip> 83114.600</QtyAllocatedWip>
<MtdQtySold Height='000' Top=' 25535'> 0.000</MtdQtySold>
<MtdQtyTrf> 0.000</MtdQtyTrf>
<UserField1/>
<UserField2/>
<UserField3/>
<DefaultBin/>
<UnitCost> 4.96228</UnitCost>
<SalesQtyByMonth>
<SalesQty1 Height='061'> 15575.800</SalesQty1>
<SalesQty2 Height='062'> 15755.304</SalesQty2>
<SalesQty3 Height='065'> 16712.316</SalesQty3>
<SalesQty4 Height='063'> 16025.252</SalesQty4>
<SalesQty5 Height='061'> 15491.400</SalesQty5>
<SalesQty6 Height='072'> 18400.806</SalesQty6>
<SalesQty7 Height='067'> 17022.060</SalesQty7>
<SalesQty8 Height='044'> 11324.508</SalesQty8>
<SalesQty9 Height='052'> 13304.464</SalesQty9>
<SalesQty10 Height='100'> 25535.280</SalesQty10>
<SalesQty11 Height='095'> 24366.672</SalesQty11>
<SalesQty12 Height='091'> 23143.720</SalesQty12>
</SalesQtyByMonth>
</WarehouseItem>
<WarehouseItem>
<Warehouse>N2</Warehouse>
<Description>NORTHMEAD RAW MATERIALS</Description>
<QtyOnHand> 36998.000</QtyOnHand>
<AvailableQty> 36998.000</AvailableQty>
<QtyOnOrder> 148500.000</QtyOnOrder>
<QtyInInspection> 0.000</QtyInInspection>
<MinimumQty> 0.000</MinimumQty>
<MaximumQty> 0.000</MaximumQty>
<QtyOnBackOrder> 0.000</QtyOnBackOrder>
<QtyAllocated> 0.000</QtyAllocated>
<MtdQtyReceived> 35500.000</MtdQtyReceived>
<MtdQtyAdjusted> 825.408</MtdQtyAdjusted>
<MtdQtyIssued> 52752.000</MtdQtyIssued>
<YtdQtySold> 0.000</YtdQtySold>
<PrevYearQtySold> 406309.904</PrevYearQtySold>
<QtyInTransit> 0.000</QtyInTransit>
<QtyAllocatedWip> -46109.144</QtyAllocatedWip>
<MtdQtySold Height='000' Top=' 55367'> 0.000</MtdQtySold>
<MtdQtyTrf> 0.000</MtdQtyTrf>
<UserField1/>
<UserField2/>
<UserField3/>
<DefaultBin/>
<UnitCost> 5.01040</UnitCost>
<SalesQtyByMonth>
<SalesQty1 Height='074'> 41175.410</SalesQty1>
<SalesQty2 Height='100'> 55367.712</SalesQty2>
<SalesQty3 Height='055'> 30331.044</SalesQty3>
<SalesQty4 Height='058'> 32120.580</SalesQty4>
<SalesQty5 Height='044'> 24530.728</SalesQty5>
<SalesQty6 Height='067'> 37250.100</SalesQty6>
<SalesQty7 Height='063'> 34816.440</SalesQty7>
<SalesQty8 Height='063'> 35081.756</SalesQty8>
<SalesQty9 Height='058'> 32207.516</SalesQty9>
<SalesQty10 Height='073'> 40260.420</SalesQty10>
<SalesQty11 Height='065'> 36142.216</SalesQty11>
<SalesQty12 Height='064'> 35711.832</SalesQty12>
</SalesQtyByMonth>
</WarehouseItem>
</InvQuery>
Any help would be appreciated
Cheers
|
|
|
|
|
thedom2 wrote: ds.WriteXml("C:\Query.xml")
How does VB handle \, do you need to do \\, as in "c:\\query.xml" ? You do in C#.
thedom2 wrote: xmlout
I guess you need to step through the code, see what's in this variable, and see if this or the next line is blowing up.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: How does VB handle \, do you need to do \\, as in "c:\\query.xml" ? You do in C#.
Not true for VB. Single "\" work just fine. Doubles are required in C\C++\C# unless the string escaped by some literal character, @"" or L"" or whatever...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I make a project by VB with Crestal Report
it is good and working good but when i change the project place to another it works but the reports give false values it seams to be there is a link between the crystal and the database so I must chang the link when I change the project place after I doing that the project after changing its place works by good reports
the question :
is there any way (code way) to change the link between crystal and database without opening evry report and instead of change it manually?????????????
soly
|
|
|
|
|
I don't know if I understand your question, but I believe you are saying this: You have a crystal report at location X and it's set to work with a database at location X. Then you make a copy/move your crystal report to location Y and it doesn't work because it is still pointing to the database at location X (not the copy/moved version at location Y). And each time you move/copy things you have to open the crystal report and edit it to point to the new location.
Unfortunately I don't know how to work around this. I mean, in code you can set a crystal report's datasource to a datatable object (which you can program to get from any database at any location) like this:
reportDocument1.SetDataSource(dtMyDataTable)
as long as the datatable parameter matches what you used to design the crystal report this works.
...but if you are talking about moving whole projects I don't know how to help you. Sorry.
|
|
|
|
|
I was told that I can text to cell phones from my pc or at this web sight....but can't get an answer..can someone help my retarded ass??
|
|
|
|
|
Do you mean in a program, or are you asking a general, consumer level question in a programming forum ?
There used to be web sites that would send SMS, I dunno if there still are.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have a datagrid whose datasource is a dataset.
<br />
Dim DiagCmd As DbCommand = db.GetStoredProcCommand("p_Get_All_Diags")<br />
Dim dsDiags As DataSet = New DataSet("Diagnostic_Codes")<br />
dsDiags = db.ExecuteDataSet(DiagCmd)<br />
dgDiags.DataSource = dsDiags.Tables(0).DefaultView<br />
The above works.....
Now, I want to be able to click a button and move an item from one grid to another... sounds simple enough.... The code to do that is below....
<br />
Private Sub btnNxt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNxt.Click<br />
<br />
dsAuto.Tables(0).Rows.Add(dsDiags.Tables(0).Rows(dgDiags.RowSel - 1).ItemArray)<br />
<br />
End Sub<br />
and this works.... my problem is if I click on the columnheader and change the sort order it will move the item based on how they originally appeared in the grid.
ie. if the grid starts with A-Z and I click the header making it Z-A.... if I then click Z(Which is now at the top) and click my btnNxt it will move A.
Anybody help is greatly appreciated...
-Kay
|
|
|
|
|
Hi, does anyone know how to code the 'memory' buttons on a calculator
(memory =, - , Clear, and Recall) in VB.
Thanks a bunch.
|
|
|
|
|
That smells like homework to me. Google 'variables VB.NET'.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I would like to create a dataset that indicates whether co-ordinates on a grid are occupied. How do I set the composite primary key to be made up of xPosition and yPosition?
Then I need to populate the values with 'false' initially and mark them as true through a function. How do I populate the values?
Is the size of the dataset incremented automatically as I increment the values or do I have to do it explicitly?
Public Class Plateau
...
Private Sub initDataSource()
'Create PlateauPostions
'define attributes
With plateauPositions
.Columns.Add("xPosition", System.Type.GetType("system.int32"))
.Columns.Add("yPosition", System.Type.GetType("system.int32"))
.Columns.Add("occupied", System.Type.GetType("System.boolean"))
End With
'enforce composite primary key on xPosition and yPosition
... ??
End Sub
Jon
|
|
|
|
|
I have a problem using the picturebox. i am creating a game and i am using my character as a picturebox. i am moving him using the (w - a - s - d) format. now .. when i am pressing the "D" .. the code is doing this:
picSnake.Location = new point(picsnake.location.x + 4, picsnake.location.y).
Now the problem is this: the snake is moving to the right as it is suppose. but the problem is this that the picture is refreshing itself and when i am pressing the "D" and keep the "D" pressed all the time, the picture is like erasing itself and then it comes back again and goes to the right because the "D" is pressed. how can i solve this problem?? its very ugly right now
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
You can't do this with a picturebox and expect it to work nicely. You should draw the image direct to screen, or, unless the game is simple, look in to DirectX.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
can i use directx using vb.net??
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Of course - just download the SDK and it should install managed DX automatically.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Is there an easy way to alternate forecolors in a listbox simular to datagrids in vb.net ???
silver-gray
|
|
|
|
|
Silver-Grey wrote: Is there an easy way
What's easy for us may not be easy for you.
There is no support for this built into the ListBox control, so you'd either have to find a replacement control that supports this, or create your own ListBox control and ownerdraw the ListBox to get this effect.
Since you'd have to supply the Fore/BackColor's for the even and odd rows, you'd probably want to start by creating your own ListBox class so you can expose these properties. You can Google for "ownerdraw listbox vb[^] for examples.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
vb.net
i'm dynamically adding buttons to my form and to these buttons adding the same sub to be handled which shows a messagebox, that should show the number of the button.
see example:
<br />
public cmd as button<br />
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
Dim i As Integer = 1<br />
Dim z As Integer = 5<br />
Dim x As Integer = 10<br />
Dim y As Integer = 10<br />
<br />
For i = 1 To z<br />
cmd = New Button<br />
cmd.Width = 100<br />
cmd.Height = 40<br />
cmd.Left = x<br />
cmd.Top = y<br />
Me.Controls.Add(cmd)<br />
AddHandler cmd.Click, AddressOf show_messagebox<br />
x += cmd.Width + 5<br />
Next i<br />
<br />
End Sub<br />
<br />
Private Sub show_messagebox(ByVal sender As System.Object, ByVal e As System.EventArgs)<br />
MsgBox("button ") ' + a number indicating what button has been clicked<br />
End Sub<br />
<br />
how can i find out, which button has been clicked?
this example uses only a few buttons, but i need to differentiate between up to several hundreds.
|
|
|
|
|
The sender parameter is a reference to the button that has been clicked.
---
b { font-weight: normal; }
|
|
|
|
|
yes, i know that, but i dont know how to use that.
|
|
|
|
|
Cast the reference to Button , then you can reference it's properties:
Button button = DirectCast(sender, Button);
---
b { font-weight: normal; }
|
|
|
|
|
hello, my question is this. i've been wondering how do i show the list of services running in a machine, through vb.net? and i'm not getting anything usable while i search google.
any help would be appreciated.
thanks in advance
|
|
|
|
|
You're looking for the ServiceController[^] class.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|