|
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
|
|
|
|
|
The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window. This function does not perform a case-sensitive search.
What i want to do is something entirely different.
Nice try though.
All your source are belong to us!
|
|
|
|
|
Hi. I'm a relatively new programmer to VB .NET so have a few stupid questions.
On validating user inputs into textboxes and such, is there a way to validate or restrict input to number or alphanumeric only? The few instructions I found seems to require creation of custom codes to do so. I'm getting frustrated by this atm. One workaround that I did was:
dim currentstring as string
KeyDown event
if the key pressed was a number (or backspace), then don't do anything
else set a flag to true
end if
TextChanged event
if flag is true then restore original currentstring
else currentstring = txt.Text
end if
flag = false
So in essence, if a user presses any other key aside from backspace and numbers, it restores the string in the textbox to the last successful string input (currentstring).
Then another question is whether I can retrieve the source of a webpage without the use of ASP. The idea of the program is to be able to get a word count of a webpage just by entering the URL.
Thanks for any help with these dilemmas.
|
|
|
|
|
There lots of way of doing it.
The more appropriate (in terms of OOP) is to write a class (i.e. NumericTextBox) that inherits from TextBox and adds the functionality you require.
But if you look around there are tons of pre built classes for that.
About retrieving web pages you don't need any ASP. Just have a look at the .NET FW documentation and you'll see that there are classes ready to be used for that. Thay may differ from 1.x to 2.x. Try to use one of the WebRequest derivated classes.
|
|
|
|
|
I don't understand this one...
Almost everything works except the Update on the grid: Delete, Cancel, Edit*
If I take the Load_Grid out of m_dgIDs.EditCommand--I have to click the Edit link twice for it to turn into a textbox that I can edit, but the original content is not there.
If I leave the Load_Grid in the EditCommand, the textbox will appear immediately with the cell's content and I can edit it. HOWEVER, the grid no longer appears to be bound and this line blows up:
Dim id As Integer = CType(e.Item.Cells(0).Text, Integer)
e.Item.Cells(0).Text is = "" or nothing
I tried to keep this code to a MIMIMUM because I know it is a lot to ask of forum members, but if someone has the time, I would appreciate any thoughts on the subject.
Thanks - A Lot.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Load_DropDown()
End If
End Sub
Private Sub m_ddFacility_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles m_ddFacility.SelectedIndexChanged
Load_Grid()
End Sub
Private Sub dgIDs_Update(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) Handles m_dgIDs.UpdateCommand
'ID is just a simple class that interfaces with the database & has 3 properties
'CostCenterID, FacilityID, & Description...pretty trivial
Dim oCostCenter As New ID
Dim id As Integer = CType(e.Item.Cells(0).Text, Integer)
oCostCenter.Load(id)
oCostCenter.Description = CType(e.Item.Cells(2).Text, String)
oCostCenter.FacilityID = m_ddFacility.SelectedValue
oCostCenter.Update()
Load_Grid()
m_dgIDs.EditItemIndex = -1
End Sub
Private Sub dgIDs_Edit(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) Handles m_dgIDs.EditCommand
m_dgIDs.EditItemIndex = e.Item.ItemIndex
Load_Grid()
End Sub
Private Sub dgIDs_Delete(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) Handles m_dgIDs.DeleteCommand
Dim oCostCenter As New ID
Dim id As Integer = CType(e.Item.Cells(0).Text, Integer)
oCostCenter.Load(id)
oCostCenter.Delete()
Load_Grid()
End Sub
Private Sub dgIDs_Cancel(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) Handles m_dgIDs.CancelCommand
m_dgIDs.EditItemIndex = -1
Load_Grid()
End Sub
Private Sub Load_Grid()
Dim ds As DataSet
Dim oData_Dev As New CFormData("DefaultConnectionString")
ds = oData_Dev.GetDataSet("SELECT * FROM CostCenter WHERE FacilityID = " & m_ddFacility.SelectedValue.ToString())
m_dgIDs.DataSource = ds
m_dgIDs.DataBind()
End Sub
Private Sub Load_DropDown()
Dim ds As New DataSet
Dim oData_Dev As New CFormData("DefaultConnectionString")
ds = oData_Dev.GetDataSet("SELECT * FROM Facility")
m_ddFacility.DataSource = ds
m_ddFacility.DataTextField = "FacilityName"
m_ddFacility.DataValueField = "FacilityID"
m_ddFacility.DataBind()
End Sub
---The Page---
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="GridPage.aspx.vb" Inherits="TestEnv.GridPage" %>
<HTML>
<HEAD>
<title>GridPage</title>
<meta content...>
</HEAD>
<body MS_POSITIONING="FlowLayout">
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" border="1">
<TR>
<TD colSpan="2">
<asp:datagrid id="m_dgIDs" runat="server" Width="100%" AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn Visible="False" DataField="CostCenterID" HeaderText="CostCenterID"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="FacilityID" HeaderText="FacilityID"></asp:BoundColumn>
<asp:BoundColumn DataField="Description" HeaderText="Description"></asp:BoundColumn>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
<asp:ButtonColumn Text="Delete" CommandName="Delete"></asp:ButtonColumn>
</Columns>
</asp:datagrid></TD>
</TR>
<TR>
<TD>
<asp:DropDownList id="m_ddFacility" runat="server" AutoPostBack="True"></asp:DropDownList></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
|
|
|
|
|
Yeah, I am not sure what the "real" answer was to this. I threw it all away, used the MS example from help--then, added my code back in. I could post it upon request.
Thanks Anyway.
William
|
|
|
|
|
I have a situation where I have standard form class that I created. It inherits from System.Windows.Forms.Form as a public class. The only thing added to this class is a series of variables for passing data to these forms. There are no functions or overrides in the class.
I then create a FRIEND form that inherits this class. I put a textbox on the form and I can't use CTRL-V. In fact, I trapped the keydown events and if I do 'V', I get a keycode, if I do CTRL-SHIFT-V, I get a keycode, but if I just do CTRL-V, I don't even get a keycode (it never throws the keydown event at all.) And it won't paste anything into the control.
If I change the form to inherit the System.Windows.Forms.Form directly, it traps fine and pastes the text from the clipboard into the control.
Any ideas as to what would cause this to happen?
--In a world without fences, who needs Gates?
|
|
|
|
|
I am trying to figure out how to send data and my customer to my banks web site to enroll for paying their bills online.
The post string that I am suppose to use is:
https://banks_web_site.com/enroll?id=12345&name=Customer&accountid=98765&backurl=https://my_web_site.com/return.aspx
The bank will return to me the following info and my customer (so they can continue the payment process) via https://my_web_site.com/return.aspx?return=0&enroll_id=765431
I'm having trouble trying to get this to work, any help would be appreciated.
Another thing that has me stumped is if I do what the bank calls a payment search, I send to them with no return url:
https://banks_web_site.com/pay_search?id=12345&&enroll_id=765432&days=2
They will return the following:
0:::
7777:1:1123123123:VISA:987554
8888:1:1231238744:AMEX:876454
Unlike the first example, the returned info is not qualified by a query string name. How do you receive this data ?
|
|
|
|