|
Dear Sir / Madam
I have created a VB .NET 2005 project with 2 Forms.
Form1 has a Panel1 which is an empty Panel1.
Form2 has a Panel2 with 34 buttons inside this Panel2.
Now i'm stuck on one problem!
Here is the explonation of my application...
1) The application loads up and calls Form1
2) On Form1 I click a button to call Form2
3) Form2 loads up (which is a form with Panel2 and 34 buttons inside this
Panel2)
4) Now when I click on any of these buttons inside the Panel2 (such as
Button1, Button2, Button3 etc...), I want to create a new button and
palce it inside the Panel1 with the AddressOf whatever button I may
click.
E.g. Button1.click -> create new Button -> AddressOf -> Button1.click
If anyone could help me on this by showing with a sample of source code it would be very greatful to me.
I'm a student and very new to VB .NET programming.
I'm looking forward to hear from you.
Kind regards
Roni
|
|
|
|
|
since you already know about addressof, then take it further and use a delegate. pass a delegate to form2 and invoke it back on form1 and create the button calling some routine in form1 to do so...
|
|
|
|
|
isn't this the same question you have asked several times and been told the answer?
______________________
stuff + cats = awesome
|
|
|
|
|
http://msdn2.microsoft.com/en-us/library/system.windows.forms.form(VS.71).aspx
This may get you started, I thought I saw your answer a few days ago but this is all that I could find NOW.
|
|
|
|
|
Hi.
I have a SSIS package named TESTPACKAGE on the 2005 SQL Server.
How I can exeucte it from VB.NET?
I found some articels that refer to Microsoft.SQLServer assembly but I use older .NET Framework version (1.1) and this assembly is not availabe for me in Visual Studio (2003).
I read something about DTEXEC command. Can I use it in the Stored Procedure to run SSIS. I used this code in the Stored Procedure to run DTS package on the previsous/older SQL Server version.
<br />
CREATE PROCEDURE dbo.exportData AS<br />
Exec master..xp_cmdshell <br />
'DTSRUN /SMYSERVER /NTESTDTS /Umyaccess /Pmypassword'<br />
GO
Thank you,
|
|
|
|
|
Don't Cross Post in Multiple Forms.
Regards,
Satips.
|
|
|
|
|
I am working on a program that displays large tiff images and interacts with a database to display attributes on the image. I get a "Parameter is not valid" exception on some of the images. I thought it was a size issue but I can open some tiffs that are greater than 10 MB. I then thought it was a bitonal image issue, but I can open some bitonal images. I don't know what to try next. Could it be combination of file size and format? Any suggestions are greatly apprecated. Thank you in advance.
Andy
Geologist
Casper, WY
|
|
|
|
|
The maximum size of any image in pixels is 32767 by 32767. JPEG compressed TIFF's are also not supported.
|
|
|
|
|
I have checked both of these issues, which do not appear to be the source of the problem. I can open my problem files with other programs but I cannot figure the problem here. It appears to occur when opening larger files (>2 MB) with group 4 compression (I can open smaller files that have group 4 compression). Any further suggestions are greatly appreciated.
Andy Finley
Geologist
|
|
|
|
|
Hi All:
I'm trying to dynamically create a datagrid and fill it with XML data. But I get an "Object reference not set to an instance of an object." error when running it.
See the code below. What am I missing?
<br />
Public Sub CreateDynamicGrid()<br />
<br />
Dim ds As New DataSet<br />
Dim grid As System.Web.UI.WebControls.DataGrid<br />
<br />
Try<br />
'Place the XML information into a dataset<br />
ds.ReadXml("C:\Temp\test.xml")<br />
<br />
'The dataset is used as the data source for our newly created datatrid grid <br />
grid.DataSource = ds<br />
grid.DataBind()<br />
<br />
'grid is added to the PlaceHolder<br />
PlaceHolder.Controls.Add(grid)<br />
<br />
Catch ex As Exception<br />
Response.Write(ex.Message.ToString)<br />
<br />
End Try<br />
<br />
End Sub<br />
Thanks in advance!
|
|
|
|
|
Hi Nicki
Which line is thowing the error? Maybe loose the Try/Catch whilst debugging the problem.
Cheers
Tom
|
|
|
|
|
Hi Tom:
It's this line:
---------------------
grid.DataSource = ds
---------------------
I don't understand how the dataset could be blank. The file I'm pointing to in the ReadXML method has data in it.
|
|
|
|
|
I don't think it's the dataset, It looks like you have not instantiated the grid.
... as Guffa has already eluded to
Hope this helps
Tom
-- modified at 12:51 Monday 11th June, 2007
|
|
|
|
|
You haven't created any DataGrid object, only a reference that can be used for the object.
---
single minded; short sighted; long gone;
|
|
|
|
|
You're right Guffa.
It works now, thanks!
|
|
|
|
|
Hello,
[2005]
I have a windows application and have used the windows installer to create the setup and deploy the project.
The application has been completed, and the customer just wants add some small modules to the project, and change some other modules to make more for the business.
However, the customer doesn't want to install the whole application and just wants to install the parts that have been updated. Using the windows installer the customer has to install the whole application.
Is there a installer (maybe third party) for creating a setup program that will only update the parts that have been changed or been added.
I did use clickOnce, but the customer didn't like this method as it installs under documents and settings.
Many thanks for any suggestions,
Steve
|
|
|
|
|
|
Hi
I am opening up a workbook from Microsoft Outlook an entering a hyperlink to an email message into one of the cells. At first I was using the Hyperlink function but i keep getting a dialog telling me this function is not supported (the function works though as the hyperlink apppears and is functioning when i open the workbook afterwards). I tried to get round this by using file:///filename - this appears as standard text in the cell until i double click on it and then click away - at this point it turns into a hyperlink.
I have tried using file:/// and then programatically selecting the cell and moving away but to no avail.
Does any one know of a suitable way of doing what I want without thest issues?
Thanks
Dan
|
|
|
|
|
Dont know if this will help any but I used to Hyperlink thousands of cells down column A with a loop.
Here is a piece.
ActiveSheet.Hyperlink.Add Anchor:=Sheet1.cells(a,1), _
Address:=Sheet1.cells(a,1).value, _
TextToDiaplay:=Sheet1.cells(a,1).value
Then it would loop to A2, A3 and so on down the line till it errored cause I did not know how to stop the loop. (a,1) is column A and row 1, I think, maybe first row and column 1. I think row is mentioned before column???
This stated whatever text was in cell A1, hyperlink it, yes in my case it was a web address, this was several years ago. Now I use a third party macro recorder, not VBA, and it double clicks on the cell as you mentioned and creates the hyperlink through its double click leftmouseclick code.
Hope the snippit above gives you an idea, check the help file if needed.
|
|
|
|
|
Hi I'm using the following code to create an outlook mail message, but need to bold and undeline certain lines in the message body. How can I do this?
<br />
Dim oOutlook As New Outlook.Application<br />
Dim oMailitem As Outlook.MailItem<br />
<br />
oMailitem = CType(oOutlook.CreateItem(Outlook.OlItemType.olMailItem), Outlook.MailItem)<br />
oMailitem.To = "<name@domain.com>"<br />
oMailitem.Subject = "Order Request"<br />
Dim MailBody As String = "Hi," _<br />
& ControlChars.NewLine _<br />
& "Please could you place orders as per the requirement below" _<br />
& ControlChars.NewLine _<br />
& "I WANT THIS LINE BOLD....." _<br />
& ControlChars.NewLine _<br />
& "Thanks!!"<br />
|
|
|
|
|
Hmmm I havent tried this yet but here are some suggestions:
If the users are recieving the mail as html you could use html tags in you msg.Body
Or since outlook uses word as its email editor - open up word (in code and see what functionality this offers you)
Hope these pointers help
If i get time to look into this i shall try them and let you know my results
Dan
|
|
|
|
|
How can i write a code to edit data from a textbox in a datagrid in vb.net
|
|
|
|
|
Explain more if you want to gat an answer
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
End Sub
Explain meaning of this code line below on button click event-->>>
(ByVal sender As System.Object,ByVal e As System.EventArgs)
Nitin Jenwal
-- modified at 7:10 Monday 11th June, 2007
|
|
|
|
|
google broken where you live ?
The sender is the control that raised the event. EventArgs is useless by itself, but provides a base class for event args that actually contain information about an event, such as the key that was pressed, or the mouse location.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|