|
You'll have to save the .Text values to either a file or to a location in the registry. In your Initialize code, you'll have to read these values back. If they don't exist, substitute the default values you have now. When the user clicks OK, then you can save whatever the values are back to the registry or file.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I see. Thanks! Any suggestions on how such a code could look like ? Where in the registry whould I put such values? Is it better to use a text file?
For the Horde!!!
|
|
|
|
|
Whatever is easier for you, it really doesn't matter. If you going to put hte stuff in the registry, I would suggest under HKEY_CURRENT_USER\Software\YourCompanyHere\YourAppNameHere\YourKeyNameHere. If in a text file, then you can put it in %USERPROFILE%\Local Settings\Application Data\YourCompanyNameHere\YourAppNameHere\WhatEverFileNameHere.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thx!
Best Regards
Jan
WOW Ruules!!
|
|
|
|
|
Example......
I am entering values into text fields etc. Rather than click the button OK, I want to press the enter key which would be like clicking on the OK button.
How is this done?
|
|
|
|
|
Got it....
If e.KeyCode = Keys.Enter Then
call your procedure
End If
|
|
|
|
|
Have you looked at the AcceptButton[^] property of the form? Setting to the instance of a button will click that button when Enter is pressed on the form.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I have a problem when I create a project with VB.NET. I try to assign the access key to the controls in a form by set the text property of the controls with one ampersand (&), e.g. button1.Text = "&Print". When I run the app, it only shows the button as "Print" intead of "Print". However, after I press Alt key, the shortcut appear in the form. Does anyone know the reason for that and how to fix it? Thanks a lot.
Frank
|
|
|
|
|
It has nothing to do with your app or your code. It's a setting in the Display control panel, Effects tab. Clear the checkbox in there that says "Hide keyboard navigation indicators until I use the Alt key".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you very much, Dave. I don't feel guilty now. Cheers.
Frank
|
|
|
|
|
I have a class with a ToString function ...
When want to show then string-representation of the object using MsgBox it works fine ... But when i use MessageBox i'll have a conversion-exception "Object can not be converted to a string" ... or somethinh like that.
Only way to make messagebox show text is using "MessageBox.Show(Convert.ToString(myObj))"
Why is this?
Can I get around it with some kind of manipulation of my Class?
//Maw
|
|
|
|
|
How are you using the MessageBox in code when you get the conversion exception?
|
|
|
|
|
Check out this small project : http://www.itaq.se/tostring.zip
I know that ListBox and some other controls goes for the .ToString by default. In this case it's an advanced conversion-question. I also want to assign a varibale like
"Dim MyVariable as string = MyObject" and MyVariable gets the string-representation of object.
In my project I implements IConvertible ...
Check it out ...
//Maw
|
|
|
|
|
<in form1="">
Dim frm2 As form2
Public Sub ClearProject()
frm2.TextBox1.Visible = False
frm2.Hide()
End Sub
<in form2="">
Dim frm1 As form1
Public Sub Button1_Click(Byval sender as System.Object,Byval e as EventArgs)Handles Button1.Click)
frm1.ClearProject()
End Sub
The codes look to be correct and simple enough, and I'm able to run the application as well. However, whenever i click the button in form2 to clear my project, there would be an error. Anyone know why?
|
|
|
|
|
What error? It's hard to determine the problem if you are not specific!
|
|
|
|
|
Chang
Dim frm2 As form2
To
Dim frm2 As New form2
MCAD
|
|
|
|
|
<in form1="">
Dim frm2 As form2
Public Sub ClearProject()
frm2.TextBox1.Visible = False
frm2.Hide()
|
|
|
|
|
Hi all,
i involved in HR project which scans the resumes and stores into the databse. i need to read the multiple files like,.doc,.pdf,.xls etc.that are already stored in database. I need to open the file based on the extension programatically.
Phanindra...
|
|
|
|
|
If you need to open them in the original application that wrote them, then all you need to do is retrieve the file out fo the database, save it to a temp folder, then launch that document using the Process class. It'll launch in whatever app is registered to handle that file extension.
If you need to parse that file yourself, you'll have to write individual parsers for each file type. It's trivial to determine what type that is, all you need to do is look at the last three characters in the filename to get the extension. Parsing those files is the hard part.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I paint the form on form_paint event. Form has some labels.when i paint the form, labels r still systemcolors.control colored. what can i do to force them changing theirs colors. The Transparency Background is not working on Desktop forms.
|
|
|
|
|
Hi All,
I'm doing some research on migrating existing vb6.0 appliation to vb.net. I would like to know what all tools available apart from migrate tool, which come along with .NET IDE, to upgrade vb6.0 application. Any suggestion/ Idea would be appreciated.
Regards,
Shiby
|
|
|
|
|
The migration tool in Visual Studio .NET is about the only thing there is. But, instead of putting up with the code that the conversion tool generates, I would highly suggest scraping the original project and just rewriting it from scratch.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi all,
searching the internet for printing/converting an Excel file into PDF let me to the following code.
Dim oXL As Excel.Application
Dim oWB As Excel.Workbook
Dim oSheet As Excel.Worksheet
Dim oRng As Excel.Range
' Start Excel and get Application object.
Set oXL = CreateObject("Excel.Application")
oXL.Visible = True
' do other things with the oSheet object
oSheet.PrintOut Copies:=1, ActivePrinter:="Adobe PDF on Ne01:"
but after some error messages I discovered that on my machine the ActivePrinter:="Adobe PDF on Ne01:" should rather have Ne02 in it.
Is there a programmatic way to find/set the correct ActivePrinter property on a machine. Adding a loop for "Ne0" + i doesn't look elegant.
thanx in advance
|
|
|
|
|
|
in my application i need to open the existing crystal report files, as in cyrstal report designer ( i need to edit/modify/add controls/formulas to the report). how can i do this ? any idea? please help.
Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
|
|
|
|