|
hello there
I am using vb.net 2003. my problem is
I have 10 panel control containing different number of labels on each panel. when user double click on the label the event should be fired. now the problem is when I run the control on the windows form it fires the event for the control. and if you double click on label it fires the event written inside control. what I want is when User Double click on Label the event the for the Control should fire and it should contain some values which I want to pass from label to user Form.
|
|
|
|
|
Look up info on defining Events and using the RaiseEvent statement.
|
|
|
|
|
Hello,
A week ago I was using Visual Studio to make a quick fix to a VB 6 application. Sadly whilst I was compiling the project my machine crashed suddenly (of all things a fuse blew in the plug !) and now the "Make <project_name>.exe" and "Make Project Group" options in the "File" menu are now permanently greyed out in the Visual Studio IDE. So I'm now in the position where I can only compile using the command line (e.g. "vb6 /m <project_name> /outdir <path>")
After much experimentation I have even tried reinstalling Visual Studio but when I do so it tells me that the IDE is still running (even though it's not)
I am therefore of the opinion that there is either a file or a registry key that has been left behind by the failed compilation which is making the IDE "think" that there is currently a compilation in progress.
Any help as to what this file/registry key might be would be much appreciated as it's rather tedious to only be able to compile from the command line (I can no longer use interactive debugging for one thing)
And please don't tell me to reinstall Windows as I'm simply not willing to do so (just to fix one little problem with one product) !
Thankyou
|
|
|
|
|
You might want to look into reinstalling the last service pack you installed for Visual Studio. If that doesn't work, it looks like you'll have to uninstall, then reinstall Visual Studio. Remember to reboot after uninstalling VS.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well thanks for the advice and I'm sorry to seem churlish but this is not what I want to do.
It is plainly obvious that the problem is due to some part of the compilation process creating either a "supposed to be temporary" file, registry key or change to some INI file etc. which has not been cleaned up after the crash.
So I'm sorry but I'm not going to start doing the usual retarded "uninstall, reinstall, try again" methods. I'd rather junk the box and get someone else to do the work (I'm helping out) I'm going to try to find out what is causing the problem, fix it, then document the fix (at least in this thred)
It's this complete lack of transparency in Windows software that makes it (IMHO) unusable in a professional environment and is a major reason why I now do most of my development on Linux (using mono)
So thanks again for the reply but I want to know what's causing the "Make" option to be greyed out and how can I get it back.
|
|
|
|
|
Since the command line compiler still works, it's not any problem with the temp or .OBJ files that are generated.
Anonymous wrote:
It is plainly obvious that the problem is due to some part of the compilation process
Really? I didn't see it that way. Since everything in the menu and tool bars is customizable, there's the very real possibility it's because of a screwed up configuration in the IDE. The problem is that this configuration isn't stored all in one place.
You might want to try View > Toolbars > Customize, select Menu Bar, and click Reset. Or if you have your VB menus customized and don't want to reset them, you can remove the Make option and re-add it.
Anonymous wrote:
So I'm sorry but I'm not going to start doing the usual retarded "uninstall, reinstall, try again" methods.
The only thing retarded about this is that you competely dismissed a couple possible fixes for your problem just because "you don't like it". A simple Google search for "VB6 Make Greyed" would have told you that there are a bunch of possible causes of this problem. So no one solution is "obvious".
Good coders NEVER discount their code as a possible cause of a bug, just because they "know" their code is good.
Anonymous wrote:
It's this complete lack of transparency in Windows software that makes it (IMHO) unusable in a professional environment and is a major reason why I now do most of my development on Linux (using mono)
Since we've started bashing Windows, how about this. I find Linux to be a PITA to configure because of all the cryptic config files all over hell. Most of which have only gotten a tool to properly interpret them for you in the last 3 years. If you want a major reason why Linux isn't mainstream in the business environment, there's a bug one right there. Don't get wrong, things are improving greatly and Linux is making progress chipping away at the Microsoft Monopoly, but there's a long way to go...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am a noob at VB6. I have created a dialog with prefilled info as help for the user who will use this word template functionality. The prefilled info is put in the dialog textfields via "initialize" as shown in the codesnibbet below. Everything is then cascaded throughout the text in the template. It works fine but...This "Initialize info" is always shown when using this Macro. What I want is to save what ever the user last put in the textfields and show that the next time he/she uses this Macro/File. How can I do this?
Thanks for any help!
Private Sub UserForm_Initialize()<br />
With FrmDocProp<br />
.TxtProject.Text = "info"<br />
.TxtClient.Text = "Info"<br />
.TxtDocType.Text = "Info"<br />
.TxtPreferredDate.Text = "Info"<br />
.TxtAuthor.Text = "Author"<br />
End With<br />
End Sub
WOW Ruules!!
|
|
|
|
|
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...
|
|
|
|