|
I'm now doing code to load up a form, but I don't know how to load the dataset into combobox of each cell on the DataGridView and on the normal combobox. Could anyone tell me how, please?
Thank You Very Much for Your Helps. Ryan
|
|
|
|
|
Use the same binding source, what ever it may be, you used for the datagridview in the combobox.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
No, I'm not using the binding source or what on the GUI. Could you tell me what code should I use, please?
Thank You Very Much for Your Helps. Ryan
|
|
|
|
|
Dear freinds ,
I tried to generate test.txt , but I got stuck when I wanted to go for a new line in the text file.
Dim file1 As New FileStream("c:\test.txt", FileMode.Create)
Dim st1 As System.IO.StreamWriter
Dim b1 As Byte() = New UTF8Encoding().GetBytes("hi")
file1.Write(b1, 0, b1.Length)
file1.Close()
how can I go to a new line and then write somthing else. could anyone help me ?
Regards,
|
|
|
|
|
Just write a newline before you close the file. Nothing really much to it.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi,
Please try this:
...
Dim b1 As Byte() = New System.Text.UTF8Encoding().GetBytes("hi" & vbNewLine)
...
hope it helps
|
|
|
|
|
The proper, .NET way to do it, is to write Environment.NewLine. Really, it would make more sense to append that to your string, first. Either way, this code is a little messy. Why not just write it as text, why convert to a byte array ?
File.WriteAllText("c:\test.txt", "hi" & Environment.NewLine)
will do what you want, if you're in .NET 2.0.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello
I’d be thankful to receive any information regarding the Drawing in VB.Net.
After I draw a line on form, when the form minimized or an other window comes over my form, every thing disappeare?
Thank you very much in advance.
I am looking forward to hearing from you soon
Thank you,
Reza
|
|
|
|
|
You should draw everything in the Paint handler
The Paint event gets fired whenever:
- something changed in the environment, e.g. your form got covered then uncovered
by something else
- the form's size changed (maybe minimize/restore, maximize/restore, regular resize)
- your code calls Invalidate()
So when your internal data changes and a repaint is needed, call Invalidate(),
dont paint things yourself outside the Paint handler.
|
|
|
|
|
You're obviously using CreateGraphics. What led you to do that ? It's totally wrong, and so many people seem to be doing it, I don't understand why.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm having a fit over here--most likely because I'm new to ReportViewer. I'm sure this must be pretty simple, but I've been banging my head against it for a couple hours and I'm hoping you can help. Available futzing time is EXTREMELY short on this one.
I have a single-record-display report, with no Table/Matrix controls--just TextBoxes, lines, etc. I need to send multiple records to the report and be able to navigate through them using the report's ToolBar buttons--First, previous, next, last.
Each button click should move to a different record and update that record's information in the TextBoxes. When the report is printed, a single page for each record should be produced.
Currently the ToolBar shows only one record, even though the report's underlying DataTable contains many.
Surely this must be possible?
Thanks!
-- modified at 0:55 Sunday 29th July, 2007
|
|
|
|
|
Why are you not using Table or Matrix controls? I've had this problem in the past and using a Table makes it go away :->
OT: I took the "U" word out of the subject line since it can upset people around here. I'd recommend modifying your subject line
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
> I took the "U" word out of the subject line since it can upset people around here
Oops, I didn't realize that! OK, I fixed it, thanks.
> Why are you not using Table or Matrix controls?
Er, maybe I'm missing something? If I use a Table/Matrix control, the data will display in tabular format on a single page of the report.
Maybe I didn't describe it too well. I'll try again.
I have 5 customers in a table. Each customer has a name, company and an account balance. I need a 5-page report with each page exactly the same except for the name, company and balance fields.
Like a mail merge. In fact, EXACTLY like a mail merge.
Thanks
|
|
|
|
|
You could stretch out the height of the cells to force one customer per page.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
The 'customer' example I gave is a pretty simplified example. In reality, the report layout is pretty complex--a lot of data fields mixed in with plain text snippets, lines and so on. There wouldn't be room for the stretch you describe, I don't think.
There's no way to do it in the report configuration?
|
|
|
|
|
Jeff Bowman wrote: way to do it in the report configuration?
I'm not 100% about that. as far as stretching at the bottom, just have a filler row in the table at the bottom before the footer. Sure would be nice if it had a page break thing in the toolbox like MS Access Reports has
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
I love learning something new when trying to help
I must link that MSDN link into my blog for future reference
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
|
I couldn't get that one to work like the list grouping. It must be the grouping that does the trick. In this case I used the table's primary key.
I'll have to fiddle with this one later on when I've got some more time.
(Time? You mean someday I may actually have TIME?)
|
|
|
|
|
Paul Conrad wrote: I'd recommend modifying your subject line
What is next: suggesting the OP to ask another question ?
|
|
|
|
|
Originally he had a certain word in his subject line that would have gotten him flamed, and he took it out
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Paul Conrad wrote: Originally he had a certain word in his subject line that would have gotten him flamed, and he took it out
I figured that, so I chose not
|
|
|
|
|
Hey all,
I am attempting to create a program that runs in the background, takes keypresses from the keyboard, changes the keypresses to different keys, and sends the new key to the program running in the foreground (for example: I press "A" and the program in the foreground gets "F"). I thought that DirectInput would be the best way to go about this. However, I cannot seem to initialize the program correctly. I want to use the below code to gain control of the keyboard:
Dim keyboard = New Microsoft.DirectX.DirectInput.Device(<SEE BELOW>)<br />
keyboard.Acquire()
However, "Microsoft.DirectX.DirectInput.Device" wants the guid of the keyboard passed to it as an argument, and I cannot find out how to get this. So, How can I find the guid of the keyboard? I have looked all over the internet for the way to do this, but all I can find is information about directx8 or code in C++.
Also, while I am asking, will this program prevent the actual keypresses from getting to the program in the foreground? Using the example from above, if this program can't hide the actual keypresses, then the program in the foreground would get "AF", instead of just "F". Thanks for taking the time to help me.
NOTE: I am using Visual Basic 2005 Express Edition.
|
|
|
|