|
arty=me wrote:
Looks like this solution will work excpet that I am getting the foll error:
"'Private Sub LabelChildNodes(TreeNode As Object)'."
What's the error ?
My code is for winforms, you're doing a web app ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
well, i did fix that problem, it was due to syntatctical differences in C# code and vb.net code .bu all sorted out now i get the foll error:
BC30213: Comma or ')' expected.<br />
<br />
Source Error:<br />
109: '************************************************************************<br />
Line 110: Sub LabelChildNodes(TreeNode node,recurse as Boolean)<br />
Line 111:
any idea whats happening?
and yes, i am doing a webapp and populating treenodes with values from database.
thanks a lot
aartee.
arty=me
|
|
|
|
|
arty=me wrote:
any idea whats happening?
arty=me wrote:
Sub LabelChildNodes(TreeNode node,recurse as Boolean)
node as TreeNode ?
arty=me wrote:
and yes, i am doing a webapp and populating treenodes with values from database.
I'm just wondering if the properties exposed by a web tree control will be the same as a Winforms one or not.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am completely frustrated… Trying to help a friend.
Here is what I have been trying to do.. I am a noob at visual studio.
I am setting up an inventory database using VB as the front end. I have setup an accounts table, product table. These I can view edit, delete, and ad records to fine.
I am trying to make an invoice. I have set up the following tables:
tblInvoice
InvoiceNum Primary Key
AccountNum Foreign Key For Accounts table
Date
Total Total cost of items
tblInvDetails
Invoice Number Foreign Key from tblinvoice
QtyOrdered Number of Items ordered
Item description From Product table
Item price From Product Table
Total Cost QtyOrdered * Item Price
So far I have a form that I can get Account information filled in from accounts, date Picker, item selector, invoice number.
I can pick an item select quantity click a view button to view the following in textbox:
Invoice Num QtyOrdered Product Item Price total item cost
All is well with that here is where the problem comes. I want to create a button to add items to tblInvDetails.
Once I figure this out I will work on totaling the Total items cost and, updating the Tblinvoice info and printing an invoice.
I can not get past this until I figure out the update.
Please help…
|
|
|
|
|
DesertWrangler wrote:
I want to create a button to add items to tblInvDetails.
Where are you stuck ? Is it a table or a view ? I notice that it contains items 'from product table', surely this table would not contain that info, that would be insane. It should contain the ID from the product table so these things can be looked up.
If I were doing this, the button would bring up the product table so a product could be selected, then it would do the insert in the normal way, inserting the (known) invoice number, the quantity orderded, the product ID and the calculated price.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
The way I set it up is most likely going about it the hard way I am very new at this. Right now I have it were the Invdetail is in datagrid view. In another part ai have it were you can bring up an item by UPC, Item Number or Item name then input the quantity desired. I have a click button that them brings that with the to texts boxes. My though behind this is that you can change it befor adding it to the InvDetail table. I am now trying to get this to update to the invdetail.
Bottom line is I am trying to make an invoice that can be saved. I want the to bring up the account information for adrress, from the account table then add items fromthe product table. Calculate, update account, save and print or save invoice.
If there is an easy way I am all ears, cause this is driving me nuts.
Thanks
Russ
|
|
|
|
|
DesertWrangler wrote:
If there is an easy way I am all ears, cause this is driving me nuts.
Well, apart from the table changes I suggested ( based on what I think the tables look like ), it's just a simple insert command. Is that what you need help with ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ya, I hav tried but I an not get it to work.
|
|
|
|
|
What's going wrong ? You obviously know how to write an insert statement, or you wouldn't have a database at all ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Assuming that your using a DataAdapter object to connect to your database and that there is an insert command setup the following code should work:
Try
Dim newrow As DataRow
newrow = MyDataSet.Tables("MyTable").NewRow()
MyDataSet.Tables("MyTable").Rows.Add(newrow)
BindingContext(MyDataSet, "MyTable").Position =
BindingContext(MyDataSet, "MyTable").Count - 1
Catch ex As Exception
MsgBox(ex.Message)
End Try
|
|
|
|
|
Hello all,
Doing my first application to transfer to PDA's. I've looked and looked but can't seem to figure out the 'standard' screen size for most PDA's in 'twips'. I'm not sure how big to make my forms. I realize this is a rookie question but hey, "it's my first day man". I've done the math conversion of what I believe to be screen size in inches, to pixels, to points to twips but every time I get a resultant size that looks too big.
This is one case where 'size matters'.
Thanks
Will
|
|
|
|
|
Hello there
I have an Xml file and I loaded it through Dataset. Now I have almost 8 tables. in any one of those tables I want to get the data in my required order like I have One table Name "Employee" I have two Fields name
"EmployeeAddress" and "EmployeeName". the data is arranged by default according to EmployeeAddress but I need it according to Employee Name. How I can do this. when I am not Using DataGrid .... Only using text boxes and user clicks next button to get the next record.
how to put "order by" clause in the loaded dataset table
|
|
|
|
|
if any one else has same problem then this is the solution
Dr = Ds.Tables("Employee").Select("","EmployeeName")
where dr = data row
|
|
|
|
|
Hello,
I would be very gald,if could know the procedure or the way to extract or modify files from MFC application file(.exe)
|
|
|
|
|
This is the VB forum, you know that right ? What do you want to do ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello,
I have difficulties in using a DLL I was given. So I can't modify the code of this DLL, but I know that it works, since I tested it succesfully with a C program (with the .h and .lib files that were given with it).
My problem is I have to call it in VB .NET.
Here is the function that I have to call in the DLL:
<br />
void myfunction(<br />
long * param_one, <br />
long param_two,<br />
unsigned char * param_three,<br />
unsigned char * param_four)
Parameters 1 and 4 are outputs and parameters 2 and 3 are inputs.
And here is how I declare and call it in my VB Code:
Private Declare Sub myfunction Lib "mydll" _<br />
(ByRef param_one As Long, _<br />
ByVal param_two As Long, _<br />
ByVal param_three As String, _<br />
ByVal param_four As String)
Call myfunction(a,b,c,d)
It seems the string input (param_three) doesn't reach the DLL, which I know from the return code (param_one). I've tested with ByRefs for the strings but it doesn't work either. Maybe is it a problem with the fact that these are unsigned char * ?
I am a brand new DLL user so I may have made mistakes... If someone has an idea, I would really appreciate it.
|
|
|
|
|
It depends on what the .DLL is doing with the string. If it's creating a string for return, then what you did should work. If it's expecting a string BUFFER passed in (which is what this looks like), you have to pass in a buffer for a string and not just a pointer to en empty string. The buffered version can be done with a StringBuilder instead of a String.
Private Declare Sub myFunction Lib "mydll" ( _
ByRef param_one As Long, _
ByVal param_two As Long, _
ByVal param_three As StringBuilder, _
...)
' To call the thing, create the buffer first.
Dim buffer As new StringBuilder( 512 )
myFunction( a, b, buffer, d )
You can get more information and techniques from here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your help.
Although I'm now using a StringBuilder, the parameter doesn't seem to get in the DLL...
I really wonder why this doesn't work
|
|
|
|
|
For all I know the type of parameters three and four (string) should be LPSTR.
void myfunction(long * param_one, long param_two,LPSTR * param_three,LPSTR * param_four)
. . . we have same problem encountered when i create a dll in VC++, and it works when I used LPSTR, u can try this.
I hope it helps
|
|
|
|
|
Yes, I've already read that somewhere, but the problem is I can't modify the DLL...
Thanks anyway.
|
|
|
|
|
Hi!
Is it legal to extract icons from Microsoft applications such as MS Office and XP
for use in my own application.
Theres a lot of free tools to extract these icons out there, but nobody seems to care about legal rights.
I'll be happy for a straight answer here
Thanks in advance
bomstrong
|
|
|
|
|
The icons provided with Visual studio are free to use. If you extract the icons from word or some other application, you can assume you are violating the copyright unless you have written permission from Microsoft to do so.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
Thanks for Your quick answar - I'll try to create my own icons instead!
Regards
bomstrong
|
|
|
|
|
hi all,
searching the internet for printing/converting an Excel file into PDF let me to the following code.
<br />
Dim oXL As Excel.Application<br />
Dim oWB As Excel.Workbook<br />
Dim oSheet As Excel.Worksheet<br />
Dim oRng As Excel.Range<br />
<br />
' Start Excel and get Application object.<br />
Set oXL = CreateObject("Excel.Application")<br />
oXL.Visible = True<br />
<br />
' do other things with the oSheet object<br />
oSheet.PrintOut Copies:=1, ActivePrinter:="Adobe PDF on Ne01:"<br />
but after some error messages I discovered that on my machine the ActivePrinter:="Adobe PDF on Ne01:" should rather have Ne02 in it.
Is there a programmatic way to find/set the correct ActivePrinter property on a machine. Adding a loop for "Ne0" + i doesn't look elegant.
thanx in advance
|
|
|
|
|
I use picturebox in a winform. Like this,
PictureBox1.load(strImagefile)
After testing some picture files, I found that if the imsgefile format is .ico, there will has error when you load twice the image.
Is this a bug of .net 2005 beta2?
Thanks!
|
|
|
|