This is a snippet I use to clear a form. Right now it clears: TextBox, RichTextBox, ComboBox, CheckBox and RadioButton. More can be added if needed... :)

Member Avatar
Member Avatar
+4 forum 5

Hello Daniweb Community, I was wondering if there is a way to reset a tabcontrol. What I'm wanting to do is have it so when the user will click New it will reset all the tabpages to the way they were when they started the program up. I tried this TabControl1.TabPages.Clear() TabControl1.TabPages.AddRange({TabPage1, TabPage2, TabPage3, TabPage4}) But all it does it remove the pages then re-add them with all the data still there.

Member Avatar
Member Avatar
+0 forum 3

Hello, so I'm completely re-designing and updating files on the website, but the problem is, that everytime I change e.g. index.html file the website stays the same. I think that it has something to do with the browser's cache. It happens more often on Firefox, but I just hit ctrl+f5 and I'm refreshed, but I don't want to tell visitors "So yeah, just hit ctrl f5 everytime and you're good". Is there a simple way to refresh or update the site instead of renaming all files or changing domain etc. I'm really desperate at this point, I still have tons …

Member Avatar
Member Avatar
+0 forum 2

Hey, I'm making a website, and have some css to put two divs next to each other. This is my css and HTML code : [CODE].class1 { float:left; border-right:2px solid #000; } .class2 { float:right; } .class3 { clear:both; }[/CODE] HTML : [CODE] <div class="class1"> Div 1 </div> <div class="class2"> Div 2 </div> <div class="class3"> <!-- I'm working in a container div. --> </div> [/CODE] At the moment it comes out like this : [CODE] Div1 | Div 2 [/CODE] but I want to make it like this : [CODE] Div 1 | Div 2 [/CODE] Any ideas how to …

Member Avatar
Member Avatar
+0 forum 8

Hi there! i need your help regarding BIOS password not working on my emachine(also known as e-system) ei3103 notebook laptop, the issue is not that i have forgotton my password, i am applying correct password but its not accepting it, when i give it 3 times, then i get 'System Disabled' message with some error code.Perhaps i could fix it if i have not applied the same password not only for entering in BIOS, but i also applied it on system start up, so can not even boot it from the CD as first boot device option setting (as i …

Member Avatar
Member Avatar
+0 forum 2

Does clear use removeAll method for listViews? I have a program that reads a file and stores the data in multiple arrays. I then use that data from the arrays to display them in a ListView, TextFields, a ComboBox, and a TextArea. I am also using an ActionListener to get the changed event for the ListView Selection. When the changed event fires, it gets the data from the arrays and populates the fields. The problem is when I save the items to the file, and it reloads the list, it will display the name properly, however the ComboBox, the ID …

Member Avatar
+0 forum 0

So I'm trying to figure out why my get method doesn't pass its test. This is my attempt at the get method: public Value get(Object key) { //Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. for (Pair<Key,Value> item : list) { if (item.key.equals(key)) { return item.value; } } return null; } public Value put(Key key, Value value) { //Associates the specified value with the specified key in the map. for (Pair<Key,Value> item : list) { if (containsKey(key)==true) { //A map m is said to contain a mapping …

Member Avatar
Member Avatar
+0 forum 5

Hello good day. I am having trouble letting my listeners wait on each other. I have a 1. JComboBox 2. JList - groups 3. JList - students The choice from the JComboBox, clears and updates the groups JList by way of an actionlistener. The ListSelectionListener for the groups JList, then responds to you selecting data (that was just added). The choice is refelcted in the students JList. The trouble is I am getting a NullPointerException at random times. I believe this happens because in order to update the groups-JList via the ComboBox's ActionListener, I need to clear it's contents first. …

Member Avatar
Member Avatar
+0 forum 6

My question is clear ^^ How to clear keyboard buffer?

Member Avatar
Member Avatar
+0 forum 3

Hi all.. Please help me how to clear all textbox in form. It really hard to set each of it. Thank you Aura

Member Avatar
Member Avatar
+0 forum 2

Good day, I am having trouble on how should i clear the value of my controls in the modalpopupextender. Assume the i have 1 textbox in it. oce i clicked the button with any name. all i want is to clear the value of the control.. thanks

Member Avatar
Member Avatar
+0 forum 1

Hi, I have an urgent issue. I have a screen that allows the user to select something from a drop-down and then submit it. The form directs to the same page where, if data has been supplied, processing occurs based upon their drop-down selection. What I want to do is, if they press refresh on their browser, not process the data again. However, if they select the same item from the drop-down and submit it again then this should work. Is there a way to do this? Ideally I wanted to be able to clear out the contents of the …

Member Avatar
Member Avatar
+0 forum 1

User is supposed to type an input, and if it's not an integer, the user needs to type another. This repeats 3 times for 3 inputs which go inside an array. The integer checking works, but the problem is that when i display the 3 integers, they are all the same number (the first correct input). Idk what's wrong. I've tried cin.clear() and cin.sync()... for(int i=0;i<3;i++){ cout<<"Enter your "<<text[i+6]<<": "; cin.sync(); cin.clear(); cin>>inInt[i]; if(!cin){ cout<<"\nPlease enter a valid integer."; i--; system("pause");} system("cls");}

Member Avatar
Member Avatar
+0 forum 1

Not sure what I am doing wrong but let me try to explain my issue. I have a single combobox on my form that I use to load external settings. If I load, lets say, 100 settings in to this combobox then I clear the combobox via Combobox1.items.clear(), then try to reload a different set of settings that has a far less overall count, the combobox will not load the items and the dropdownlist will be massive but blank. NOW, if I load the settings that have far less then clear and load the settings with significantly more settings, then …

Member Avatar
Member Avatar
+0 forum 2

hello how are you today i have a problem with cache when i visit my site i saw the old topic of my site until i hit ctl+f5 to update the page so how ca i solve this problem is there any way to prevent browser store cache i have used these meta <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="no-cache"> <meta http-equiv="Expires" content="-1"> <meta http-equiv="Cache-Control" content="no-cache"> but same result

Member Avatar
Member Avatar
+0 forum 2

**Option 1 - From Start Menu** 1. Right click on the Start button -> properties. 2. Uncheck the Store and display recently opened items in the Start menu and the taskbar box, and click on Apply. 4. Click on OK. **Option 2 - From Windows Explorer** 1. Delete contents of this folder: C:\Users\(User Name)\AppData\Roaming\Microsoft\Windows\Recent Items **Option 3 - From Registry** 1. Paste this in a notepad -> Save it with the extension ".reg" and double click it. [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs]

Member Avatar
+0 forum 0

Hi, I am new to VB, and still learning. Please help me. I am developing a simple VB application, in Visual Studio 2010, where in we have to enter values in the fields given. I need to add a REFRESH button, which should act like a clr screen command. When i press that button, all the data fields should go back to its default values or the current values should be cleared. And I need to know how to connect this app to Outlook, so that it sends out a mail by fetching the data we entered in the fields.

Member Avatar
Member Avatar
+0 forum 4

Hi, all. I am trying to clear the console window without using the "os" library. This seems like the only way to do it: from os import system import time print "I will clear the screen in 2 seconds" time.sleep(2) system("cls") print "*Cleared Screen*" SystemExit() But the problem is, this only works for Windows, so if I wanted to do it for linux i must change line 5 to `system("clear")` any way it could work for all operating systems without using `os`?

Member Avatar
Member Avatar
+2 forum 3

I want to re-use a vector<short> over and over in a performance critical loop. I only need the vector **size** to be reset to zero at the end of the loop. I'm worried that the myVector.clear() takes time to actually clear all the memory. Also, does the myVector.reserve() survive the clear()? vector<short> myVector; myVector.reserve(10000); while(true) { for(int i = 0; i < 10000; ++i) { myVector.push_back(*something++); } writeOut(myVector); myVector.clear(); }

Member Avatar
Member Avatar
+0 forum 3

Hi all, I am trying to write a code for logout, and I want to clear session My code Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click Session.Abandon() Response.Cookies.Add(New HttpCookie("ASP.NET_SessionId", "logAccount")) Response.Redirect("WebForm5.aspx") End Sub and i want to disabling browser's to go back please hellp !!!!

Member Avatar
Member Avatar
+0 forum 4

Hello, I'm creating a game using SDL, and what I'd like to happen is: if the character jumps on a button, then it'll disappear. However, I cannot find a way of accomplishing this, as all the SDL functions I know of start at runtime and cannot be changed. If I'm wrong, would someone please enlighten me? Is there a way that I can get this accomplished? Thank you for your time!

Member Avatar
-1 forum 0

Hi all, I want to clear all items of comboboxes in my form I can clear all textboxes using looping and check if control is textbox then clear textbox. But when i implement it to combobox it just clear the combobox text not all of items on combobox. Private Sub ClearCombo_Click() Dim Temp As Control For Each Temp In Me.Controls If TypeOf Temp Is ComboBox Then Temp.Text = "" End If Next End Sub Please help me. Thank you in advanced.

Member Avatar
Member Avatar
+0 forum 2

Hello, I have a listbox in my program and I want the user to be able to remove all Listbox Items with the click of a button. I Figured this would work, [CODE]Listbox1.Text = ""[/CODE] But I Guess that doesn't work. Any Help would be awesome:)

Member Avatar
Member Avatar
+0 forum 3

I am a web developer who has just had PHP thrust upon me. I have created a login-protected site and have put a timeout script on each page which redirects the user back to the login page if they have left the site idle for a certain period of time. In Opera and Safari it works great but in Firefox the login page still has the login credentials in the text fields, so anyone could just press "login" and log right back into the site, which sort of defeats the purpose. Exhaustive Google searches have turned up nothing. Any advice …

Member Avatar
Member Avatar
+0 forum 2

Is there anyway we can clear only a selected part of the console window? clrscr() from conio.h & system("CLS") clears the whole screen. So how to clear screen selectively? For example, one of my old code prints this, [ICODE]Enter the limit for the array size (Max: 20) 10 Enter the elements for the array 1 2 3 4 5 6 7 8 9 10 The greatest interger is 10 The smallest integer is 1 [/ICODE] But i want it to be like this, just after the user enters the last element. [ICODE]Enter the limit for the array size (Max: 20) …

Member Avatar
Member Avatar
+0 forum 6

Could you please tell me how to clear the old data from the datagridview in vb.net.. the below code is retrieving the data from table and display in a gridview for particular person. but when i wanna check the next person record if he dosen't have record so the previous data still will not erased? [CODE] Dim c As New sqlStmt c.myCon() Dim da As New SqlDataAdapter("SELECT * FROM Experience WHERE CID='" & Trim(txtCID.Text) & "'", c.con) Dim ds As New DataSet("ManPower") da.Fill(ds, "ManPower") dgExperience.DataSource = ds.Tables("ManPower").DefaultView [/CODE]

Member Avatar
Member Avatar
+0 forum 3

I'm creating a C# program that has a sizable textbox that prints out data every 5 seconds. Whatever data that is displayed is (supposed to be) cleared and replaced with new data every 5 seconds. I've created a thread so that the window opens (main thread) and the data is processed, displayed, and paused as necessary (my thread), otherwise the window waits 5 seconds to open. I've had problems where I couldn't output text to the textbox because an error would say that the textbox was created on a different thread. However, I found a solution to that problem. But …

Member Avatar
Member Avatar
+0 forum 1

Could someone fixed this codes, i want the value inside the text fields will empty after submit the form.. huhu...:?: [CODE]<script type="text/javascript"> $(document).ready( function() { $('#submit_id').click(function(){ doUpload(); }); $('#uploadprogress').hide(); }); function doUpload() { // STEP 2. Create the iframe object var iframe; try { iframe = document.createElement('<iframe name="uploadiframe">'); } catch (ex) { iframe = document.createElement('iframe'); iframe.name='uploadiframe'; } iframe.src = 'javascript:false'; iframe.id = 'uploadiframe'; iframe.className ='iframe'; document.body.appendChild(iframe); // STEP 3. Redirect the form to iframe $('#form').attr('target','uploadiframe'); // STEP 4. Display the progress layer $('#uploadform').hide(); $('#uploadprogress').show(); $('#uploadiframe').hide(); // .STEP 5. Intercept the upload result $('#uploadiframe').load(function () { $('#uploadprogress').hide(); $('#uploadform').show(); // STEP 6. …

Member Avatar
Member Avatar
+0 forum 7

Ok, I am walking my way through an instructional php book and basically going over the basics again. After I finished doing the script the way the book said to do it, I kept getting a header error saying that the headers have already been submitted. The book had my echo statements spread out all over the place instead of just doing a self processing file. You know? The kind that looks back at itself for print commands once a submit button his clicked. SO I modified the file to be self contained. Seems to work with just one problem …

Member Avatar
Member Avatar
+0 forum 5

Alright, I have a Textbox which I want to display some text, but when the user clicks on it, it should clear so he can write what he wants.

Member Avatar
Member Avatar
+0 forum 2

The End.