Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




[VB6] How To Apply Gaussian Blur On A Picture?


Hello there,
I would like to apply graussian blur, does anyone knows how to do plz?
Also, is there a dll that would include functions for blur and other effects?

Thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do I Blur The Content Of A Picture Box?
Hi,

I have got a picture box containing a picture and I would like to blur this picture. I'm sure you have all seen it done in Paint Shop Pro etc... Please Help.

Thanks

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!

Making A Picture Box Apply The Same Style As The Windows Explorer Toolbar
I got a picture box that i need to apply the Windows XP style to it like the Windows Explorer and Internet Explorer's toolbars.

I've made many attempts using some API calls like OpenThemeData, DrawThemeBackground, DrawThemeBackgroundWindow, and others, but unfortunatly, to no success.

The windows xp styles, as specified on MSDN, are divided into classes, parts, and states (see here), but none of them seem to specify the theme applied to those toolbars!

What i need to get is a replica of the background of the IE/Explorer toolbar.

Ill attach an image to try to explain more myself about waht i am trying to get. Please help me coz im getting desperate

Also the style is not constant, as you can see from the image, but only according to the windows xp style currently set

thanks!

Gaussian Fit Functions For VB 6.0
Hi there,
I have an array of about 350 X values [Single], each with a corresponding LONG Y value. Somewhere in this array is a gaussian peak. It looks like a parabola, but I do know the best fit method would be gaussian.

I need to find the vertex and Full Width Half Max values for the peak. There is only one peak in the array of data. Does anyone know of a source for this type of math function, either VB 6 or a DLL I could call ?

Gaussian Distribution (bell Curve)
How could I generate random values to form a bell curve?

Rnd generates numbers fairly evenly, giving a flat distribution.

Input would be the mean value, a range that x% will be fall within and a random number (-1 to 1) to determine where on the curve the result will be.

Gaussian Peak Curve Fitting Code
I wonder if anyone has a source for VB 6 code or any language DLL library where I can call the functionality to search a 240 point array of X - Y points and fit a gaussian peak somewhere within that array. The X values are Single and the Y values are Long. I know the data contains a gaussian peak, I don't know the vertex location, so in addition to that I also want the Full Width Half Max value.

Blur-Blur
Hi, i know this sounds stupid but how does the below code work? How does it know which application i am referring to? Do i need to specify which *.exe that i want it to refer to? Thanks.

If App.PrevInstance = True Then
Unload Me
End If

Blur Bar?
You know that blue bar at the top of every program? Well is there a way to make that blue bar go away?

Blur And Spotlight
I am wondering if it is possible to blur an image, so that you can just make out the features? Then to be able to control a circular shape, with the mouse, like a spotlight to 'unblur' the part you are focussed on? Is this possible, if so can somebody point me in the right direction?

Thanks

Blur Treeview
Hello EB,
I have developed small application which has tree control. Tree Control gets loaded with data on FormLoad() event from Access Database. When I move the scrollbar or select any of the nodes, my treecontrol gets blurred on that node....& when I again move the scrollbar it gets to normal display.

I am not sure what is the problem with this control? Is it something defualt-error with it??

Plz provide me quick solution...

Thanx in advance..
-Pritam

Blur An Image Box
Does anyone know how to blur a 489x489 IMAGE or PICTURE box?

How Do I Blur An Image?
Hi,

I have my doubts about this one being answered. I would like to blur the content of a picture box like on Paint Shop Pro and many other image editors. Any ideas?

Richard

Motion Blur Techniques
Does anyone know of a good fast motion blur technique like the one used in need for speed underground 2.

I was thinking that something similar could be achieved by by blending a few frames at once ontop of each other with different alpha levels to get the blur. However i want to do a full screen blur rather than blurring a single object.

My scene is complicated and frame rate is a problem so i can't afford to draw everything multiple times with different alpha values. If i could store a few frames as textures i could use those to achieve the blur.

I know how to render a surface to a texture but i'm not sure how to render the backbuffer to a texture, i think this would allow me to get the effect i'm after without killing my framerate.

Painting A Line With No Blur
I read a post on code guru a while ago about this, that it was hard to mimic the drawing of a painbrush in paint without it becoming a dotted line.


Code:


Private Declare Function LineTo Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long) As Long



Stick this in the mouse move event


Code:


LineTo picCanvas.hdc, X, Y




Rich

Treeview Control Gets Blur.
Hello EB,
I have developed small application which has tree control. Tree Control gets loaded with data on FormLoad() event from Access Database. When I move the scrollbar or select any of the nodes, my treecontrol gets blurred on that node....& when I again move the scrollbar it gets to normal display.

I am not sure what is the problem with this control? Is it something defualt-error with it??

Plz provide me quick solution...

Thanx in advance..
-Pritam

Blur The Background Of Form
It's me again, i would like to ask somebody help me to explain how can i make the background with a blur function. I only know it should use the one of the function of the "Bitmap function" but i don't know which one i should use. So, can anyone tell me? Thanks a lot

Howto Capture And Blur The Image
Howdy,

Have I got a complicated task for you.....

First: Take a screenshot of the entire desktop/screen. (so that's any opnened or maximized applications the taskbar etc.)
Second: paste that image into a control that can be placed onto a form
Third: blur or distort the image, so that any characters/strings can't be read but you can still make out the applications.
fourth: Make this image fill the screen...

Offcourse, all this in an VB application
Is this possible ?? If yes, HOW...

cheers

P.S. This is not to make an irritating app to anoy people.. It's to lock an application

THE SPEED OF *Italic With Motion Blur* Index Buffers?
I was wondering.
Since Index buffers do not seem very flexible to make a commercial
quality game (or anything complex) I was wondering if Vertex buffers
are the way to go? They are much more flexible than Index buffers
will ever be. I just couldnt see myself doing any kind of game with them
and if they are the way to go is there anyway of optimizing them or
is there a way of putting all my geometry in a vertex buffer but using a diffrent texture
for each face?

How To Give Blur Effect To Nodes Of Tree View?
I have a tree view with items and sub items. When all items under a Parent are checked then the parent is also checked. What I want now is if say 1 or 2 items are unchecked then the parent node should show blurring effect. Just like other softwares do.

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)

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

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??

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

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 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

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

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 '.'

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?

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

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

Apply Activskin To Whole Group, PLease Help
I have serveral projects in a group, so how can i make shure that all of the Projects have the same skin when the user selects it from a Menu?

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

Want To Apply Some Effects On A Form???
How do I apply some effects on the Forum such as Fade, shutter or any other good effect.... thanks

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

Copyright © 2005-08 www.BigResource.com, All rights reserved