|
mitli wrote: QSChkBx.Checked = True
I think this should read: QSChkBx.Value = vbChecked
...Steve
|
|
|
|
|
Steve Pullan wrote: I think this should read: QSChkBx.Value = vbChecked
Oops... I had a relapse into VB 6.0 Sorry.
...Steve
|
|
|
|
|
I'm having a problem getting a simple "Please Wait..." message to appear while Crystal is generating reports. Is there a simple way to maintain the message on screen until the job is sent to the printer (about 5-10 seconds)?
Thanks for the help.
|
|
|
|
|
Hi,
I am using abit of code to override a datagridcolumn style.
In the onpaint function, the following line draws the text for the cell:
g.DrawString(IIf(Format = "", CType(bVal, String), CType(Strings.Format(bVal, Format), String)), Me.DataGridTableStyle.DataGrid.Font, foreBrush, bounds.X + 2, bounds.Y + 2)
My query is regarding the last 2 parameters, bounds.x+2 and bounds.y + 2
this forces all values in each cell to be drawn left aligned.
Does anyone know a function to calculate the length in pixels of a string?
Then I can right align my cell values by deducting the string length from the cell length.
Any response gratefully appreciated.
Andy
|
|
|
|
|
You can get the width and height of your string via the Graphics.MeasureString() function.
Dim szBuf As System.Drawing.SizeF<br />
szBuf = g.MeasureString("Hello World", Me.DataGridTableStyle.DataGrid.Font)
|
|
|
|
|
Many thanks Joshua,
That solved the problem!
Andy
|
|
|
|
|
Hello,
I have created a report using Crystal Reports 9 in VB.NET.
I'm having trouble with a subreport. I have created a view in SQL server, and a dataset in VB.NET based on that view.
I'm a bit confused by how sub-reports work...
I know that with my main report, I pass the VB form that contains my ReportViewer the dataset I need to populate the data.
Do I need to do the same for subreports?
I went through the process of adding another datasource, but get an error when I create a subreport based on this datasource.
Can someone tell me where to start with this??
Thanks!
Amber
|
|
|
|
|
I have multiple projects in a VB.Net solution. A common module xxx.vb file exists in all the projects of the solution. The code of the xxx.vb is different in each project. When I try to set a break point in xxx.vb in Project B, the break point sets only to the xxx.vb in Project A of VB.Net Solution and not in the project B as expected. Browsing MSDN gave solution for source files with same name within the project only and I tried to change the path in the Breakpoint properties dialog box with vain. Please help to fix the problem.
|
|
|
|
|
This is a bug in the IDE. We have a project with multiple directories where in each directory it's often logical for a web page to have the same name, and the same thing happens. I've yet to find a fix, apart from renaming your classes. If you can create a dummy class for the purpose and put an instance of it in the code you want to debug, you could put a breakpoint in it's constructor and step out.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am new in programming VB .Net and I find problems about building a drawing application.
I've writen a simple application which allows user hand-drawing on a blank form.
However, when the form was minimized, all the drawing was gone.
I searched for a solution in this case and I get two answers.
1) Put the graphic methods in the Form_Paint event.
2) Save the form's image into a bitmap and then reload it as the form is activated.
For the first solution, it works for those drawing which have been recorded already, however I don't think hand-drawing's point data should be saved into an array or datatable for Paint event to repaint the drawing.
For the second solution, I have tried but failed to capture the form's image.
So I want to ask two questions :
1) Is there any VB .Net method that can auto repaint the controls or forms.
2) If no, how to cache the recent control/form image and reload it on to the control/form.
Thanks very much.
-- modified at 6:12 Thursday 3rd November, 2005
|
|
|
|
|
The solution is not first painting into a bitmap and then painting the bitmap in the OnPaoint function.
- Create a new Bitmap of your desired size
- When you need to draw to it use the Graphics.FromImage function to get a Graphics instance (don't forget disposing it after usage).
- override OnPaint and just draw the whole bitmap to the Graphics (DrawImageUnscaled is the fastest) of the event arguments.
|
|
|
|
|
Hi Frens
I have some problem when i use crystal reports in VB.net while passing the parameters dynamically.
I need to know a easy way in vb.net how to pass multi parameters from a form to generate a report.(crystal)
eagerly waiting all the genius people to give me sollution.;)
thanks in advance.
Live Life King Size
Asif
|
|
|
|
|
Hi Frens
I have some problem when i use crystal reports in VB.net while passing the parameters dynamically.
I need to know a easy way in vb.net how to pass multi parameters from a form to generate a report.(crystal)
eagerly waiting all the genius people to give me sollution.;)
thanks in advance.
Live Life King Size
Asif
|
|
|
|
|
I am looking for a classified advertising software which is developed on VB.Net. If you know of one please post it here or Email me.
Thanks
-- modified at 19:50 Wednesday 2nd November, 2005
|
|
|
|
|
What do you want exactly ? An ebay clone ? Banner ads ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Something like ebay clone it does not have to be that sofisticated.
functions will include
1. User logon
2. User will be able to enter ads (text & graphic)
3. To be able to setup multiple categories (Auto, personals, Garden, Boats, ...)
4. search functons
5. Admin functions
6. to be able to Accept credit card payments
7. Take banner ads
8 .....
Thanks
|
|
|
|
|
These boards are for answering questions to do with programming. Your best bet for something like this is a site like Rentacoder. You can get stuff written there pretty cheap. Of course, it will be crap, but it will probably work, so long as you never want to change it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi everyone
I have a grid in a Windows Application that I want to format. I have read messages and followed links so I can group my records and colour certain cells eg subgroup headings in blue (by overloading the datagridtextcolumn class)
However, I have two levels of grouping and I would like to format the more important group header as bold.
I can format the entire grid as bold, but just want the text of a few cells.
Could someone point me in the right direction?
Thanks
Marg
|
|
|
|
|
hi,
i have followed your question and by coincidence am working on a project where i have to differenciate the fields in a datagrid by coloring the particular cells depending upon the value.
i have tried a hard to do that but i was unsuccessful.
i think that u have a solution for my problem
so please give me one solution and am working for ur query and i will get back with a solution soon.
thanks
Live Life King Size
Asif
|
|
|
|
|
Hi Asif
You write a class to inherit from the usual column:
Public Class DataGridColoredTextBoxColumn<br />
Inherits DataGridTextBoxColumn<br />
<br />
Public Sub New()<br />
End Sub<br />
<br />
Protected Overloads Overrides Sub Paint(ByVal g As Graphics, ByVal bounds As Rectangle, ByVal source As CurrencyManager, ByVal rowNum As Integer, ByVal backBrush As Brush, ByVal foreBrush As Brush, ByVal alignToRight As Boolean)<br />
Dim strText As String<br />
Try<br />
Dim o As Object<br />
o = Me.GetColumnValueAtRow(source, rowNum)<br />
If (Not (o) Is Nothing) Then<br />
strText = CType(o, String)<br />
If strText.IndexOf("MyText") >= 0 Then<br />
backBrush = New SolidBrush(Color.White)<br />
foreBrush = New SolidBrush(Color.RoyalBlue)<br />
End If<br />
End If<br />
Catch ex As Exception<br />
<br />
Finally<br />
' call the base class gets called with the changed brushes <br />
MyBase.Paint(g, bounds, source, rowNum, backBrush, foreBrush, alignToRight)<br />
End Try<br />
End Sub<br />
End Class
I set the table and column styles through the properties window rather than code
Then, in the Windows form generated code, modify the column's class:
Friend WithEvents colCueDescription As CCP.DataGridColoredTextBoxColumn<br />
Me.colCueDescription = New CCP.DataGridColoredTextBoxColumn()
I think that was all - it was a little while ago. Let me know
Marg
|
|
|
|
|
To clarify that a bit - CCP is my project name
Marg
PS Sorry about no indents - I'll have to figure how to show that in poss
|
|
|
|
|
I have a gridview on my web page that uses an xml document (dataset) as it's data source. The xml dataset has two columns that I need to divide to get a single column for display on the web page. Does anyone know how I can do this with a template column? For example here is a snippet of the html:
<%# Bind("AnswerSeconds15")%>'>
What I want to do is something like this (although this does not work):
<%# Bind("AnswerSeconds15") / ("NumCalls15")%>
Thanks!
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
Hi all.
Im trying to popup a menu from a seperate process.
The following code can click a menu, but it doesnt affect menus with subitems, which i think is kinda weird. There must be another way.
Any ideas?
<br />
SendMessage(MenusParentWindowHandle,WM_COMMAND,MenusID,IndexOfTheSelectedMenu), Nothing)<br />
PS. I changed all the var names for easy readin.
All Your Source Are Belong To Us!
|
|
|
|
|
whoops, MenusID = MenusParentID
All your source are belong to us!
|
|
|
|
|
Are you calling Api?
If yes then you had called findwindow api ya?
then
it's simple
call another API
Findwindowex
|
|
|
|