|
There is no PDF support in .NET. You need to buy a third party library for that. The print dialog DocumentName in general, does not magically print a document for you in any case. You need to impliment printing in all cases. Perhaps you should try reading some documentation ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I recently upgraded a project that did a lot of screen manipulation. Controls (hundreds in different configurations were loaded, aligned and displayed using the ".left" and ".top" commands on the control.
In many places there were alignments done based on other things and an offset, for example,
frachamber(0).Width = ((ID_WIDTH * 2) + (SLOT_WIDTH * 2) + 400)
after the upgrade I get
frachamber(0).Width = VB6.TwipsToPixelsX((ID_WIDTH * 2) + (SLOT_WIDTH * 2) + 400)
I would like to simplify and get rid of the twipstopixels and just go with pixels but am not sure how to convert my offset values (400 in this case) It looks like someone spent a lot of time figuring out all these offsets in the past, something I would like to avoid if possible.
any idea how to convert, say 100 twips is about this many pixels? (I guess they would be needed in both X and Y). In debug mode it will not tell you what the converted value is in pixels.
Thanks
sorry, upgrade from vb6 to .net
|
|
|
|
|
Hi,
a simple google action turned up this article[^].
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
hello everyone ..
well i have a form contains DataGridView and one of its components is a ComboBox , the problem is i wana save the ValueMember instead of the DisplayMember in the database .
BS: i am using sql 2005 and vb.net 2005
here the sample .
http://www.4shared.com/file/110589646/9b033db6/WindowsApplication2.html
|
|
|
|
|
atk8877 wrote: the problem is i wana save the ValueMember instead of the DisplayMember in the database .
That is how it is supposed to work. Is it not doing that?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
You write the code to store in the DB, so what is the problem ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
|
I have a task that i have to synchronize/update both my web(asp.net & SQL 2005) and windows application databases(VB.net & SQL 2005).
My scenario is my web app. and windows app. both accept reservations. I want any reservation happen to my web or windows app will reflect to both databases(online & local) at the same time.
Please help me.
Thanks.
al hajjaj
|
|
|
|
|
I would look at using SQL Server replication or if that is not possible, writing INSERT, UPDATE and DELETE triggers for each of the tables that need syncronising. Better still why not use the same database for both apps?
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Like Steven said, best is to use a single database for both. In fact, it is useless to build a separate windows form. Just make a separate section in your web app with login for administrators / employees, and build the form there.
Using xml could be an alternative approach. Handle web reservations as orders, and have your web app send the necessary information for the reservation in an xml file.
Vice versa, you can send data about existing reservations / open capacity in xml files to your web server.
Obviously this approach would not nearly be as real-time, so you would have to figure out a rule about how to handle double reservations. For example an approval queue.
My advice is free, and you may get what you paid for.
modified on Wednesday, June 10, 2009 6:32 AM
|
|
|
|
|
|
Single database will do and write a webservice which handles database layer and business logic layer. Webservice can be called from web and windows applcation. So even if you change the presentation layer (web or windows) you can do that.
|
|
|
|
|
How to populate the column header to all records. I am using Vb.net 2005.
Any body help me? It is urgent. Please!!
Example: (In Microsoft Access Database)
Header-- Name Designation Salary
Gopi Jr. Programmer 10,000
Mani Sr. Analysist 10,000
Kamal Database Admin 25,000
Need the Output: ( I Need the output to Notepad )
Name: Gopi
Designation: Jr.Programmer
Salary: 10,0000
---------------------------------
Name: Mani
Designation: Sr. Analysist
Salary: 10,000
---------------------------------
Name: Kamal
Designation: Database Admin
Salary: 25,000
----------------------------------
Please sent the code to my mail id. it is very help full for me.
E-Mail: agopi_2005_ind@yahoo.co.in, agopi.net@gmail.com
Regards,
Gopi A.
|
|
|
|
|
Member 4027617 wrote: Please sent the code to my mail id. it is very help full for me.
E-Mail: agopi_2005_ind@yahoo.co.in, agopi.net@gmail.com
Wow - you're really a bit stupid, aren't you ? That's two email addresses that will get spammed by spam bots now.
Member 4027617 wrote: Need the Output: ( I Need the output to Notepad )
Member 4027617 wrote: It is urgent.
Seeing as you can't do your own job, perhaps you need to pay someone to do it for you ? I mean, we're here to help, not to do your job. What have you tried ? Anything ? Did you google it ? Do you have any idea what you're doing ?
You have asked two questions.
1 - output to notepad. I assume you mean output to a text file ? File.WriteAllText will do that. Process.Start will open the file in notepad.
2 - formatting your data. Your best bet here may well be to read your data, then iterate over it and build the format you want, given that you have to build it into a string to save it in the first place.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
I need help. if you know this please post the code. No need the comments. Do you know what i am doing? why i am asking this for urgent? Don't insult any other like this. Really I am working in BPO Concern. Just i develop the tool for our work. I will help us and reduce the time. We have take more hours for this output (Manual work). If you know this please help me.
Don't Mistake me. Please help me.. Please..
|
|
|
|
|
Use a select statement (query) or stored procedure to open up a datareader, then open a connection to a text file using the filesystem object. Use a loop to read through the datareader and append a line to the text file for each item you want.
Here's the pseudo code - you fill in the rest.
Open datareader
Open file for Append
do while not datareader.eof
file.write("Name: " & datareader("Name"))
file.write("Designation: " & datareader("Designation"))
file.write("Salary: " & datareader("Salary"))
file.write("------------------------")
loop
file.close
datareader.dispose
|
|
|
|
|
Hi,
thanks for the help. Till I didn't tried your code. Anyway, Here We know the header. But in our database we have unknown header and also we don't know how may column. So please help me.
I have unknown header also many columns and rows. Please help me..
|
|
|
|
|
Good day! I have a problem using DataGridView. Here's my code.
Public Class MyLibrary
Private _dgv As DataGridView
Private _recordBLL As RecordBLL
Private _dt As DataTable
Public Sub New()
Me._dgv = New DataGridView
Me._recordBLL = New RecordBLL
Me._dt = New DataTable
Me._dt = recordBLL.PrincipalMember
Me._dgv.DataSource = dt
'********* Error is displaying here ********
With Me._dgv
.Columns(0).Visible = False
.Columns(1).Width = 200
.Columns(2).Width = 600
.Columns(3).Width = 150
.Columns(3).DefaultCellStyle.Format = "MM/dd/yyyy"
End With
End Sub
ReadOnly Property MyDataGridView() As DataGridView
Get
Return _dgv
End Get
End Property
End Class
And I encountered this error. "Index was out of range. Must be non-negative and less than the size of the collection." But the data is displayed in the grid.
Pls. help me. Thank you in advance.
|
|
|
|
|
Well, I guess you don't have four columns at the point that this code is run. What makes you think that you do ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I already bound the grid with datatable and the result reflect in my datagridview control. And I saw the columns and rows.
Do you mean I need to create set of columns and bind it with datatable?
Thank you very much to your reply.
|
|
|
|
|
No, if you have databound, then you should just have the columns. However, it's clear you do not, that's what the error means. So, you need to work out why, that's what your issue is. Which line blows up ( that is, do you have any columns at all ? )
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I'm using a fairly basic Select statement that is bound to a datagridview )SELECT ID, Desc, Default, Name FROM Table1)
The ID column is an auto-incrementing integer column in Table1. The dataset is strongly typed with commands for insert, delete and update.
Winform setup:
BindingSource1.DataSource = dsData
BindingSource1.DataMember = Table1
Datagridview1.DataSource = BindingSource1
I'm confused on how to properly handle inserts (specifically with the ID column). I'm assuming you would insert the row and return the ID to set the ID column in the grid but am a little lost on what method(s) to use (esp. to cancel the addition in the case the user presses escape). Just looking for a little guidance.
Hope this question makes sense.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Unless I am horribly mistaken (and I have been known to be), the database will handle the ID column for you, as you set it to auto increment.
So the user can just go ahead and update, insert and delete in the datagridview = the dataset, and by simply calling dsData.Update() somewhere / somehow, the changes will actually be made to the database. Up until that point the user is free to change his/her mind.
To prevent problems, you could just set the ID column in the grid to Read Only.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Incase anyone runs into this, SQLCE doesn't support Insert; Select statements from within the tableadapter.insert command text property (as opposed to your standard SQL connections).
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
hello,
im new and i was wondering i can make a browser already:P.
peace off cake you think , no not for me !!
but my question are how can i addinto xml file a link example (google)
so that if i start webrowser and h add a tab with the name google and open google in ther?
i use vb8
hope this is easy for you poeple but not for me
hope a answer. \regard Gerrie
|
|
|
|