|
The easiest way is interactively:
double-click a file with that extension in Windows Explorer
when it shows its dialog telling "Windows can not open..." choose "select from list",
then "Browse", browse to your exe file, check the checkbox "Always use..." and
click "OK". This will create a permanent link and register it.
You can do that programmatically also, I don't know the details be heart.
|
|
|
|
|
Thanks Pattyn
I have posted this message here because I need to do it programmatically.
|
|
|
|
|
Hi,
search CodeProject for file association
(that would have worked yesterday too)
|
|
|
|
|
i want my program to load graphics from a directory and display them onscreen... how do i go about doing this?
|
|
|
|
|
I'm assuming the files are pictures (jpg,jpeg,gif,tiff,...)
than you can just go to the directory and for every picture you find in it you create a picturebox with the imagepath to that directory/picturename
|
|
|
|
|
hi all
i need to write the click event of the form's close button on the upper right corner of the form usualy the X button
how can i do this
|
|
|
|
|
Handle the Form's Closed or Closing event based on what you want to do. In VS .net 2005, they have been renamed to FormClosed and FormClosing
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
hi
i m trying to change the parent of a toolstrip to form2 to form1 the code is
Private Sub toolstrip1move_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.TopMost = False
Dim tools1 As ToolStrip = CType(sender, ToolStrip)
tools1.Parent = Form1
tools1.Hide()
End Sub
but the tools1.parent = form1 causing the error
|
|
|
|
|
The formClosing event fires whenever the form starts to close, including when the X button is clicked.
You can then to things like ask the user if they are sure they wish to exit the form and stop the form from closing in needs be.
for example :-
Private Sub myForm_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing<br />
<br />
Select Case MessageBox.Show("Do you wish to exit?", "My Form", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)<br />
Case Windows.Forms.DialogResult.Yes<br />
e.Cancel = False<br />
Case Windows.Forms.DialogResult.No<br />
e.Cancel = True<br />
End Select<br />
End Sub
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
thnx but my rguments r little bit different
i m trying to change the parent of a toolstrip to form2 to form1 the code is
Private Sub toolstrip1move_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.TopMost = False
Dim tools1 As ToolStrip = CType(sender, ToolStrip)
tools1.Parent = Form1
tools1.Hide()
End Sub
but the tools1.parent = form1 causing the error
|
|
|
|
|
first of all:
eyes2007 wrote: Dim tools1 As ToolStrip = CType(sender, ToolStrip)
will not work
sender is of the type Form
second: I'm not really shure what will happen if you just change the parent of a control
my sugestion would be that you call a function on form1 wich dynamicly recreates the tools1 that way you'r form2 can shut down whitout any problems (but like I said don't know if it is needed)
perhaps something like this would be better:
form1.controls.add(tools1.clone) (don't know if possible didn't test it)
|
|
|
|
|
its not doing the work needed
the only option is that
i creat a button that exactly lools like the close botton on form place exactly on that close button and write the click event of that one
but i don't like to use this
|
|
|
|
|
what exactly do you want to do??
if you want to catch the 'X'button click event you need to use the formclosing/formclosed event of the form (best to use the formclosing that way everything is still on the form)
|
|
|
|
|
Hi all,
Iam getting error when exporting asp.net webpage contents into pdf file.If u have any idea plz revert me.The error is "The file couldn't open because the file not supported/it was damaged.
Thanks,
Aswath
|
|
|
|
|
I try to fill a datagridview from a datareder,and assign each value in the reader to a column
but i don't know
can someone help me ?
Thank you
Assaf
|
|
|
|
|
hi assaf,
i think DataReader is a forward only stream, you should use a DataApdater and
a DataSet for you to be able to display the data in the DataGridView
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Thanks Rupesh
But i don't know how to let the DataGridView show the result in the DataSet
I use DataAdapter and A DataSet!
If Someone can help me ?
Thanks in advance
Assaf
|
|
|
|
|
i want to store data in bengali into SQL server and when i would retrieve the data it will come to the text box in bengali.pls help .
I want know more about .net
|
|
|
|
|
Use nvarchar columns to store the data.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
On the taskbar, the buttons representing each open program resize themsleves between two boundaries, generally betwwen the quick launch bar and the notification area. Is it possible, and if so how, to change these boundaries so that taskbar item boundaries will reduce the space items occupy.
|
|
|
|
|
Hi,
I am using a datagrid view to display table data via dataset.
additionally I have a number of text and combo boxes where the user can enter filter information
so for example the data grid has 2 columns a product and a price.
The product filter is a combo box and the the price filter is a textbox.
acceptable filters would be
for the product:
a selected product ( phillips screwdriver)
a wildcard entered directely into the combo ( *screwdriver* )
for the price:
> 50 And < 300
<= 20
What I am looking for is an easy parsing technique that would convert the user entry into something an SQL where clause (or even a dataset select ) would understand
ie
Where [Product] = "phillips screwdriver" and [Price] > 50 and [Price] < 300
does anyone have an example algorythim for this kind of thing so that I can build code (or indeed any code to do this would be greatfully received - I can always build an algorythim from it)
Thanks
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
|
|
Actually what I want to do is pass a dataset to the GUI holding say
Select * from Customers.
then use the User input and build a Dataset/DataView Filter on the returned dataset
so no SQL injection
but its a good warning.
thanks
also in this app , some data will come from SQL DB and other data from Oracle DB
so I have written a middleware layer which will retrieve the data but I dont want to use stored procedures at the DB level when my middleware is currently generic enough to handle both DB's via "standard" SQL.
thanks
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
|
i am writing a program to get processes from the task manager to a text box. i managed to get the processes to an variabel,but when i try to send the data to a string variable...... it does not work.
i want to know how to change data from an array to a string....
shiran
|
|
|
|
|
sixecho wrote: i want to know how to change data from an array to a string.
Loop through your array contents and append them in a string.
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|