|
How to apply the style sheet for crystal report in .net version for windows application.?Actually my need is to have multi lingual support for crystal report.But i cann't do it as like the window's forms.SO i decide to have style sheet so that the labels in crystal report can be generated with the style sheet value.Can i do like this or anybody have some other idea to get multilingual support in the crystal report.
Sriram
|
|
|
|
|
Hi friends,
In visual basic when a structure is declared, it does a padding between members so as to meet the memory boundry condition.
Now I would like to remove the padding by setting some complier option.
In VC++ this can be done by using
#pragma pack(1)
Is there any similar option in Visual Basic
Amar.
|
|
|
|
|
Your looking for the StructLayoutAttribute class. It has the Pack member that your looking for.
Something like this:
<StructLayout(LayoutKind.Sequential,Pack=1)> _
Public Structure EXAMPLE
Public dwWhoCares As Integer
Public ptMinSize As Point
Public ptMaxSize As Point
End Structure
RageInTheMachine9532
|
|
|
|
|
Hi Dave,
Thanks for the answer.
I guess the above code works for vb.net. I am working on VB 6.0, so please give me equivalent in VB 6.0.
Amar.
|
|
|
|
|
There is no equivalent in VB6...
RageInTheMachine9532
|
|
|
|
|
Am having a bit of a problem trying to retieve a DataRow from a DataGrid . The problem is that the DataGrid only exposes a CurrentRowIndex property for the selected row. The hassle with this is if the data is sorted at runtime by the grid, then the CurrentRowIndex does not correspond to the row in the grids DataSource (in this case a DataTable).
I could add a psudo column to the DataRow indicating its index in the DataTable . But then maintaining the index will be a nightmare, so I want to try avoid that approach.
I really cant believe they made a grid that cant retirieve a row!
Thnx
|
|
|
|
|
Hi! Greg Eales,
I think curent row in datasource (i.e. datatable or dataset) is the same as what you have selected in datagrid. So, do not have to look for any index or something like that.
Although, I am also a learner. So, I might be wrong. But, this is what I have experienced when I have bind datagrid with DataSet.
Ritesh.
|
|
|
|
|
Hi,
I am using VS.net and have a custom validator that shows an error if both text boxes are filled in. This is done server side but i now want it to also work client side. How would i do this, does anyone know?
I presume i use some sort of JS function, where does this go in the VS layout. Or is there another better way to do this altogether?
<br />
Protected Sub CustomValidator1_ServerValidate(ByVal source As System.Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate<br />
<br />
<br />
Dim Count As Integer<br />
<br />
If Len(txtName.Text) > 0 Then Count += 1<br />
<br />
If Len(txtName2.Text) > 0 Then Count += 1<br />
<br />
If Count <> 1 Then<br />
<br />
args.IsValid = False<br />
<br />
End If<br />
<br />
<br />
End Sub<br />
All help appreciated.
|
|
|
|
|
I'm trying to teach myself how to send data over a network and interact with an ASP. This isn't even introduced in any of the books I have, and any second step or intermediate level texts I've found haven't shed any light. Basically I just wanna know what the terms are that cover what I'm trying to do that I know what I'm looking for. Any books or webpages that could help would be a great help too.
e.g. C++ Windows Sockets are used to interact over a network with little effort. And I could be wrong but I think in years gone by (not sure if it's still relevant) but they used CDO and MAPI for sending emails and data??
|
|
|
|
|
Hi All,
The code below work if I don't add FieldInfo but I would like to assign all colums is text
Dim xlsApp As Excel.Application
Dim MyxlsBook As Excel.Workbook
xlsApp.Workbooks.OpenText(Filename:="D:\test.txt", StartRow:= _
1, DataType:=Excel.XlTextParsingType.xlDelimited, TextQualifier:=Excel.XlTextQualifier.xlTextQualifierNone, ConsecutiveDelimiter:= _
False, TAB:=False, Semicolon:=False, Comma:=False, Space:=False, Other _
:=True, OtherChar:="|")
I try to do as below but no luck:
xlsApp.Workbooks.OpenText(Filename:="D:\test.txt", StartRow:= _
1, DataType:=Excel.XlTextParsingType.xlDelimited, TextQualifier:=Excel.XlTextQualifier.xlTextQualifierNone, ConsecutiveDelimiter:= _
False, TAB:=False, Semicolon:=False, Comma:=False, Space:=False, Other _
:=True, OtherChar:="|", FieldInfo:= Array(Array(1, 2), Array(2, 2) )
it not except Array(Array(1, 2), Array(2, 2)
Thanks for your helps
Cheers,
Ben
|
|
|
|
|
Ok, so I've been using Visual Basic for about three days. I'm messing with a program that someone else wrote. It creates a tray icon and when you close the window, it just unloads the form, but the program is still running in the tray. There is a popup menu that should pop up when someone clicks the right mouse button on the tray icon. I haven't touched the original code that deals with this, but for some reason, it quit working. I've checked to make sure the menu was defined, and it is. And below is the code that should display the menu:
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error GoTo ErrHandler
Dim Msg As Long
Dim sFilter As String
Msg = X / Screen.TwipsPerPixelX
Select Case Msg
Case WM_LBUTTONDBLCLK
On Error Resume Next
Me.WindowState = vbNormal
Me.Show
Case WM_RBUTTONUP
PopupMenu Me.mnuFile
End Select
Exit Sub
ErrHandler:
Call MakeLogFile("Form_MouseUp")
End Sub
I've seen this code in examples around the net, so it looks right, although I have no idea how "Msg = X / Screen.TwipsPerPixelX" gives you the message.
Asuming that this code is right, and the menu is defined...what are some reasons this wouldn't be working? By the way, I put a break point in the above function, and it never hits it...any ideas?
Thanks.
|
|
|
|
|
I have assigned a datagridstyle to my datagrid and it is not showing up. I have given the code below, any help is highly appreciated.
'Create Table
Dim dt As New DataTable("Category")
'Add Columns
Dim dc As DataColumn
dc = New DataColumn("Category", System.Type.GetType("System.String"))
dt.Columns.Add(dc)
dc = New DataColumn("Active", System.Type.GetType("System.Boolean"))
dt.Columns.Add(dc)
'Add Rows
Dim i% : For i = 0 To ds.Tables(11).Rows.Count - 1
Dim dr As DataRow
dr = dt.NewRow
dr("Category") = ds.Tables(11).Rows(i)(1)
dr("Active") = 1
dt.Rows.Add(dr)
Next
'Create Table Style
Dim ts As New DataGridTableStyle()
With ts
.RowHeadersVisible = False
.AllowSorting = False
.BackColor = Color.White
.AlternatingBackColor = Color.White
.HeaderBackColor = Color.FromArgb(115, 126, 183)
.HeaderForeColor = Color.White
.HeaderFont = New System.Drawing.Font("Arial", 9.0F, System.Drawing.FontStyle.Bold)
.GridLineColor = Color.DarkGray
.PreferredRowHeight = 22
End With
'Create Required Column Style (Category)
Dim column1 As New DataGridTextBoxColumn()
With column1
.MappingName = "Category"
.Width = 250
.Alignment = HorizontalAlignment.Left
.ReadOnly = False
End With
'Create Required Column Style (Active)
Dim column2 As New DataGridBoolColumn()
With column2
.MappingName = "Active"
.Width = 100
.Alignment = HorizontalAlignment.Center
.ReadOnly = False
End With
'Add column styles to table style
ts.GridColumnStyles.Add(column1)
ts.GridColumnStyles.Add(column2)
'Add tablestyle to Datagrid and customize
With dgCat
.TableStyles.Add(ts)
.DataSource = dt
.CaptionVisible = False
End With
Regards,
Muthu Annamalai
|
|
|
|
|
I think you have to map your style to your table name. In your case
ts.MappingName = "Category"
Hope it helps.
|
|
|
|
|
Thanks for your help
I have tried that and also I have called tablestyles.clear before assigning new style, but still it is not working
Regards,
Muthu Annamalai
|
|
|
|
|
afew years ago i made a guitar program in VB6 using midi instruments to produce the chords and notes for the guitar sounds.
i forget how to do this, and moreso, dont know how to do it in vb.net
can someone please lead me in the right direction on using midi instruments and how to produce certain notes with the selected instrument?
thank you.
if this is too vague let me know.
------------------------
Jordan.
III
|
|
|
|
|
Hi! Guys,
I am learning VB.NET. I have an MDI Application, I have put toolbar and menubar on MDI Parent.
Now, whenever, user presses any of the button or clicks on any menu, I would like to catch that event in MDI child. Is it possible? I also would like to change states of buttons and menus as per the user selection.
Like, if user selects to add new record, do not allow user to navigate, print etc.
Which is the best way to work in this kind of situation? Some one told me to create individual menubars and toolbars on each MDI Child. Is that a good way?
I am really confused. Because, most of the applications are MDI, but I don't have any proper method to communicate between MDI parent and child.
Always, welcomes your comments and suggestions.
Ritesh.
|
|
|
|
|
I am getting info(Cal.SelectedDate) from form Calendar.aspx and sending it to TodayStudy.aspx to populate a datagrid. I am using a session called "GetPKIn". That part works fine, but when I go back to Calendar.aspx and change the info(Cal.SelectedDate) I'm sending to TodayStudy.aspx, the datagrid won't populate with the new info, it just keeps showing what it was populated with originally. The code is below. Thank you!
***********************************************************
Public Class Calendar
Inherits System.Web.UI.Page
Protected WithEvents Header As System.Web.UI.WebControls.Panel
Protected WithEvents Cal As System.Web.UI.WebControls.Calendar
Protected WithEvents lblCheck As System.Web.UI.WebControls.Label
Region "Web Form Designer Generated Code"
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
Session("GetPKIn") = Nothing
End If
End Sub
Private Sub LoadList()
Dim PKSchedule As DataTable = DirectCast(Session("GetPKIn"), DataTable)
If PKSchedule Is Nothing Then
PKSchedule = New DataTable()
End If
Dim sc As New PK.BusinessLogicLayer.Schedule()
PKSchedule = sc.GetSchDescription(Cal.SelectedDate)
Session("GetPKIn") = PKSchedule
End Sub
Private Sub Cal_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cal.SelectionChanged
LoadList()
If Not Page.IsClientScriptBlockRegistered("Next") Then
Dim strScript As String = vbCrLf & _
"" & _
"window.open(""TodayStudy.aspx"", ""_self"", ""true"")" & _
"" & vbCrLf
RegisterClientScriptBlock("Next", strScript) 'go to TodayStudy.aspx(same window)
End If
End Sub
End Class
***********************************************************************
Public Class TodayStudy
Inherits System.Web.UI.Page
Protected WithEvents dgToday As System.Web.UI.WebControls.DataGrid
Protected WithEvents lblCheck As System.Web.UI.WebControls.Label
Protected WithEvents btnCancel As System.Web.UI.WebControls.Button
Protected WithEvents Header As System.Web.UI.WebControls.Panel
Region "Web Form Designer Generated Code"
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
LoadList()
End Sub
Private Sub LoadList()
dgToday.DataSource = Session("GetPKIn")
dgToday.DataKeyField = "ScheduleStamp"
dgToday.DataBind()
End Sub
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
If Not Page.IsClientScriptBlockRegistered("Next") Then
Dim strScript As String = vbCrLf & _
"" & _
"window.open(""Calendar.aspx"", ""_self"", ""true"")" & _
"" & vbCrLf
RegisterClientScriptBlock("Next", strScript) 'go to Calendar.aspx(same window)
End If
End Sub
End Class
**************************************************************************
Public Shared Function GetSchDescription(ByVal ScheduleStamp As DateTime) As DataTable
Dim ds As DataSet = SqlHelper.ExecuteDataset(ConfigurationSettings.AppSettings(NewRecruit.PK.Web.Global.CfgKeyConnString), "usp_tp_GetPKCheckIn", ScheduleStamp)
Dim dt As New DataTable()
dt.Columns.Add("TesterID")
dt.Columns.Add("StudyNo")
dt.Columns.Add("GroupID")
dt.Columns.Add("ScheduleStamp")
dt.Columns.Add("GroupDuration")
dt.Columns.Add("FacilityID")
dt.Columns.Add("NotToExceed")
dt.Columns.Add("LastName")
dt.Columns.Add("FirstName")
Dim r As DataRow
Dim workRow As DataRow
For Each r In ds.Tables(0).Rows
workRow = dt.NewRow
workRow("TesterID") = r("TesterID")
workRow("StudyNo") = r("StudyNo")
workRow("GroupID") = r("GroupID")
workRow("ScheduleStamp") = r("ScheduleStamp")
workRow("GroupDuration") = r("GroupDuration")
workRow("FacilityID") = r("FacilityID")
workRow("NotToExceed") = r("NotToExceed")
workRow("LastName") = r("LastName")
workRow("FirstName") = r("FirstName")
dt.Rows.Add(workRow)
Next
Return dt
End Function
End Class
End Namespace
|
|
|
|
|
Nevermind, I got it.
But thank you to anyone working on it.
|
|
|
|
|
Regarding the winsock, how to use the winsock in VB6.0 to control the socks proxy? Kindly give source code if possible.
|
|
|
|
|
Part of an app I am developing allows the user to change the color of some GUI items. What is the best way to store that color in XML and then set set the color from the XML at a later date?
TIA
Jon
|
|
|
|
|
I have to write e programm similar to chess in VB.Net.Anybody can tell me where I find sourse for that or maybe help files and sites
|
|
|
|
|
Start by analysing the problem, then break it down into discrete areas. Then break it down some more...then some more....ad infinitum....
Problem with chess is that the logic on the opponent side (assuming it's a computer player) will be a BEAST.....probably some components / classes to help on t'internet though...
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Do a google search on chess +"vb.net" - there are a few examples out there but you might have to convert from another language. I would do the search for you but my IE has been hijacked and I can't access most web pages anymore - I get taken to a Lycos search.
Rugby League: The Greatest Game Of All.
|
|
|
|
|
I'm using DataReport. In designing time, I need more spaces to place my fields in the report, so I change the ReportWidth larger.. and complete my design!
When I run it, this error message appears, it says:
"Report width is larger than the paper width"
please, help me... how to increase the reportwidth or paper size?
I've been trying to find the paper size, but it can't help... what should I do with it..
thanks
Varma
|
|
|
|
|
Can any one tell me how to scroll the webBrowser control automatically through the data.Just like in chat application.
suhasini
|
|
|
|
|