|
You're already In the "Changed" event, you don't need to change the valud a second time, doing so causes the event to be refired, and since you're toggling the value you get an infinite loop.
Take out the "PreviewFotoChkBx.Checked" lines and I think it will do what you want it to do.
|
|
|
|
|
look the problem is u r using the function PreviewFotoChkBx_CheckedChanged which handels the checkbox checked property.and in it the if condition you r changeing the property againg so function calles it self again and ur programe goes in infinite loop. insted of using checked property(handling checkedchanged)use click then it will work fine.best of luck
GET BACK 2 ME
|
|
|
|
|
OK. I have to giggle a little bit here.
Follow your code. This is the CheckedChanged event right?
Well, if the user clicks on a empty checkbox, the value of Checked changes to True , right? This fires the CheckedChanged event, not because the box was checked, but because the value of Checked was altered. Now, in your code, you check the value of Checked , then change it to the opposite of what it is set to. This fires the CheckedChanged event again because, well, you changed it! Guess what happens next...
Why are you changing the value of Checked at all? Don't! As far as I can tell, you don't need to do it for any reason. All your doing is changing the size of the form based on whether the checkbox is checked or not. Why is your code changing the checkbox value?
Eliminate the lines that are changing the checkbox:
Public Class LogFotosForm
Private Sub PreviewFotoChkBx_CheckedChanged( _
ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles PreviewFotoChkBx.CheckedChanged
If PreviewFotoChkBx.Checked Then
Me.Width = 320
Else
Me.Width = 450
End If
End Sub
End Class
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dooh!
I promise to think next time before asking. No I'm not blond!
Thanks to all!!
Thanks,
Karen
Nooobie to OOP and VB.Net 2005
|
|
|
|
|
I have an application which contains the database connection string plus some other keys containing file paths that the user needs to use stored on key at the app.config file of the application. Is there a way that I can let the user modify the value for those paths when installing the application? this is because depending on where the application is installed the user decide where to store some files, and that's what those paths in the app.config file are for. I created a msi installer for my application, but I haven't found (and still don't know if it's possible) how to let the user set properties to the app.config file when using my installer file.
Any help will be greatly appreciated
|
|
|
|
|
You can create a Custom Action using an Installer class that will run at the end of the install. You will have to add everything you need to do this to the installer class, such as maybe showing a custom dialog, the folder browser, etc. Since app.config files for some stupid reason were never designed to allow them to be updated dynamically, there is no built-in support for modifying them, so you will have to code that manually as well.
Sorry, no example code - this is too complicated to just write out.
Search for Installer class examples and tutorials...
|
|
|
|
|
I have 2 projects: one in ASP.NET and another in VC++(VC7). ASP.NET will be placed on Server and VC++ on Client.
The client will sent data to server and receive the data from server.
I want to debug as follow:
I set client as startup project and anytime the data is sent from client to server, I want the breakpoint I set before on server will be activate.
The server now is on localhost.
How can I do that????????
Hung
|
|
|
|
|
Since the debugger can attach to only one process at a time, you'll have to launch a second Visual Studio instance and attach it's debugger to the server. One instance will debug the server, the other instance will debug your client.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I don't understand your idea. Can you explain more details! Thanks!
Hung
|
|
|
|
|
What's so hard to understand? Launch a second copy of Visual Studio! One instance of VS will debug the server part and the second instance will debug the client.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a value in in textbox1 on form1 and want to use this value on form2.
I thought it was simple and proable is but once again I am lost?
I am new to VB my background is VBA.
In VBA simply me.textbox2.text = form1.textbox1.text
|
|
|
|
|
An it could be the same also in VB.NET. The point is that your question is not very clear to me. What are form1 and form2: public, private?
You have several ways of doing it.
1) When you need it inside form2 code simply go for:
Textbox2.Text = Form1.Textbox1.Text (as you wrote, but make sure Form1 is a real object)
2) Whenever something changes in Form1
Private Sub TextBox1_Changed(...) handles TextBox1.Changed ' (not sure if it's changed the event name, better double check)
Form2.TextBox2.Text = TextBox1.Text ' (again make sure Form2 is a real object)
End Sub
Hope it helps.
If it doesn't please state the problem/error
|
|
|
|
|
try simply:
Me.textbox2.Text = textbox1.Text
Patrice
|
|
|
|
|
The numerical value I want to use on Form1 = frmSnow is a textbox = tbxSL
The value of the textbox is calculated based on user selections on Form1.
I want to use the value on Form2 = frmDrift1 to perform other calculations.
Code Line
Me.tbxDensity.Text = frmSnow.tbxSL.text
Problem
Reference to a Non-Shared Member requires a Object Reference
|
|
|
|
|
Thanks for Help
I think I got it
I never created an instance of the form.
|
|
|
|
|
does anyone know how to trap HTML opening & closing HTML tags within string using regular expression>
|
|
|
|
|
hi every one , plz help me to crear or to call ms agent in application in VB 6.0.
i want to show as help asistant in ms office.
plz reply me at ambujpande@gmail.com
regards
Ambuj Pande
|
|
|
|
|
Add a reference to Microsoft Agent in your project's References or add the Microsoft Agent Control to your form and use the Set Char = Character.Load ("CharacterName", "CharacterFilePath") to load the character.
|
|
|
|
|
|
sun of tuscany helps grapes
|
|
|
|
|
i need help in changing the txt colour in the txt box by pressin a button i've only just started this
|
|
|
|
|
under the click event, try this
Textbox1.ForeColor = Color.Red
That will change the font color of the textbox to Red.
|
|
|
|
|
In VB6, is there a way to manage the printer spool for adding documents in stand-by mode, remove them when necessary, ... ?? I'm wondering if there's a way to do that not depending onto the printer selected.
Thanks in advance,
Marc Soleda.
PD: I've posted the same message in VC++ forum bcause I need to do it in both platforms.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
There are a number of API calls in Winspool.drv that allow you to monitor, alter and delete print jobs e.g. OpenPrinter, GetJob, SetJob, FindFirstPrinterChangeNotification etc.
|
|
|
|
|
Hello All,
I have developed an application using vb.net. Now I want to create its setup in InstallShield 10.5. The problem is that in the setup I need to check two things
1. Microsoft .Net Framework 1.1 is installed
2. MDAC 2.7 is installed.
If any of them is not installed on the destination machine then install it else not.
Plz tell me how to achieve it. How to apply conditions on setup.
Thanx in Advance
_mubashir
|
|
|
|