Apply Button / Restart App
sup guys. i created a program which saves setting of certain game in .reg files and makes differences in game e.g changing game resolution or saving login ID so you wont need to type it. however my app applies the changes only after restart of this app. i was wondering how to make an apply button so i wont need restart app to apply or what is the code i can put in the apply button so it would restart app by itself?
this is my settings window, right near the close button i wana put Apply button
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Apply Changes Button
I am having trouble making the form keep the value I enter when the form is opened for the first time. Upon closing and opening the form for the second time the new value which I put in one of the text boxes sticks.
Please have a look at my code - command1_click is an "apply" button so that the changes will take affect (loaded into ifrom array) and then displayed back if the user closes the form and then loads it again.
Code:
Private Sub Command1_Click()
For y = 1 To 130
ifrom(2, y) = ifrom2.Controls("ifrom2" & y).Text
Next
End Sub
Private Sub Form_Load()
Static blnInit2 As Boolean
Static x As Integer
If Not blnInit2 Then
for y =1 to 130
ifrom2.controls("ifrom2"& y).text = 999
next y
For y = 1 To 130
ifrom(2, y) = ifrom2.Controls("ifrom2" & y).Text
Next y
blnInit2 = True
End If
If x > 1 Then
For y = 1 To 130
ifrom2.Controls("ifrom2" & y).Text = ifrom(2, y)
Next y
End If
x = x + 1
End Sub
Apply Button?
hey, ive made a thing in the registry that stroes two color values(if one opttion button is true then one color and the other is a differnet color) this works fine and i can get it to work on any form i want to change the colour......but.......the problems comes when i go to the form after i have changed the registry data its still as it was (the old colour) and i have to close it and open it again untill the colour is how i want it to be. is there some way to make a buton or change the code so that i dont have to open the form twice before it changes?
Thanks
Apply Button
Hi, I have a options dialog with many check boxes and comboboxes etc. I want to put an apply button and I want to know when I have something to apply. One way is to have a boolen variable and every time when I change something to set it to true.
My question: Is there any better way to do this?
Thanks
Disable Apply Button
I'm having a bit if difficulty disabling my Apply button after pressing it.
I named it btnApplySettings
Caption = "Apply" (of course)
I want it to disable upon pressing and enable upon change of settings on the form.
I'm a little stumped on this because I don't get the expected "Enabled" property after typing the control name and '.'
Apply Bullets To Document By Button.
Hi all,
I have a VBA form with a number of textboxes to input/edit data on a Word document.
A few of the textboxes requires the user to be able to click a 'bullet point' button and whatever they type until the button is depressed comes out in bullet points.
Working exactly the same as the 'Bullets' button from the Word Toolbar.
I beleive that the textbox object cannot show bullet points so i could use the '-' character in the textbox and standard bullet points in the document?
What would be the best method for achieving this?
Thanks,
Dan
* RESOLVED * Enabling An Apply Button On Control Change...
I have an apply button (cmdApply) on a form, and want it to be enabled when any of the other controls on the form change value.
I'm assuming I have to put "cmdApply.Enabled = True" within the other controls change events. But that seems a bit long winded as I have lots of controls on the form, even though most are control arrays which makes it easier. Any quicker suggestion would be appreciated.
Darren
Emulating The "APPLY" Button Within The Appearance Options "Refresh The New Settings"
Hi Guys,
I'm needing some help with this one. I've got a copy of the HKCUControl Panel hive and need to apply this to the registry and then "apply" the changes. The problem lies with "refreshing" the registry so that the changes apply.
Here's an example:
1. Open Regedit and change the following key = HKCUControl PanelColorsBackground to 0 0 0 (black, or any choice of color!) and close regedit.
2. To apply the changes, a user needs to log off and then back in. This is no good.
I've tried running TSKILL explorer.exe but this does not help either..
Any help would be great.
When And How To Apply XSL
I have a vb6 app that takes a result set from another program and generates an XML document from it and then opens a form with a web browser inside that program to display the results to the user.
What I would like to do is fancy up the xml a bit using xsl. My only problem is that I don't know exactly when or how I can do this.
The XSL is going to be static. The XML format is going to be static but the doc itself gets generated dynamically but always in the same path location.
Can I just leave the xsl in the same path if I can find a way to add a processing instruction to the xml to actually use it? This seems like the way to go to me. I can take the xml (after vb generates it) and edit it to contain a reference to the xsl, but I can't figure out how to get vb to dynamically include the stylesheet ref.
The other route I could go would be to apply the xsl in code just before I render it on the form's browser control. I don't really know how to do that either.
Any suggestions?
Apply Changes
Ok I dont know how to do this or where to place the code but what I would like to do is give the end user the option to change certain aspects of the app.
So when someone clicks option then clicks, 'show splash screen' then the code for showing form 1 is hidden and the code for showing the splash screen is shown.
Is this placed in a module or class?
Can This Be Apply?
Can i apply this code to combo box that have list of items from access database?
Don't Apply XP Style?
Can we make our VB programs running in WinXP without SP style? (Looks like Windows XP running 16-Bit program). I see some windowed game have classic title bar.
Wil Not Apply To All Sheets
I'm pretty new to this so again it's probably a really simple mistake. I am trying to apply the followong fortmatting to all sheets in a workbook. I started out with this.
Code:
Dim shtTemp As Worksheet
For Each shtTemp In ActiveWorkbook.Worksheets
With shtTemp
ActiveWindow.Zoom = 85
Range("C8").Select
ActiveWindow.FreezePanes = True
ActiveSheet.PageSetup.PrintTitleRows = "$1:$7"
ActiveSheet.PageSetup.PrintTitleColumns = "$A:$B"
ActiveSheet.PageSetup.Orientation = xlLandscape
ActiveSheet.PageSetup.Zoom = 85
ActiveSheet.PageSetup.LeftMargin = Application.InchesToPoints(0.4)
ActiveSheet.PageSetup.RightMargin = Application.InchesToPoints(0.4)
ActiveSheet.PageSetup.TopMargin = Application.InchesToPoints(0.5)
ActiveSheet.PageSetup.BottomMargin = Application.InchesToPoints(0.5)
ActiveSheet.PageSetup.HeaderMargin = Application.InchesToPoints(0.5)
ActiveSheet.PageSetup.FooterMargin = Application.InchesToPoints(0.5)
End With
Next
However for some reason it only applied to the first sheet so I added in the next sheet command at the end of the loop.
Code:
activesheet.next.select
This works but obviously when it has formatted all the sheets it cannot find another and returns an error.
How can I either get the top code to work properly or make it stop at the last sheet?
Thanks for you help
Apply Settings
I have written a small vb program that changes a system file in windows. Can I apply that change without restarting the computer?
I know in windows, I can change keyboard layouts and display settings without restarting so I am wondering if I can I do the same with a vb program?
I am relatively new to vb, but have quite a bit of experience in other languages.
Thanks in advance
jb
Apply Changes To 90 TextBoxes
I have a form with 90 textboxes, named Text1 -> Text90
I want to apply the same changes to them all..
Font = Arial
Size = 10
Style = Fat* (I have VB in different lang, so i dont know if that's the name for it)
Align = Center
What i am looking for is a loop code that applies the specifies changes to them all.
I have been working with this project all nite and i got stuck on this..
Any help here is greatly appreciated.
Apply FFT To A WAV File
Hi there!
I am currently working on a speech recognition program. I've been able to record voice and display it in a waveform. I need to apply the Fast Fourier Transformation to my wav file to get the prominent frequencies for analysis. It would be really helpful if anyone can give me some guidance on this matter. Many thanks!!! (The main problem im facing is to apply FFT to a wav file, about 10 seconds long)
OK, Cancel, Apply Etc.
Is there any way you can retrieve the name of the "OK", "Cancel", "Apply", "Yes", "Help" etc. in the language of the operating system?
The MsgBox can tell automatically, but can you retrieve these values to be used for buttons etc. e.g. using the API??
I Know This Doesn't Apply But...
Can anyone tell me if you can detect if someones' cookies are enabled on the browser and if NOT then turn it on for them?
Of course this needs to be done through ASP.
thanks...
If There Is No U In Guru, Need Not Apply
I am trying to discover what file is currently selected within a window(Example having windows explorer open and clicking once on the WinNT folder makes it the selected file). Is there any API to determine what is currently selected? I am pretty sure that there has to be because some call must be made to icon to highlight it. If I can track that, I can track which item is selected. Does anyone know the API call for it?
Thanks for your time,
Joe
Apply Coding
Guys.....
How can I apply this function in listbox...
Private Sub Data1_Reposition()
Data1.Caption = Data1.Recordset("No_supplier")
End Sub
I just want to know how can I coding in listbox to appear like in my Data1
meaning that I can select the data....
I try to apply in list box this code but...
the data doesn't appear.....
Apply Formatting To Xml Tag
Hi,
I have the following situation:
The user has a blank word document with a schema attached and has to add text to that document and tag the text accordingly. Now, i want to show each tag he adds with a different style.
I have used the following VBA code in word 2003 , to try to assign userdefined styles to each tag.
Private Sub Document_XMLAfterInsert(ByVal NewXMLNode As XMLNode, ByVal
InUndoRedo As Boolean)
If NewXMLNode.BaseName = "Title" Then
NewXMLNode.Range.Style = ActiveDocument.Styles("StyleTitle")
End If
If NewXMLNode.BaseName = "Subtitle" Then
NewXMLNode.Range.Style = ActiveDocument.Styles("StyleSubtitle")
End If
End Sub
Using this approach, a particular style is selected when i insert a tag. it
works if I tag some text as Title and then tag some other text as SubTitle.
But if i insert a Title tag ,then a Subtitle Tag, and then proceed to enter
the text in those two tags, the formatting of the title tag is that of the
subtitle tag.( The code does not set the style for a particular tag's range
as i thought it would). Moreover, if i enter text in any other tag for which
the style is not defined, the style is the same as the last programmatically applied style.
This is my first attempt at VBA.I dont know if i've missed anything.
I was also wondering whether it is possible to have a macro which sets the style each time i click inside an xml tag or whether it is possible to do that through code.
Could anyone help me with this please?
Any help will be greatly appreciated.
Is there a way to achieve this?
Thanks
Alicia
Apply Registry Changes
can anyone tell me how i can Apply Registry changes to my computer using visual basics!
Apply New Registry Settings
Hi,
My program changes certain registry settings in the windows registry, now I want to apply those settings to the explorer.exe process.
I have succeeded doing that by first killing explorer and then reloading it, but I do not like that solution.
Somewhere on the internet I read that this: SystemParametersInfo(SPI_SETDESKPATTERN,0,NULL,WM_SETTINGCHANGE ) will also work, but I dont have any clue if that is correct or not.
So basically I want to apply the changes in registry to explorer.exe without killing and reloading explorer.exe.
Can anyone help me?
Thanks!!
OsMo
How To Apply Color To A Scrollbar?
I am using the basic boring VB scrollbar which does not allow me to assign colors to it. Has anyone created a user control or OCX which they would share which will allow me to assign color to the scrollbar?
Apply Skins To All Windows
In a web browser app which makes use of the Web Browser control, users can change the skin of the browser. Similar to IE6, users can open a new browser window by navigating to the File--->New menu or right-click a link to open the link in a new page.
Assume that while using a skin, a user opens a new window (by either of the 2 ways stated above). But when the new window opens, it doesn't reflect the current skin that is already being used by the user.
How do I open the new window so that it renders the skin that the user is using currently?
Dont Know How To Apply This Code!
hello guys..
I found a code to allow user to type a few letter of required data (in combo box) in order to save time. I took da code from website which is i already forgot da url address. So, i cannot refer back.. I really hope some of u outside can help me to define dis code and then make me understand on how to use dis code in my project..
Coding :
Private Sub cmbStandard_KeyPress( _
KeyAscii As Integer)
KeyAscii = AutoFind(cmbStandard, _
KeyAscii, _
False)
End Sub
Public Const CB_FINDSTRING = &H14C
Public Const CB_ERR = (-1)
Declare Function SendMessage _
Lib "user32" Alias _
"SendMessageA" _
(ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long
Public Function AutoFind( _
ByRef cboCurrent As ComboBox, _
ByVal KeyAscii As Integer, _
Optional ByVal LimitToList As Boolean = False)
Dim lCB As Long
Dim sFindString As String
On Error GoTo Err_Handler
If KeyAscii = 8 Then
If cboCurrent.SelStart <= 1 Then
cboCurrent = ""
AutoFind = 0
Exit Function
End If
If cboCurrent.SelLength = 0 Then
sFindString = UCase(Left(cboCurrent, _
Len(cboCurrent) - 1))
Else
sFindString = Left$(cboCurrent.Text, _
cboCurrent.SelStart - 1)
End If
ElseIf KeyAscii < 32 Or KeyAscii > 127 Then
Exit Function
Else
If cboCurrent.SelLength = 0 Then
sFindString = UCase(cboCurrent.Text & _
Chr$(KeyAscii))
Else
sFindString = Left$(cboCurrent.Text, _
cboCurrent.SelStart) & _
Chr$(KeyAscii)
End If
End If
lCB = SendMessage(cboCurrent.hWnd, _
CB_FINDSTRING, _
-1, _
ByVal sFindString)
If lCB <> CB_ERR Then
cboCurrent.ListIndex = lCB
cboCurrent.SelStart = Len(sFindString)
cboCurrent.SelLength = Len(cboCurrent.Text) - _
cboCurrent.SelStart
AutoFind = 0
Else
If LimitToList = True Then
AutoFind = 0
Else
AutoFind = KeyAscii
End If
End If
End Function
Where To Apply Locks And Cursors
Hello
I have prepared an application in VB and is installed on every system in network .The database used by me is sqlserver,can any one pls explain me where i will apply cursor and locks.how i will handle if all user try to simentaneously update same data in database.
Yogesh
Where To Apply Curosr And Locks
Hello
I have prepared an application in VB and is installed on every system in network .The database used by me is sqlserver,can any one pls explain me where i will apply cursor and locks.how i will handle if all user try to simentaneously update same data in database.
Yogesh
Try To Apply BeginTrans Feture
Dear friends
I am using vb6 back end Acces97 , i want to apply begintrans , committrans and rollbacktrans features in my application , here i am looking some help from u , if any one can assist me in coding of above feature. Pls reply with a complete coding example.
Thanx
Zubair khan
I Think The Trim Function Can Be Used, But Not Sure How To Apply It
Hi there,
how can I return numbers after the decimal place only? I did a search on the database but the problem is sometimes the decimal can be the second character on the left, or 3rd or 4th - not always a fixed character like 2nd on the left or like that.
number1=rnd(*200)
'this returns numbers like 1.233524, 103.2424524
'I need the part after the decimal, like 233524 and 2424524
Innovative Thinkers Need Apply
I am using this windows api I found on the forum earlier in order to create a browse for file message box.
In module:
Code:
Option Explicit
Private Type OPENFILENAME
lStructSize As Long
hwndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilter As Long
nMaxCustrFilter As Long
nFilterIndex As Long
lpstrFile As String
nMaxFile As Long
lpstrFileTitle As String
nMaxFileTitle As Long
lpstrInitialDir As String
lpstrTitle As String
Flags As Long
nFileOffset As Integer
nFileExtension As Integer
lpstrDefExt As String
lCustrData As Long
lpfnHook As Long
lpTemplateName As Long
End Type
Private Const OFN_HIDEREADONLY = &H4 'hide Open As read only check box
Private Const OFN_ALLOWMULTISELECT = &H200
Private Const OFN_CREATEPROMPT = &H2000
Private Const OFN_EXPLORER = &H80000
Private Const OFN_FILEMUSTEXIST = &H1000
Private Const OFN_NOCHANGEDIR = &H8
Private Const OFN_NODEREFERENCELINKS = &H100000
Private Const OFN_NONETWORKBUTTON = &H20000
Private Const OFN_NOREADONLYRETURN = &H8000
Private Const OFN_NOVALIDATE = &H100
Private Const OFN_OVERWRITEPROMPT = &H2
Private Const OFN_PATHMUSTEXIST = &H800
Private Const OFN_READONLY = &H1
Private Const OFN_SHOWHELP = &H10
Private Const ALLFILES = "All Files"
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _
"GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Boolean
'Purpose : Shows the Open file common dialog
'Inputs : strTitle, the title of the dialog, pass "" For default
' strDefaultPath, the default path
' Filter, the filter, an even number of arguments e.g.("text files, *.txt, mdb files, *.mdb")
'Outputs : Returns the specified file name And path Or "" If cancelled
'Author : Nucleus
Public Function ShowOpen(Optional strTitle As String, _
Optional strDefaultPath As String, Optional Filter As String) As String
Dim OFName As OPENFILENAME
OFName.lStructSize = Len(OFName)
'Set the parent window
OFName.hwndOwner = GetActiveWindow
'Set the application's instance
OFName.hInstance = 0
'create a buffer For the file
OFName.lpstrFile = Space$(254)
'set the maximum length of a returned file
OFName.nMaxFile = 255
'Create a buffer For the file title
OFName.lpstrFileTitle = Space$(254)
'Set the maximum length of a returned file title
OFName.nMaxFileTitle = 255
'Set the title
OFName.lpstrTitle = strTitle
'No flags
OFName.Flags = OFN_HIDEREADONLY Or OFN_FILEMUSTEXIST _
If strDefaultPath = "" Or Len(Dir$(strDefaultPath)) Then
OFName.lpstrInitialDir = strDefaultPath
Else
OFName.lpstrInitialDir = CurDir$
End If
OFName.lpstrFilter = CreateFilterString(Filter)
'Call the Open dialog routine.
If GetOpenFileName(OFName) Then _
ShowOpen = Trim$(OFName.lpstrFile) Else ShowOpen = ""
End Function
Private Function CreateFilterString(Filter As String) As String
' Creates a filter String from the passed In arguments.
' Expects an even number of arguments
Dim sa() As String, i%
sa = Split(Filter, ",")
For i = 0 To UBound(sa)
CreateFilterString = CreateFilterString & sa(i) & vbNullChar
Next i
CreateFilterString = CreateFilterString & "All Files (*.*)" & vbNullChar & "*.*"
End Function
I wondered if it is possible to change the command button for open to display a different caption. I do not know how easy it is to accomplish this. I thank you for any help.
Joe
How To Set A Hot-key That Apply To Whole Project Or Only A Form?
Hi, I want to set a Hot-key, e.g. F11, apply to whole project, any form when the key F11 is pressed, it will show "About" form.
I also need to set other Hot-key,e.g. F12, only apply in a special form, when it is press, it will show the HELP message of the operation in the form.
How I can do these? ThanK you all.
Apply Vbtab In Listbox
"How can I use the vbTab in a listbox that having properties-style=1 and MultiSelect=Simple ?"
How To Apply A Gradient To A Label ?
I found some code that can apply a gradient effect to a picturebox. Is there any code available that can do that to a label ?
robert
Edited by - eurob on 6/27/2005 2:13:09 PM
Grab The URL From IE And Apply A Filter....
Hi Guys,
I am in the process of creating some content filtering software as part of a course I am doing. I am in no way asking for anyone to give me the answers but more like a nudge in the right direction.
I want to be able to grab the URL put into IE by a user, filter it against a predefined set of url's of "bad Words" and if a match is found redirect to a blank or restricted page.
All I want to know is the best way of grabbing and filtering the URL.
Any Ideas???
Oz
Apply Filter In Access
Im trying to make a form in access that has two buttons on the form. One does the "filter by form" action performed by abutton on the menu of the same name. and I want the other to "apply filter" like another button on the menu. The problem is that once I press the first button, It greys and deactivates the second. So this allows me to enter the filtration criteria, but not run the filter. I know I could just use the buttons on the menu, but this application isnt for me, its for a coworker, and so Im trying to cooperate. Does anyone know of VB code or property settings that would make this possible? Please,let me know.
Thanks for any help you all can give me.
Casey
Making A Picture Box Apply XP Styles?
I got a tab control, and to keep all the contents of each tab in order, i put each thing in a picture box. Now, when i apply the XP styles to the program, the tab will change to apply the XP Styles, but the picture box does not.
It's background stays plain grey, which is quite boring, and ugly to look at. Is there any way i can get it to continue to display the background on the tab control?
I attached a picture to show how MY form is showning, and an example of the display properties of Windows XP, that renders good. I need to get the background of the picture to be exactly like the TABS, and obviously, any controls background. I remember already trying to do it with transparency, but it was giving me great problems.
Thanks a lot, i really would appreciate any help! Im really banging my head on this!! plz help me!
thanks again!
Import A File And Apply A Macro
I am so beginer in VB that I'm not even able to do simple tasks.
I would like to create a macro that "open" a html file; copy-past special it in text format into word. then I would like to apply to this text a specific macro (already done...I'm at leaste able to do really simple stuffs). Then, I would like to close the html file and to do the same with say 10 other files....
THANKS a loooooooooooooot if you are able to help me!!!!
Different Font Styles Apply To Same Table
Hi,
I need to generate data in a table from ACCESS database. Those data are in numeric value. The request is, I need to put 2 values (which is in different unit measurement) in a single table cell. So, to differentiate it, 1 of the value need to be bold sized.
My problem is, I do not know how to bold sized one of the value, instead, what I can do is only to bold sized everything in a cell, but not the particular value.
Can anyone please give me some advice? I have been working on it for days...
Thanks!
Word VBA: Apply Format To A Column
Hi to all
I am using Word VBA and Visual, and i have a doubt.
I want to create a table and apply a format to a column, but the column object has no the range element, so I can't do this something like this
Code:
MyTable.Columns(1).Range.Bold = True
so, it's possible to apply a format (bold, allignment, ...) to a certain column using VBA code?
thanks to all
Use VBA To Apply Filter To Crosstab Query
I was hoping someone can point me in the proper direction. I have a user form with several combo boxes. These combo boxes would allow the user to select various items to build out a filter. I would like to use this filter and have it applied to an existing crosstab query and output only the columns with data. This is in Access 2003
It is a slight modification to what I have done in the past where I used the crosstab query as the record source for a form and applied the filter to the form. The problem I ran into with that approach was that in the form I needed to lock in the column headings which ended up making the report cumbersome due to the large number of blank columns that would be output. It ended up defeating what I was trying to do.
I hope I have explained this well enough.
Is there any way to combine the nice feature of the crosstab query only outputing columns with data and applying a multi-field filter in VBA.
Any direction would be appreciated.
Thank you.
How To Apply Excel Styles To A Range
Hello All
I would appriciate help with following issue:
I want to apply styles to a range from VB/A as follows:
Code:
Dim rng as Range
Set rng = Application.Selection
rng.Style.Name = "Some Style"
Set rng = Nothing
Prior to using the code above I make sure that the style I want to apply is present in the workbook I am modifing. Applying the styles through the GUI of Excel works.
The Excel 9 VBA Documentation says
Code:
Worksheets("sheet1").Range("a1:a10").Style.Name = "percent"
is the way to do it. Well, it does not work in my case, even when I am paroting the code in the documentation verbatim.
Any suggestions?
Apply Element Method By Using Index.Possible Or Not?
Vb version :6
Hello.I would like the following
Code:
button1.top = button1 + 100
to be apply as well in 20 form elements (buttons,lists,sliders,captions,checkboxes).
I do not want to use 20 lines of code to make it happen.I think it can be done through a "for loop".Can I use the tabIndex property in order to make it?
How To Apply A Background To The Explorer Menu?
Hello,
I saw some programs on the net that can put a bakground image behind the Internet Explorer's menu and butons on the top of the screen. My question is if there is somebody who can tell me how you can do this with Visual Basic.
Thank you
Apply Visual Style To RichEdit
Hi there!
Does anyone have an idea how to make the RichEdit control look like a TextBox under Windows XP? I found this article which describes how to do it with C++, but I need it with done with Visual Basic.
Beside that, being able to theme the Forms 2.0 TextBox would be great, too.
Regards,
Sebastian
|