|
Hi,
I am Using Slider control. I want Small changes value set in floating point. It is possible? I have move to slider control on 0.1, 0.2, 0.3..... to 1.
Pls help any idea? or url pls
Regards,
M.Mathivanan
|
|
|
|
|
This[^] CP Archive item may help.
But your question is somewhat ambiguous.
You want an actual value changed?
Or you want the figures shown to change?
Unclear, please post the code you have so far.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
I think one of the change properties will do what you need; see here[^] for more information.
I must get a clever new signature for 2011.
|
|
|
|
|
Or is your problem number management, the slider only deals with integers (I have not checked). If so the multiply the 0.1 by 10 between your data and the slider control.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: the slider only deals with integers (I have not checked)
I did check, and it supports changing by double .
I must get a clever new signature for 2011.
|
|
|
|
|
Yeah it did sound a lot simplistic but I'be heard of sillier issues.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi there,
I'm sorry to bug, but I have been searching today for something like the code I did (see bellow) and I couldn't really find anything alike so I took some ideas and added some lines and so far it worked on a test folder (drilling down through sub-folders and different ext, etc)
What I need is some guidance and just for you to take a look at the code and let me know if there is a way to improve it and/or bullet proof it. I do have more than 25k files to update and I don't want to do it later on manually!
The information to be updated are movie files The Folder has a name (Sample: SQL.Proyect.20100525) But the movie was named just "Movie", and I need to update that. The path looks like (Z:\20\1\0\SQL.Proyect.20100525\Movie.avi)
One more thing: Keep in mind that I just learned today .vbs
So your expertise will be much appreciate it!
<br />
Option Explicit<br />
Dim objFSO, strDIR, objDIR<br />
Set objFSO = CreateObject("Scripting.FileSystemObject")<br />
strDIR = "C:\vbScript"<br />
Set objDIR = objFSO.GetFolder(strDIR)<br />
RenameVideos(objDIR)<br />
Sub RenameVideos(curPath)<br />
Dim vItem, vCurName, vCurPath, vNewName, vNewPath, vShwName<br />
For Each vItem In curPath.Files<br />
If objFSO.GetBaseName(vItem.Path) = "Movie" Then<br />
vCurName = objFSO.GetFileName(vItem.Path)<br />
vCurPath = objFSO.GetParentFolderName(vItem.Path) & "\" & objFSO.GetFileName(vItem.Path)<br />
vShwName = objFSO.GetParentFolderName(vItem.Path)<br />
vNewName = objFSO.GetBaseName(vShwName) & "." & objFSO.GetExtensionName(vCurName)<br />
vNewPath = objFSO.GetParentFolderName(vItem.Path) & "\" & objFSO.GetFileName(vNewName)<br />
Wscript.Echo "The File Name: " & vCurName & chr(13) & _<br />
"Location Path: " & vCurPath & chr(13) & _<br />
"Will be renamed to: " & vNewName & chr(13) & _<br />
"New Unique Path: " & vNewPath<br />
objFSO.MoveFile vCurPath, vNewPath <br />
End If<br />
Next<br />
For Each vItem In curPath.SubFolders<br />
RenameVideos(vItem)<br />
Next<br />
End Sub<br />
|
|
|
|
|
Well, i wouldn't bother using vbscript.
I would write a small app to do this in VB.net.
If you don't have Visual Studio, you could always download the express editions for free from MS.
It will be more reliable, easier to debug and maintain. oh, and you can always give it a nice gui to look at if you want
|
|
|
|
|
Hi,
I need a guidance on how to achieve this global search in vb.net using sql express.
cenario:
I have a Mdi parent form as main window.
I add a toolstrip so I can add a label, textbox and a search botton.
I want a global search for serial number, when found, a child form load with its record; if not found, a message.
tables structure:
inventory(inv_ID, serial_no, Type, etc..)
Lost(lost_id, inv_id, date, etc..)
repair(repair_id, inv_id, etc..)
training(tran_id, inv_id,etc..)
wherever the serial number appears on view from these tables, I need the result.
problems:
1)if I do a view for all, I will get no record if one of the fk key is not there...
2)I cannot drop the pk key on the form to do a recursive search.
Please guide me on this.
thank you in advance
|
|
|
|
|
That isn't clear to me. What do you mean by "global search"? what is known, and what is unknown? maybe an example is in order.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hi
What I meant by it is a search in general.
If I am on the main window form ,I want to search for a serial number without having to click on any form. That is why I put a search button on the menu.
The inventory table is the main table, when I search I should get the state of serial number whether it is in lost, repair, etc.. And load the form corresponding to its state.
I hope I am clearer now.
Thanks again
|
|
|
|
|
Am I to understand that each of the objects in your database will move from one table to tbe next when it changes state? I don't think that is good design. I'd rather go for one table that holds all objects, with an extra field indicating its state (inventory, lost, repair, whatever). And when more info needs be stored in a state-dependent way, then add that in separate tables.
Doing so, I expect fewer problems and less code.
Furthermore, you may want to keep track of the states an object has been in. That would allow you to answer questions such as: how often has an object been repaired? What is the average time span between repairs for objects needing multiple repairs? etc.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hi
Ok. I have armory table (armory_id, inv_id, lost_id, repair_id)
When I do a view on this table, if one of the fk. Key is missing. I get no result, here lies my problem. If I can get this solves, I really would like to tackle on those questions you mentioned
I thank you for your walkthrough on this one.
|
|
|
|
|
I'm still confused. In my world each object would have a unique and constant ID, and all those pretty similar objects would sit in a single table. They could change state, get extra information in other tables, but they would not move out of the primary table, and they would not change their ID. If that is the model you want but not currently have, you would need:
1.
some run-once code to make sure the above invariant holds true; it would look for entries in other tables that are not currently present in the main table.
2.
a thorough check of all code to make sure the invariant is maintained, so objects don't move out of the primary table ever again.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Yes I am sensing that I need to change my current model but I am bit off line with my table structure.
Main table is armory(armory_id, inv_id, lost_id,repair_id)
Would it be instead (armor_id, inv_id, lostcheckbox, repaircheckbox)
That would give me the state of a particular serail no)
Then I can load its record from the current state.
Thanks
|
|
|
|
|
I don't know what information you want to store, and what search operations you are going to need, so I can only gamble a bit. Maybe this:
armory(armory_id, current_state, armory_description)
actions(action_id, armory_id, action_start, action_end, action_description)
Note there are no links from armory to actions!
and current_state would be an enum with possible values: normal, lost, in repair, ...
one could argue current_state is redundant, it should always match the outcome of the last action.
both tables would only be allowed to grow, and probably actions with same armory_id should not overlap time wise.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I thank you very much I work on it and I will check back with you.
|
|
|
|
|
Hi,
I thank you for your assistance. things work fine. I would like to improve in software development skills. Will you guide me on that? I would really appreciate that.
Also, if possible I like to estblish a technical correspondent with you.
Here my email: wnmichaud@yahoo.com
|
|
|
|
|
Hi,
I'm glad you're making progress.
I suggest you study by reading books and on-line articles (such as on the CP site), and ask questions in the appropriate forums here; that way you get fast and multiple replies, something no single person can offer. I'll typically will be one of the repliers in many of the CP forums.
PS 1: Publishing your e-mail address isn't a good idea, bots will catch it and send you spam.
PS 2: You can express your opinion about the replies by voting them up or down...; that helps in setting a person's reputation.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
|
Hi Luc,
I have another issue I like to tackle on.
I like to have a session log off on the said project we discussed.
If the user does not perform any click, let's say during 10 minutes , automatic log off, revert back to the login page.
Thanks,
|
|
|
|
|
Hi Waner,
I don't know the answer, however I trust a little Google action should provide a few ideas and perhaps code examples as well.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
You could use LEFT JOIN instead of INNER JOIN between the tables. Just rewrite the SQL query behind your view.
|
|
|
|
|
Hi I am new to Visual Basic programming, I am presently working in vb6..... I need to do the following operation.
I have a global variable, which is a flag. I have a timer which will set this flag after certain amount of time. I also have a function, which has a for loop. Inside this loop it will check whether the flag is set or not. If it is set it comes out of the loop or else it will do some operation for a certain number of times.
Is this possible in Visual Basic 6.0
I tried it but the timer is not waking up after its interval is reached or the Vb is hanging...
'''''''''''''''''''Code
Public g_TimeOut As Boolean
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Timer1_Timer()
g_TimeOut = True
Timer1.Enabled = False
End Sub
Private Function Testing(nCount As Integer) As Integer
Dim index As Integer
Dim flag As Boolean
flag = False
index = 0
For index = 0 To nCount
If (g_TimeOut = True) Then
Debug.Print "Got the signal from the timer so ending the counter"
flag = True
Exit For
Else
Debug.Print "Still Counting...." & index
Sleep 1000
End If
Next index
If (flag = True) Then
Debug.Print "Did not got the signal, still ending the counter."
End If
End Function
Private Sub Form_Load()
Timer1.Interval = 5000
Timer1.Enabled = True
Testing (10)
End Sub
modified on Wednesday, February 16, 2011 1:42 AM
|
|
|
|
|
My first thought was:
In your timer event -> timer1.enabled = false
this deactivates your timer
Now I tried what Aslam told you, and it works.
I cannot remember: What did I before google?
modified on Wednesday, February 16, 2011 3:47 AM
|
|
|
|
|