-
Jan 18th, 2016, 11:35 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Move controls at runtime
Hello everyone
I got this code that allows moving controls at runtime
Code:
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
ReleaseCapture
SendMessage Text1.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0
End Sub
And I'm wondering if it is possible to save the new position
I mean even after closing the application, the control keeps its new position
Thanks
-
Jan 18th, 2016, 11:39 AM
#2
Re: Move controls at runtime
Yes, but it will have to be outside of the application. This is where an INI file might be useful. The FAQ 'sticky link' on the previous page has some info on INI files.
-
Jan 18th, 2016, 02:27 PM
#3
Fanatic Member
Re: Move controls at runtime
Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Sub ReleaseCapture Lib "user32" ()
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
Private Const MyAppIni As String = "\MyAppSettings.ini"
Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal strSection As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then Call SendMsgToCtrl(Me.ActiveControl.hWnd)
End Sub
Private Sub SendMsgToCtrl(ByVal CtlHwnd As Long)
Dim XCoord As Single
Dim YCoord As Single
XCoord = Me.ActiveControl.Left
YCoord = Me.ActiveControl.Top
Call ReleaseCapture
SendMessage CtlHwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
If XCoord <> Me.ActiveControl.Left Or YCoord <> Me.ActiveControl.Top Then
Call SaveCtlPos(Me.ActiveControl.Name, Me.ActiveControl.Left, Me.ActiveControl.Top)
End If
End Sub
Private Sub SaveCtlPos(CtlName As String, ByRef CtlLeftPos As Single, ByRef CtlTopPos As Single)
Dim Retval As Long
'Save new control position to 'app' ini file
Retval = WriteToAppINI("Positions", CtlName & " Left", CStr(CtlLeftPos), App.Path & MyAppIni)
Retval = WriteToAppINI("Positions", CtlName & " Top", CStr(CtlTopPos), App.Path & MyAppIni)
End Sub
Public Function WriteToAppINI(strSection As String, strKeyName As String, strValue As String, strFile As String) As Long
Dim intStatus As Long
On Error GoTo PROC_ERR
intStatus = WritePrivateProfileString(strSection, strKeyName, strValue, strFile)
WriteToAppINI = (intStatus <> 0)
PROC_EXIT:
Exit Function
PROC_ERR:
MsgBox "Error: " & Err.Number & " " & Err.Description, , "WriteToAppINI"
Resume PROC_EXIT
End Function
aaannnd.. of course in Form_Load event retrieve settings from ini file.
Code:
'add to declaration section
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal strSection As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Public Function ReadFromAppINI(SectionHeader As String, VarName As String, ByVal Default As String, strFile As String) As String
Dim RetStr As String
RetStr = String(255, Chr(0))
ReadFromAppINI = Left(RetStr, GetPrivateProfileString(SectionHeader, ByVal VarName$, Default, RetStr, Len(RetStr), strFile))
End Function
Private Sub Form_Load()
Dim Ctl As Control
For Each Ctl In Me.Controls
If TypeOf Ctl Is TextBox Then
Ctl.Left = ReadFromAppINI("Positions", Ctl.Name & " Left", Ctl.Left, App.Path & MyAppIni)
Ctl.Top = ReadFromAppINI("Positions", Ctl.Name & " Top", Ctl.Top, App.Path & MyAppIni)
End If
Next
End Sub
-
Jan 18th, 2016, 04:35 PM
#4
Re: Move controls at runtime
You can see this complete sample project, also:
VB6.0 various projects page
http://nuke.vbcorner.net/Projects/VB...S/Default.aspx
-
Jan 18th, 2016, 04:53 PM
#5
Thread Starter
Fanatic Member
Re: Move controls at runtime
Thank all you for your help
I would like to ask you where I have to pu Mr. Tech99's code
I''m referring to the first code.
In module or general declaration?
thanks
-
Jan 18th, 2016, 05:22 PM
#6
Fanatic Member
Re: Move controls at runtime
Originally Posted by samer22
Thank all you for your help
I would like to ask you where I have to pu Mr. Tech99's code
I''m referring to the first code.
In module or general declaration?
thanks
Sub 'SaveCtlPos' can remain in form or put to module, if you put it in module change declaration from private to public.
Likewise Function 'WriteToAppINI' and 'Declare Function WritePrivateProfileString' can remain in form or put to module, private/public definition applies to these also - like in above.
Others from first 'code tag' (Text1_MouseDown, SendMsgToCtrl and declarations/constants used by those) should be put in to form, where controls are positioned during runtime.
aand... if you need to move other controls, then add it's type to
Code:
If TypeOf Ctl Is TextBox Or TypeOf Ctl Is Combobox Or TypeOf Ctl Is CheckBox Or TypeOf Ctl Is PictureBox 'etc...
line.
Last edited by Tech99; Jan 18th, 2016 at 05:35 PM.
-
Jan 18th, 2016, 05:39 PM
#7
Thread Starter
Fanatic Member
Re: Move controls at runtime
thanks a lot Mr.Tech99
Nearly everything is perfect
except with labels
the code doesn't move these controls
I found another code that enables me to move them but the position is not saved
Is there a solution?
thanks a lot
-
Jan 18th, 2016, 05:50 PM
#8
Re: Move controls at runtime
It doesn't move labels because they don't have handles
P.S. gibra's code (post 4) can move labels, lines, and other controls that have no handles because his code moves objects using the drag method instead of the:
Call ReleaseCapture
SendMessage CtlHwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
approach which can only move controls with handles
Last edited by jmsrickland; Jan 18th, 2016 at 06:03 PM.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jan 18th, 2016, 06:51 PM
#9
Fanatic Member
Re: Move controls at runtime
Originally Posted by samer22
thanks a lot Mr.Tech99
Nearly everything is perfect
except with labels
the code doesn't move these controls
I found another code that enables me to move them but the position is not saved
Is there a solution?
thanks a lot
Windowless controls (label, image, line...) can't receive focus, but sure these could move during runtime.
fex. add Label1 to form and following code to the previous sample...
Code:
'<Add to form declaration section>
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Dim bMove As Boolean
'</Add to form declaration section>
Code:
'<add label1 to the form and this code>
Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
bMove = True 'allow moving
TrackMouse "Label1", Label1.Left, Label1.Top
End If
End Sub
Private Sub Label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then bMove = False 'stop moving
End Sub
'</add label1 to the form and this code>
Code:
Private Sub TrackMouse(CtlName As String, ByRef CtlLeftPos As Single, ByRef CtlTopPos As Single)
Dim lastPos As POINTAPI
Dim lastX As Long, lastY As Long
GetCursorPos lastPos
lastX = lastPos.X - CtlLeftPos / Screen.TwipsPerPixelX
lastY = lastPos.Y - CtlTopPos / Screen.TwipsPerPixelY
Do
DoEvents
GetCursorPos lastPos
Label1.Move (lastPos.X - lastX) * Screen.TwipsPerPixelX, (lastPos.Y - lastY) * Screen.TwipsPerPixelY
Loop While bMove
If CtlLeftPos <> Label1.Left Or CtlTopPos <> Label1.Top Then
Call SaveCtlPos(CtlName, Label1.Left, Label1.Top)
End If
End Sub
aandd add..
Code:
If TypeOf Ctl Is TextBox Or TypeOf Ctl Is Label ...
Same 'logic' applies for the image control...
Code:
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
bMove = True 'allow moving
TrackMouse "Image1", Image1.Left, Image1.Top
End If
End Sub
Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then bMove = False 'stop moving
End Sub
and...
Code:
Private Sub TrackMouse(CtlName As String, ByRef CtlLeftPos As Single, ByRef CtlTopPos As Single)
Dim lastPos As POINTAPI
Dim lastX As Long, lastY As Long
GetCursorPos lastPos
lastX = lastPos.X - CtlLeftPos / Screen.TwipsPerPixelX
lastY = lastPos.Y - CtlTopPos / Screen.TwipsPerPixelY
Do
DoEvents
GetCursorPos lastPos
Select Case CtlName
Case "Image1"
Image1.Move (lastPos.X - lastX) * Screen.TwipsPerPixelX, (lastPos.Y - lastY) * Screen.TwipsPerPixelY
Case "Label1"
Label1.Move (lastPos.X - lastX) * Screen.TwipsPerPixelX, (lastPos.Y - lastY) * Screen.TwipsPerPixelY
End Select
Loop While bMove
Select Case CtlName
Case "Image1"
If CtlLeftPos <> Image1.Left Or CtlTopPos <> Image1.Top Then
Call SaveCtlPos(CtlName, Image1.Left, Image1.Top)
End If
Case "Label1"
If CtlLeftPos <> Label1.Left Or CtlTopPos <> Label1.Top Then
Call SaveCtlPos(CtlName, Label1.Left, Label1.Top)
End If
End Select
End Sub
Unfortunately i have no time right now, to write more generic code (...to detect name of the windowless control under the mouse, when mouse button is pressed). Hence quick and dirty sample with 'constant' label1/image1 name.
Last edited by Tech99; Jan 18th, 2016 at 07:01 PM.
-
Jan 18th, 2016, 06:55 PM
#10
Thread Starter
Fanatic Member
Re: Move controls at runtime
This is the code I'm using to move labels
Code:
XX = X
YY = Y
Private Sub label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Private Sublabel1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
label1.Left = label1.Left - XX + X
label1.Top =label1.Top - YY + Y
End If
End Sub
but the onl problem is that the position is not saved
P.S. I couldn't find gibra's code
I followed the link but I haven't find the code
-
Jan 18th, 2016, 07:02 PM
#11
Thread Starter
Fanatic Member
Re: Move controls at runtime
Tech99
You are so generous and a genius programmer
I'm so grateful to you
Thanks a lot
Everything now is perfect
-
Jan 18th, 2016, 07:39 PM
#12
Re: Move controls at runtime
Originally Posted by samer22
P.S. I couldn't find gibra's code
I followed the link but I haven't find the code
You go to the link and it will expose the page with all the samples on it. Look on the left and you will see a listing of each sample. Find the one you want and click on it. You will then get a message saying you have to be a member to download. Go over to the right side and click on Register and fill in all the text boxes then submit. You will receive a code number in your email. Use that code number when you sign in and then you are a member. Go back to the page where the samples are and click again on what you want. This time it will download.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jan 18th, 2016, 07:47 PM
#13
Fanatic Member
Re: Move controls at runtime
Originally Posted by jmsrickland
You go to the link and...
Before that - i would be you - would create an disposable e-mail address. One can question for itself, why such a complicated method to download trivial samples - so be cautious out there.
-
Jan 19th, 2016, 06:45 AM
#14
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Back again with one small question
Is it possible to save colors , fonts, fontsize in ini files
Now I'm using database to do that?
Thanks a lot
-
Jan 19th, 2016, 07:40 AM
#15
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Originally Posted by samer22
Back again with one small question
Is it possible to save colors , fonts, fontsize in ini files
Now I'm using database to do that?
Thanks a lot
Sure it is possible to save all properties of controls in to ini file.
Code:
to save setting
Retval = WriteToAppINI("Control", CtlName & " Fontname", CStr(Ctl.Fontname), App.Path & MyAppIni)
'to read setting
Ctl.Fontname = ReadFromAppINI("Control", Ctl.Name & " Fontname", Ctl.Fontname, App.Path & MyAppIni)
-
Jan 19th, 2016, 08:08 AM
#16
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Tech99
Thank you for the quick reply
I just want to know where I should insert the code
I tried putting the first code in the subvsave
Private Sub SaveCtlPos(CtlName As String, ByRef CtlLeftPos As Single, ByRef CtlTopPos As Single)
Dim Retval As Long
'Save new control position to 'app' ini file
Code:
Retval = WriteToAppINI("Positions", CtlName & " Left", CStr(CtlLeftPos), App.Path & MyAppIni)
Retval = WriteToAppINI("Positions", CtlName & " Top", CStr(CtlTopPos), App.Path & MyAppIni)
Retval = WriteToAppINI("Control", CtlName & " Fontname", CStr(Ctl.Fontname), App.Path & MyAppIni)
And the second code in form load event
Code:
If TypeOf ctl Is TextBox Or TypeOf ctl Is CommandButton Or TypeOf ctl Is Label Then
ctl.Left = ReadFromAppINI("Positions", ctl.Name & " Left", ctl.Left, App.Path & MyAppIni)
ctl.Top = ReadFromAppINI("Positions", ctl.Name & " Top", ctl.Top, App.Path & MyAppIni)
ctl.FontName = ReadFromAppINI("Control", ctl.Name & " Fontname", ctl.FontName, App.Path & MyAppIni)
But it did not work
Thanks
-
Jan 19th, 2016, 08:29 AM
#17
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
I tried to insert the second code also in the ReadFromAppINI Function
Code:
Public Function ReadFromAppINI(SectionHeader As String, VarName As String, ByVal Default As String, strFile As String) As String
Dim RetStr As String
Dim ctl As Control
RetStr = String(255, Chr(0))
ReadFromAppINI = Left(RetStr, GetPrivateProfileString(SectionHeader, ByVal VarName$, Default, RetStr, Len(RetStr), strFile))
Ctl.Fontname = ReadFromAppINI("Control", Ctl.Name & " Fontname", Ctl.Fontname, App.Path & MyAppIni)
But no succees
thank you
-
Jan 19th, 2016, 09:26 AM
#18
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Settings needs to read when form is loaded/constructed, hence code below goes to From load routine.
Code:
Private Sub Form_Load()
Dim Ctl As Control
For Each Ctl In Me.Controls
If TypeOf Ctl Is TextBox Or TypeOf Ctl Is Image Or TypeOf Ctl Is Label Then
Ctl.Left = ReadFromAppINI("Positions", Ctl.Name & " Left", Ctl.Left, App.Path & MyAppIni)
Ctl.Top = ReadFromAppINI("Positions", Ctl.Name & " Top", Ctl.Top, App.Path & MyAppIni)
'image, picture, line etc. has no font/fontname properties
If TypeOf Ctl Is TextBox Or TypeOf Ctl Is Label Then
Ctl.FontName = ReadFromAppINI("Control", Ctl.Name & " Fontname", Ctl.FontName, App.Path & MyAppIni)
End If
End If
Next
End Sub
and... settings needs to save after changed or when form is unloaded, so because settings change code is missing sample saves settings on form unolad.
Code:
Private Sub Form_Unload(Cancel As Integer)
Dim Ctl As Control
For Each Ctl In Me.Controls
If TypeOf Ctl Is TextBox Or TypeOf Ctl Is Label Then
'in my previous post, there were typematic error, dot were missing from Ctl.Name
Retval = WriteToAppINI("Control", Ctl.Name & " Fontname", CStr(Ctl.FontName), App.Path & MyAppIni)
End If
Next
End Sub
-
Jan 19th, 2016, 10:35 AM
#19
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Tech99
thanks a lot
the code now is working exept for the colors and sometimes the fontsize
I wanted to add them in the save and read functions but I failed
-
Jan 19th, 2016, 12:53 PM
#20
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
I'm very very happy to have found the solution alone
Code:
Retval = WriteToAppINI("Control", Ctl.Name & " forecolor", CStr(Ctl.ForeColor), App.Path & MyAppIni)
Code:
If TypeOf Ctl Is TextBox Or TypeOf Ctl Is Label Then
Ctl.ForeColor = ReadFromAppINI("Control", Ctl.Name & " forecolor", Ctl.ForeColor, App.Path & MyAppIni)
Thanks a million sir for your help
-
Jan 19th, 2016, 12:56 PM
#21
Fanatic Member
Re: [RESOLVED] Move controls at runtime
For the control colors (Forecolor, Backcolor etc.) and fontsize you can 'duplicate' the Fontname code.
as...
Ctl.Name & " Fontname", CStr(Ctl.FontName ->
Ctl.Forecolor & " Forecolor", CStr(Ctl.Forecolor...
Ctl.Backcolor & " Backcolor", CStr(Ctl.Backcolor...
and for the fontsize
Ctl.Name & " Fontsize", CStr(Ctl.FontSize
Setting and getting properties of controls is the most trivial things to do - so it should not be that hard to imitate?
-
Jan 20th, 2016, 02:10 PM
#22
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
It's me again I'm sorry for disturbing you
Now if I want to get back the default fonts and colors...., I need to delete the ini file
I used this code but did not succeed
Code:
File = "App.Path & MyAppSettings.ini"
DeleteFile File
How can I do that please?
Last edited by samer22; Jan 20th, 2016 at 02:31 PM.
-
Jan 20th, 2016, 03:05 PM
#23
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
I googled for some time and I found it
Code:
Kill App.Path & "\MyAppSettings.ini"
thanky you
-
Jan 20th, 2016, 07:17 PM
#24
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Please Mr. Tech99 perhaps this is the last worry.
I was met with a problem with the ini file
I'm using the ini file to save some settings of two forms .
Well because the two forms read from the same ini file, I'm getting some trouble.
For example if I set the background of form1 blue and form2.green, when I launch the application I find the two forms with the same background.
My question is there a way to create two ini files? Or may be another solution?
thank you
-
Jan 21st, 2016, 07:08 AM
#25
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
please tell me if this is possible otherwise I will use the ini for one form and database for the other form
-
Jan 21st, 2016, 11:19 AM
#26
Re: [RESOLVED] Move controls at runtime
Of course you can have two INI files. You can have as many as you like. Just give each file a different name; ie: Form1.ini, Form2.ini, etc
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
-
Jan 21st, 2016, 11:33 AM
#27
Re: [RESOLVED] Move controls at runtime
Might want to take a break and think this through. If your prefix your INI keys with the form name, that could solve the problem.
Example. Instead of
WriteToAppINI("Control", Ctl.Name & " forecolor", CStr(Ctl.ForeColor), App.Path & MyAppIni)
Ctl.ForeColor = ReadFromAppINI("Control", Ctl.Name & " forecolor", Ctl.ForeColor, App.Path & MyAppIni)
Maybe:
WriteToAppINI(Me.Name & ".Control", Ctl.Name & " forecolor", CStr(Ctl.ForeColor), App.Path & MyAppIni)
Ctl.ForeColor = ReadFromAppINI(Me.Name & "Control", Ctl.Name & " forecolor", Ctl.ForeColor, App.Path & MyAppIni)
By including the form name (Me.Name) in your INI keys/sections, you avoid the problem if you have a control named Command1 on both forms, but the controls have different settings.
A better solution would be needed if you create forms dynamically during runtime, since they would have the same name
-
Jan 21st, 2016, 12:54 PM
#28
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Code:
WriteToAppINI(Me.Name & ".Control", Ctl.Name & " forecolor", CStr(Ctl.ForeColor), App.Path & MyAppIni)
Ctl.ForeColor = ReadFromAppINI(Me.Name & "Control", Ctl.Name & " forecolor", Ctl.ForeColor, App.Path & MyAppIni)
I found my hapness with this code
Thanks a lot
-
Jan 21st, 2016, 04:45 PM
#29
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Code:
Of course you can have two INI files. You can have as many as you like. Just give each file a different name; ie: Form1.ini, Form2.ini, etc
Just by curiosity
please can you show me in the code above which function is used to create the ini file?
thanks
-
Jan 21st, 2016, 06:25 PM
#30
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Mr.LaVolpe
Now I'm sometimes having problems in deleting the ini file
Code:
Kill App.Path & "\MyAppSettings.ini"
I don't know if that is because I have modified the original code or I"m having another problem
thank you
-
Jan 21st, 2016, 07:31 PM
#31
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Originally Posted by samer22
...which function is used to create the ini file?
thanks
That very same function, just change the filename part (MyAppIni), call it fex. MyAppIni2 - but if i would be you, i would use the same ini file and just prefix those keys with form name - as Lavolpe above already succested.
Retval = WriteToAppINI("Control", Ctl.Name & " forecolor", CStr(Ctl.ForeColor), App.Path & MyAppIni)
Samer... I can't believe, that these kind of trivial questions are even asked, start thinking and learning for yourself.
Last edited by Tech99; Jan 21st, 2016 at 07:43 PM.
-
Jan 21st, 2016, 07:38 PM
#32
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Originally Posted by samer22
Now I'm sometimes having problems in deleting the ini file
Code:
Kill App.Path & "\MyAppSettings.ini"
I don't know if that is because I have modified the original code or I"m having another problem
thank you
Neither do we know, because 'our crystal ball' has run out of batteries - flat power - capische.
Code:
Kill App.Path & MyAppIni
Should work ok. There is no need to reference file name again, as when you change MyAppIni constant value, then you have to change that "\MyappSettings.ini" also - otherwise file deletion does not work.
-
Jan 22nd, 2016, 04:51 AM
#33
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Tech99
You are so kind sir thank you a lot
-
Jan 22nd, 2016, 04:34 PM
#34
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Hello again
I tried various codes to delete the ini file.
I sometimes succeed to delete it but I fail in most of the cases.
A code can delete on one occasion but fails in hundereds times.
Now I want to know if it is possible to clear the content or at least part of the ini content.
For example if I wanted restore the original background , how can I clear this section in the ini file?
Thank you
-
Jan 22nd, 2016, 07:12 PM
#35
Re: [RESOLVED] Move controls at runtime
Wouldn't writing a null string (i.e., vbNullString) clear the entry?
-
Jan 22nd, 2016, 09:06 PM
#36
Thread Starter
Fanatic Member
Re: [RESOLVED] Move controls at runtime
Originally Posted by LaVolpe
Wouldn't writing a null string (i.e., vbNullString) clear the entry?
Thanks a lot sir
-
Sep 29th, 2019, 03:09 PM
#37
Lively Member
Re: Move controls at runtime
VB6.0 various projects page
http://nuke.vbcorner.net/Projects/VB...S/Default.aspx
[/QUOTE]
Piece of c**p, after wasting time to register it says i cant access the "panel???".
-
Sep 29th, 2019, 05:54 PM
#38
Re: [RESOLVED] Move controls at runtime
And WHY are you posting this to a 3+ year old thread that was already RESOLVED?
You joined in '99? Wonder why you haven't provided assistance (i see you only posted 59 times) to others over the past TWENTY YEARS!
Anyway,...have a great rest-of-the-day!
Sammi
-
Oct 1st, 2019, 02:47 PM
#39
Lively Member
Re: [RESOLVED] Move controls at runtime
I only post when I think I will contribute with something... something that will help others.
In this case, someone else who might be looking for the same info I was... that person won't waste time registering in that s**ty site.
Before creating new threads with the same topics i use to research, because that I've updated a thread that is 3+YO.
Instead of a "powerposter" i'm still a "member" after all these 20 years. The order is: "if you dont have anything to contribute SFU!"
Anyway,...have a great rest-of-the-day!
MBS
Originally Posted by SamOscarBrown
And WHY are you posting this to a 3+ year old thread that was already RESOLVED?
You joined in '99? Wonder why you haven't provided assistance (i see you only posted 59 times) to others over the past TWENTY YEARS!
Anyway,...have a great rest-of-the-day!
Sammi
-
Oct 1st, 2019, 02:49 PM
#40
Lively Member
Re: [RESOLVED] Move controls at runtime
I only post when I think I will contribute with something... something that will help others.
In this case, someone else who might be looking for the same info I was... that person won't waste time registering in that s**ty site.
Before creating new threads with the same topics i use to research, because that I've updated a thread that is 3+YO.
Instead of a "powerposter" i'm still a "member" after all these 20 years. The order is: "if you dont have anything to contribute SFU!"
Anyway,...have a great rest-of-the-day!
MBS
Originally Posted by SamOscarBrown
And WHY are you posting this to a 3+ year old thread that was already RESOLVED?
You joined in '99? Wonder why you haven't provided assistance (i see you only posted 59 times) to others over the past TWENTY YEARS!
Anyway,...have a great rest-of-the-day!
Sammi
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|