|
What exactly do you mean by 'forms controls data has changed' ?
Do you mean that if they user has changed something on the form then show a msgbox("Data has changed, do you want to save changes?",vbyesno) on exit ?
If so, all you would have to do is find make your program remember what the settings where when the program was started( the best way to do this would be to use registry entries or you could make your program put it's settings into a text file. And then all you would have to tell your program to do would be to check to see whether the settings had changed and on form.closing event tell the program to check the settings from the file/registry entry and compare to what the settings are now. If something has changed then display a msgbox("Data has changed, do you want to save changes?",vbyesno)
I know you asked for an easy solution, this looks like it might be alot of work.
Hopes this helps!
|
|
|
|
|
You'd have a flag in your form code that starts out being false. You then handle the Changed events for your controls, like TextChanged for a Textbox, ... And the set flag to true. When your dialog gets dismissed, change the flag. If it's true, "Do you want to save changes?"...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I need to move all the controls from a panel on one form to another Form then remove all the controls from the original panel. How would i go about this.
Posted by The ANZAC
|
|
|
|
|
You haven't supplied any details about why you're doing this. But, dare i say it, Select all the controls, Cut, click on the target form, Paste. Then you'll have to do the same for all the code behind those controls.
Or did I not miss something that you didn't say in your original post?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Sorry about that Dave, i am trying to do this programatically during runtime. I did intend to specify that but i'd only just got up and it slipped my mind.
Posted by The ANZAC
|
|
|
|
|
Well, you have a problem then. The controls can be moved to another form, but moving the code can't be done. You'll have to create new controls on the target form, then wire up all the events manually. The more I think about this, the bigger my headache gets.
What are you trying to do with this??
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Nevermind... Thanx for trying to help. Just to satisfy your curiosity, i was creating a form from scratch using MDI but have no realised the very issue you were stressing over. I can move th controls yet not the code for each and therein lies the problem. Thanks for the help anyways.
Posted by The ANZAC
|
|
|
|
|
Are you trying to do this programically or in the design time enviroment
|
|
|
|
|
Does anyone know of any resources I can use to learn how to paste text from a text box on a windows form into a web page on the internet? The web page will not belong to me, so I will not have any access to the code for the web page.
Basically, I would like to figure out how to identify a particular textbox on the web page. Something that would activate IE and then tab to a particular textbox on the web page and then paste into the textbox on the web page.
In the near future I will be working on a product for my company that uses a windows application to create a file note that will need to be inserted into a web page for submission to the site. Basically, we have vendors working for the company that have employees that do not understand how to copy from one application and paste into another, and I am looking for resources to facilitate this for them.
Any assistance is appreciated.
Thanks
RoedRunner
|
|
|
|
|
I have written an app that did something like that.
If you are using .net 1.1 use the AxSHDocVw.AxWebBrowser control. It is an imbedded browser control.
If you are using .net 2.0 use the WebBrowser control.
Then you just need to do some things with SendKeys method.
Hope that helps.
Ben
|
|
|
|
|
Thanks for pointing me in the right direction. I will look into both of these.
RoedRunner
|
|
|
|
|
hi i am using sql 2000 server, vb.net (1.1 ver framework).
i am encrypting the data using tripledes.
i want to run the like query on my table.
the datatype is varbinary in table.
-- modified at 13:11 Friday 9th March, 2007
|
|
|
|
|
And your question would be?
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
If you trying to search on data your application encrypted before it was stored in the database, it's not going to work. The database would have to decrypt everything in order to search it, slowing performance considerably.
I'm certainly no expert in SQL Server, so you might want to ask this in the SQL Forum.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I'm using windows trackbar in my vb.net application.
If I set the maximum value to 10000000 the application use memory in about 55 M
This is very problematic situation.
I'm looking a way to reduce the amount of memoty use.
Thanks
|
|
|
|
|
You'll have to look elsewhere in your code. The TrackBar won't do what you're describing. There is nothing special about the TrackBar that setting the MaximumValue would change its memory usage.
BTW: Where are you getting this memory usage number from? Don't tell me you looked in Task Manager?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I suggest to you to build a simple windows application which include only a trackbar control.
In first time set the maximum vulue to 100 and in the second time update the maximum value to 10000000. You will see different memory usage foe each run. I recognize direct relation between the maximum value and the meory usage
|
|
|
|
|
That's really odd and very unexpected. I have no idea why it's consuming so much memory. but, from what I can figure out, there's no way to reduce the memory consuption. It appears that the underlying control is allocating lots of objects, but for what I have no idea.
The workaround is really easy. Since you can't possibly pack 10000000 stops into a TrackBar of any size, scale the values you use for Minimum and Maximum, as well as the Step values, down to something that the TrackBar can handle more easily.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
Maybe a kind of a difficult question but here we go:
Is it possible to print all the controls located in Panel1 (name of the panel) on an A4 format paper, in CD-Slimcase size and keeping its aspect ratio?? Im trying to make a cover printing utility and it works so far, now i just need printing and I cant find a way do so Can someone help me please? Thanks
--Zaegra--
|
|
|
|
|
Hello!
Sorry, I couldn't find any contact section in the web site to submit a login related problem to a site builder and I decided to post this message to VB.Net Forum because some of site builders are in this forum.
Yesterday, I forgot my password to sign in web site and I clicked "Password Help" section. I both tried submitting my email address and then also my display ID to get the password by email. But it has been over 36 hours, I haven't received the email from codeproject.com. I decided to create a new account to submit this message to codeproject.com because I couldn't find any link on the pages where I would submit such problem to web master or a site builder. Would you please, send my password to my email address. My previous account's display name is "JUNEYT". Is there a section where users can submit such problems or cancel their accounts?
Thank You.
|
|
|
|
|
Such requests should go into 'Suggestions' and not specific Topic Areas (TAs).
|
|
|
|
|
After creating a .exe file(setup) for application, it doesnt runs on some systems,
coz no framework (1.1 or 2.1) is being installed on that system.
can we do something so that setup of framework is inclueded in setup and deployment of vb.net application.
if yes please tell me the procedure.
thanks.
|
|
|
|
|
Just goto Project Properties > Publish > Prerequisites . Then just check the ".NET Framework" option.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
How i can write a wizart which run at design time and adds controls to form object in vb.net
|
|
|
|
|
hi i want to expand and shrink the panels in my application whil runtime how i can to achive that
pls reply early
with regards
Balagurunathan.B
|
|
|
|